Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"wpt manifest" should be able to update manifest for directories of interest only #47350

Open
WeizhongX opened this issue Jul 30, 2024 · 4 comments

Comments

@WeizhongX
Copy link
Contributor

When run WPTs locally, we (at least at google) always update the WPT Manifest to make sure the test is run correctly (e.g. to make sure Wptrunner view the the test type correctly). Updating WPT manifest is slow at this point because "wpt manifest" does not allow a partial update. On Linux it takes about 4 seconds to update WPT manifest, and would be even slower on Windows.

Suggestions is to allow "wpt manifest" to update for the file or directories of interest. For example, the command "git ls-tree -r -z HEAD" takes about 1.5 seconds on Linux, yet "git ls-tree -r -z HEAD badging/badge-success.https.html" takes about 0.01 seconds. There would be other savings also, and we believe the total time for this can be made to be < 0.1 second for running a single test, which is the usual case.

WPT Manifest holds information about "test type", references for reftests, so updating infor for the test file will be good enough.

@WeizhongX
Copy link
Contributor Author

Also we'd like to have a way to skip MtimeCache, or preferably remove that altogether. (MtimeCache would only be useful for running tests locally, but with the proposal above it should not be needed anymore.)

@WeizhongX
Copy link
Contributor Author

@jgraham @gsnedders What would be your opinion on this?

@jgraham
Copy link
Contributor

jgraham commented Jul 30, 2024

Note that this isn't totally trivial to get right, for example if you pass in /foo/bar/test.any.html then you have to convert that into a path, which you can't do reliably without the manifest. I think in that case the best reliable method is to take the entire directory and use that i.e. {wpt_root}/foo/bar. For reftests we may also end up looking outside the directory for references.

What's the concern with the mtime cache? Performance or correctness? Since gecko is still using Mercurial, and has some workflows that don't use VCS checkouts at all, having some caching layer that doesn't depend on the source being in a git repo continues to be important to us.

@WeizhongX
Copy link
Contributor Author

for example if you pass in /foo/bar/test.any.html then you have to convert that into a path, which you can't do reliably without the manifest

My plan is to pass in a path relative to the tests-root, with all other parameters still kept. Do you see a risk with that?

For reftests we may also end up looking outside the directory for references.

I think this is fine.

What's the concern with the mtime cache?

I thought it is too complex and unnecessary to keep all kinds of caches in this process. But we can keep it if it is still used at gecko side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants