Closed
Bug 943313
Opened 11 years ago
Closed 11 years ago
AttributeError: 'builtin_function_or_method' object has no attribute 'sleep' after adding power draw support
Categories
(Firefox OS Graveyard :: Gaia::UI Tests, defect, P1)
Tracking
(firefox28 fixed, b2g-v1.2 fixed)
RESOLVED
FIXED
People
(Reporter: davehunt, Assigned: huseby)
Details
(Keywords: perf, Whiteboard: [c=power p= s= u=])
Attachments
(1 file)
It appears that the Yoctopuce library used to gather power draw data has cause an import issue with the standard Python module 'time'. This can be replicated when the risks have been acknowledged but the warning is not skipped. This would usually delay for 30 seconds, but instead now fails. $ GAIATEST_ACKNOWLEDGED_RISKS=true gaiatest --address=localhost:2828 gaiatest/tests/functional/browser/test_browser_navigation.py ... The test run will continue in 30 seconds. Traceback (most recent call last): File "/Users/dhunt/.virtualenvs/gaiatest/bin/gaiatest", line 9, in <module> load_entry_point('gaiatest==0.19', 'console_scripts', 'gaiatest')() File "/Users/dhunt/workspace/gaia/tests/python/gaia-ui-tests/gaiatest/runtests.py", line 391, in main cli(runner_class=GaiaTestRunner, parser_class=GaiaTestOptions) File "/Users/dhunt/workspace/mozilla/mozilla-central/testing/marionette/client/marionette/runtests.py", line 916, in cli runner = startTestRunner(runner_class, options, tests) File "/Users/dhunt/workspace/mozilla/mozilla-central/testing/marionette/client/marionette/runtests.py", line 907, in startTestRunner runner = runner_class(**vars(options)) File "/Users/dhunt/workspace/gaia/tests/python/gaia-ui-tests/gaiatest/runtests.py", line 240, in __init__ time.sleep(delay) I believe this is due to the import in yocto_datalogger.py here: https://github.com/yoctopuce/yoctolib_python/blob/deee5e4413490dda06edf10c9c5be6e785344423/Sources/yocto_datalogger.py#L42 I think we can avoid this by only importing the items from the Yoctopuce modules that we need. Currently we have: from yoctopuce.yocto_api import * from yoctopuce.yocto_current import * from yoctopuce.yocto_datalogger import * We should try replacing this with: from yoctopuce.yocto_api import YAPI from yoctopuce.yocto_current import YCurrent from yoctopuce.yocto_datalogger import YDataLogger I do not have the necessary hardware to test that this works with the power draw testing.
Reporter | ||
Comment 1•11 years ago
|
||
:huseby could you have a look at this please?
Assignee | ||
Comment 2•11 years ago
|
||
yup, I'll take a look
Assignee | ||
Updated•11 years ago
|
Updated•11 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8339577 -
Flags: review?(dave.hunt)
Reporter | ||
Comment 4•11 years ago
|
||
Comment on attachment 8339577 [details] [review] pull request Landed in: https://github.com/mozilla-b2g/gaia/commit/845acbc0c750da43ee6c357d2cd1bb702f4603ca (master) https://github.com/mozilla-b2g/gaia/commit/f13307550640e1ace0f600e6858a73bd6166e801 (v1.2)
Attachment #8339577 -
Flags: review?(dave.hunt) → review+
Reporter | ||
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-b2g-v1.2:
--- → fixed
status-firefox28:
--- → fixed
Resolution: --- → FIXED
Comment 5•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5b8efcb13b2c
You need to log in
before you can comment on or make changes to this bug.
Description
•