-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Implement automatic test suite skipping facility into the browser test harness #25533
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
base: main
Are you sure you want to change the base?
Conversation
…t harness, so that users do not need to manually maintain skip lists of features. Paves the way toward test harness working for users out of the box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
I do worry a little bit about any mechanism that automatically skips test though.
Having to spell out EMTEST_LACKS_GRAPHICS_HARDWARE
explicitly in the CI configuration means that the we don't need to trust the auto-disable feature.
This is why we have EMTEST_SKIP_NODE_CANARY
explicitly rather than trying to automatically figure out at runtime if we should skip them.
I think I've seen cases where we were mistakenly always skipping certain tests due to a bug in the auto-skip magic, and its went unnoticed.
Imagine this scenario where we have an auto-skip mechanism:
1.I setup a CI bot with idea that it will run all the tests under node.
2. I install node on the bot
3. I run the tests and see that they all pass
4. Someone adds some new tests that depend on a more recent version of node.
5. An auto-skip mechanism means I never actually run them and bot keeps passing
I would much rather have my the bot start failing at (4) so can explictly choose to either:
- Update node.
- Set some environment variable such as
SKIP_NODE24
orSKIP_MEMORY64
to opt out explicitly.
Another example is that we don't automatically skip d8 tests when d8 is not found. We expect folks to explicitly opt out with EMTEST_SKIP_V8
.
Maybe your are not proposing that we go that far, but JIC I thought I would mention the rationale for the status quo.
# On Nightly and BEta, e.g. 145.0a1, pretend it to still mean version 144, | ||
# since it is a pre-release version | ||
if any(c in milestone for c in ("a", "b")): | ||
version -= 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not use firefox --version
for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
firefox --version
seems to be a linux thing. It doesn't exist on Windows.
There are multiple use cases that motivate this work:
Then if the user goes and points Our
And when you do all that work, there is currently no model to contribute that information back to the project, so that others running the harness could benefit from out of the box. Other people running the suite will need to independently do that same work. Until now by this PR, that is.
Yeah, I agree this kind of accident could happen. Here I would stress that the fact that all existing functionality will still be green, i.e. the Emscripten project will not have been regressed (at least as far as test coverage is concerned), since if there is a new feature that requires newer Node, then all the tests that are running against older Node will still be ok, verifying that the project runs successfully on the older Node. So nothing has regressed(?) - maybe just the newly added test coverage is not being incorporated correctly. It is definitely a burden on the project that it also needs to keep up with new Node versions. But the risk of missing a new feature long-term by "auto-magic" seems low.. it is not like the Emscripten project could be oblivious to the latest feature developments in its domain (like Wasm Exnref exceptions), since the Emscripten devs are also contributing to the development of those feature specifications. Maybe we can add a disable feature to these auto-detection flags. For example:
That way Emscripten CI can opt-out from the auto-disables and be able to run all the tests? |
…MTEST_LACKS_x=0 can be used to force-don't-skip tests.
I updated the PR to enable setting |
How about is the versions checking this was all behind Specifically I think I would want to turn off Funnily enough we just had an example of where skipping tests caused us to loose coverage. In this case were explictly skipping using |
Implement automatic test suite skipping facility into the browser test harness, so that users do not need to manually maintain skip lists of features. (or in present state, have to maintain fewer of them).
Paves the way toward test harness working for users out of the box, improving First-Time User Experience, rather than have a large bulk of tests fail for users by default.