[wpt-sync] Sync PR 17033 - Improve error message when virtualenv is missing
Categories
(Testing :: web-platform-tests, defect, P4)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync upstream])
Sync web-platform-tests PR 17033 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/17033
Details from upstream follow.
Mike Pennisi <mike@mikepennisi.com> wrote:
Improve error message when virtualenv is missing
It can be challenging to properly configure systems to run the WPT CLI.
In recognition of this, this project maintains code paths that improve
error messages, helping users troubleshoot misconfigured systems.Users may not have the
virtualenv
module installed, or they may have
it installed in such a way that is inaccessible during command-line
execution. Prior to the application of this patch, the error message
reported by the WPT CLI is somewhat cryptic:$ ./wpt run firefox Traceback (most recent call last): File "./wpt", line 4, in <module> from tools.wpt import wpt File "/home/vagrant/wpt/tools/wpt/wpt.py", line 10, in <module> from . import virtualenv File "/home/vagrant/wpt/tools/wpt/virtualenv.py", line 7, in <module> import pkg_resources ImportError: No module named pkg_resources
With this patch applied, a more helpful error is produced by a branch
which was previously created for this purpose:$ ./wpt run firefox Traceback (most recent call last): File "./wpt", line 5, in <module> wpt.main() File "/home/vagrant/wpt/tools/wpt/wpt.py", line 143, in main venv = setup_virtualenv(main_args.venv, main_args.skip_venv_setup, props) File "/home/vagrant/wpt/tools/wpt/wpt.py", line 117, in setup_virtualenv venv = virtualenv.Virtualenv(path, should_skip_setup) File "/home/vagrant/wpt/tools/wpt/virtualenv.py", line 30, in __init__ raise ValueError("virtualenv must be installed and on the PATH") ValueError: virtualenv must be installed and on the PATH
Some commands do not rely on
virtualenv
, e.g.wpt lint
. This change
also makes it possible to execute those commands whenvirtualenv
is
not available.
Assignee | ||
Comment 1•5 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=898298cd57e94d9debe60bba6675004980ec6b04
Assignee | ||
Comment 2•5 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=77b8b41bb543be33f2443027d550ef17fd54bf4e
Assignee | ||
Comment 3•5 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=c3c8ffcc55a33850d69a24065ca05fcd9cfa8b0a
Assignee | ||
Comment 4•5 years ago
|
||
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Assignee | ||
Comment 5•5 years ago
|
||
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Assignee | ||
Comment 6•5 years ago
|
||
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Assignee | ||
Comment 7•5 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=76da848d141da54f9eb931d67aad1f4ada493e74
Assignee | ||
Comment 8•5 years ago
|
||
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/bc296c60b6a0 [wpt PR 17033] - Improve error message when virtualenv is missing, a=testonly
Comment 10•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Description
•