Closed Bug 1555212 Opened 8 months ago Closed 8 months ago

./mach wpt --product chrome doesn't work


(Testing :: web-platform-tests, defect, P2)

Version 3


(firefox69 fixed)

Tracking Status
firefox69 --- fixed


(Reporter: ehsan, Assigned: jgraham)


(Blocks 1 open bug)



(1 file)

ehsan@local:~/moz/src$ ./mach wpt --product chrome dom/historical.html
 0:00.03 INFO Skipping manifest download because existing file is recent

  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --prefer-binary
Error running mach:

    ['wpt', '--product', 'chrome', 'dom/historical.html']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error

The details of the failure are as follows:

CalledProcessError: Command '(u'/home/ehsan/moz/src/obj-ff-opt/_virtualenvs/init/bin/pip', 'install', '--prefer-binary', '-r', '/home/ehsan/moz/src/testing/web-platform/tests/tools/wptrunner/requirements_chrome.txt')' returned non-zero exit status 2

  File "/home/ehsan/moz/src/testing/web-platform/", line 280, in run_wpt
    return self.run_web_platform_tests(**params)
  File "/home/ehsan/moz/src/testing/web-platform/", line 272, in run_web_platform_tests
    return, **params)
  File "/home/ehsan/moz/src/testing/web-platform/", line 37, in run
    kwargs = self.setup.kwargs_wptrun(kwargs)
  File "/home/ehsan/moz/src/testing/web-platform/", line 141, in kwargs_wptrun
  File "/home/ehsan/moz/src/testing/web-platform/tests/tools/wpt/", line 522, in setup_wptrunner
  File "/home/ehsan/moz/src/testing/web-platform/tests/tools/wpt/", line 175, in install_requirements
    self.venv.install_requirements(os.path.join(wpt_root, "tools", "wptrunner", self.browser.requirements))
  File "/home/ehsan/moz/src/testing/web-platform/tests/tools/wpt/", line 109, in install_requirements
    self.pip_path, "install", "--prefer-binary", "-r", requirements_path
  File "/home/ehsan/moz/src/testing/web-platform/tests/tools/wpt/", line 48, in call
    return subprocess.check_output(args)
  File "/usr/lib/python2.7/", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)

Our in-tree pip is unfortunately very outdated, and doesn't support the options required upstream. There's a workaround you can use in the short term; something like

source /home/ehsan/moz/src/obj-ff-opt/_virtualenvs/init/bin/activate
pip install --upgrade pip
./mach wpt --product chrome dom/historical.html

obviously you need to do that once per clean objdir, so it's not ideal. I need to look at either updating the in-tree pip, which I understand has caused problems in the past, or hacking things so we don't go down the install_requirements codepath e.g. by pre-installing those requirements from the mach frontend.

Priority: -- → P2

This avoids a mismatch in the available arguments between upstream pip and
the version vendored into m-c at the cost of the code being more liable
to break when upstream changes.

Pushed by
Make wpt --product install the dependencies in the mach layer, r=ato
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.