Running android tests with macOS host: ImportError: cannot import name _psutil_osx
Categories
(Testing :: General, defect, P2)
Tracking
(firefox80 fixed)
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: acreskey, Assigned: gbrown)
References
Details
(Whiteboard: dev-prod-2020)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
When I try to run the following android test:
./mach reftest --this-chunk 1 --total-chunks 100
on a ./mach bootstrapped macOS Catalina, 10.15.5 host, I see the following error:
ImportError: cannot import name _psutil_osx
Full stack trace:
ImportError: cannot import name _psutil_osx
File "/Users/acreskey/dev/src/mozilla-central/layout/tools/reftest/mach_commands.py", line 208, in run_reftest
return self._run_reftest(**kwargs)
File "/Users/acreskey/dev/src/mozilla-central/layout/tools/reftest/mach_commands.py", line 243, in _run_reftest
return reftest.run_android_test(**kwargs)
File "/Users/acreskey/dev/src/mozilla-central/layout/tools/reftest/mach_commands.py", line 101, in run_android_test
import remotereftest
File "/Users/acreskey/dev/src/mozilla-central/build/mach_bootstrap.py", line 476, in __call__
module = self._original_import(name, globals, locals, fromlist, level)
File "/Users/acreskey/dev/src/build/obj-release-android/_tests/reftest/remotereftest.py", line 9, in <module>
import psutil
File "/Users/acreskey/dev/src/mozilla-central/build/mach_bootstrap.py", line 476, in __call__
module = self._original_import(name, globals, locals, fromlist, level)
File "/Users/acreskey/dev/src/mozilla-central/third_party/python/psutil/psutil/__init__.py", line 161, in <module>
from . import _psosx as _psplatform
File "/Users/acreskey/dev/src/mozilla-central/build/mach_bootstrap.py", line 476, in __call__
module = self._original_import(name, globals, locals, fromlist, level)
File "/Users/acreskey/dev/src/mozilla-central/third_party/python/psutil/psutil/_psosx.py", line 15, in <module>
from . import _psutil_osx as cext
I've tried to manually install psutil
at the terminal, but it appears to already be installed:
Requirement already satisfied: psutil in /Users/acreskey/.pyenv/versions/2.7.11/lib/python2.7/site-packages (5.6.3)
Assignee | ||
Comment 1•4 years ago
|
||
Do you get the same error from python -c "import psutil"
?
Reporter | ||
Comment 2•4 years ago
|
||
I get no output when I run python -c "import psutil"
from the terminal.
But when I run the tests I do see the same ImportError: cannot import name _psutil_osx
Assignee | ||
Comment 3•4 years ago
|
||
Interesting. That means you can import psutil from the terminal.
I wonder:
- would an update of third_party/python/psutil help?
- can remotereftest.py eliminate its use of psutil?
- can remotereftest.py warn and continue when psutil is unavailable?
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #3)
- would an update of third_party/python/psutil help?
No, it is up to date, bug 1620513.
Assignee | ||
Comment 5•4 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #3)
- can remotereftest.py eliminate its use of psutil?
I can't think of a way. remotereftest.py uses psutil to find ssltunnel and xpcshell processes that might interfere with this run; I don't know of a good cross-platform alternative.
Assignee | ||
Comment 6•4 years ago
|
||
xpcshell-test and mochitest already check for psutil ImportError.
Assignee | ||
Comment 7•4 years ago
|
||
Assignee | ||
Comment 8•4 years ago
|
||
:acreskey - Try running reftests with this patch, please.
Reporter | ||
Comment 9•4 years ago
|
||
:gbrown, with your patch I can successfully run the reftests -- thank you!
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
bugherder |
Description
•