Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src.sleep()不支持riscv架构 #109

Open
NjFrankHu opened this issue Sep 10, 2024 · 2 comments
Open

src.sleep()不支持riscv架构 #109

NjFrankHu opened this issue Sep 10, 2024 · 2 comments

Comments

@NjFrankHu
Copy link

NjFrankHu commented Sep 10, 2024

$ uname -a
Linux openEuler 5.10.113-yocto-standard #1 SMP PREEMPT Thu Jul 25 06:34:25 UTC 2024 riscv64 riscv64 riscv64 GNU/Linux

youqu v2.6.6

========================================================= FAILURES =========================================================
____________________________________________ TestMyCase.test_open_file_manager _____________________________________________

self = <apps.fm.case.test_mycase_001.TestMyCase object at 0x3fd6e0c110>

def test_open_file_manager(self):
    """this is my test case"""
    # 用例步骤,调用方法层封装好的方法进行操作
  FmWidget().open_file_manager()

case/test_mycase_001.py:16:


../../.venv/lib/python3.11/site-packages/funnylog/init.py:160: in wrapped
return func(*a, **kw)
widget/fm_widget.py:23: in open_file_manager
sleep(1)


second = 1

def sleep(second: [float, int]):
    """
     重写sleep方法
     1、增加等待时间的日志
     2、根据不同CPU架构进行放大
    :param second: 等待时间
    :return:
    """
    sys_arch = GlobalConfig.SYS_ARCH
  multiple = float(GlobalConfig.slp_cfg.get(sys_arch))

E TypeError: float() argument must be a string or a real number, not 'NoneType'

../../src/sleepx.py:22: TypeError
------------------------- generated xml file: /home/test/autotest/report/xml/fm-20240910123308.xml -------------------------
================================================= short test summary info ==================================================
【 2024-09-10 12:33:23.091955 TestMyCase.test_open_file_manager || FAILED ✘ 】
case/test_mycase_001.py::TestMyCase::test_open_file_manager - TypeError: float() argument must be a string or a real number, not 'NoneType'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================== 1 failed, 1 deselected, 1 rerun in 10.36s =========================================
Report successfully generated to /home/test/autotest/report/allure_html

@NjFrankHu
Copy link
Author

NjFrankHu commented Sep 10, 2024

解决方法:
在 setting/sleepx.ini中增加配置
riscv64 = 1
放大的倍数没有经验,不清楚填写几比较合适。填1可以先跑通了

@mikigo
Copy link
Contributor

mikigo commented Sep 10, 2024

nice 快提交PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants