mach: Add --update-expectations flag to test-wpt - #45521
Conversation
52ab26d to
6738820
Compare
|
Might be nice to have a book PR for this as well! |
6738820 to
fecbab2
Compare
Yup will do once this merges |
fecbab2 to
881535d
Compare
With this new flag, it automatically runs `update-wpt` at the end, without the need to specify a `--log-raw` argument. Fixes servo#45476 Testing: Local runs with the various combinations of flags Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
881535d to
cc52be0
Compare
| def test_wpt(self, servo_binary: str, multiprocess: bool, update_expectations: bool, **kwargs: Any) -> int: | ||
| if update_expectations: | ||
| if kwargs["log_raw"]: | ||
| print("Do not specify --log-raw when updating tests directly") |
There was a problem hiding this comment.
While it seems a bit weird to use both, would there really be a problem?
There was a problem hiding this comment.
Yes, it would break second time parsing. Initially I allowed for both, but then paraing it for update would fail since it expects a string.
| @CommandArgument("--multiprocess", "-M", default=False, action="store_true", help="Run in multiprocess mode") | ||
| @CommandArgument( | ||
| "--update-expectations", | ||
| "-U", |
There was a problem hiding this comment.
Any chance of lowercase -u? Partly because uppercase short flags conventionally mean NOT. Partly because almost all the git commands have a really useful flag under -u and it would match my general pattern of "that useful option I use all the time is -u" (not the most rational justification I admit)
Taym95
left a comment
There was a problem hiding this comment.
LGTM ✅ , really helpful thanks!
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
With this new flag, it automatically runs
update-wptat the end, without the need to specify a--log-rawargument.Fixes #45476
Testing: Local runs with the various combinations of flags