Page MenuHomePhabricator

Bug 1505474 - Use downloaded manifest for wpt in jsshell,
ClosedPublic

Authored by jgraham on Nov 12 2018, 6:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 5, 12:46 AM
Unknown Object (File)
Sat, Apr 19, 3:26 PM
Unknown Object (File)
Apr 11 2025, 12:30 AM
Subscribers

Details

Summary

web-platform-tests gets its test list from a manifest file that's
generated from the content of the tests. Unfortunately generating this
manifest is slow, so it's unreasonable to create it from scratch for
every test run. Until recently the generated manifest was kept
in-tree, which was suboptimal in a few ways:

  • The manifest tended to get out of sync with the actual source
  • The large json file caused problems for tooling including source control and the review frontends.

We previously switched mach wpt to download a manifest on demand and
apply an incremental update. However this work missed the usage in
jstests.py. This continued to use the increasing outdated in-tree
manifest, which causes a number of problems

  • It doesn't have an up-to-date list of tests
  • It blocks removing that file
  • It blocks landing various optimisations to make updating the manifest faster.

This patch fixes jstests.py to use a downloaded manifest. Unlike the
tests run through a mach frontend jstests.py doesn't know where the
objdir is, so it's hard to work out where to download the
manifest. This patch adopts a heuristic approach; if the path to the
jsshell looks like <root>/dist/bin and <root>/_tests exists, we assume
it's a gecko-like objdir and use <root>/_tests/web-platform/ for the
manifest; otherwise we just put it into the system tempdir.

Because the manifest has to be updated on startup, this patch causes a
startup time regression, but this will be considerably reduced by the
work in Bug 1497898 for which this is a prerequisite.

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".Nov 12 2018, 6:10 PM
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.

I'm no experts of the wpt specifics (the kwargs business in particular), but this generally makes sense. Thanks for the helpful changeset message.

js/src/tests/jstests.py
308

For clarity, maybe we could store os.path.dirname(xul_tester.js_bin).split(os.path.sep) in a local variable path_split (or something else more appropriate), use path_split[-2:] in the condition above and path_split[:-2] here?

310

nit: dot at the end, please

This revision is now accepted and ready to land.Nov 13 2018, 10:51 AM
Ms2ger added inline comments.
js/src/tests/jstests.py
432–435

Can you just pass xul_tester.js_bin instead of xul_tester? Alternatively, file a followup to remove the debug and wasm arguments.