Fix passing MIN_x_VERSION in EMCC_CFLAGS when running with a skip env. var. set. #25753
+8
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a bit of awkward combination of things.
On my CI, I test old Firefox (and Safari) browsers down to the min-spec, e.g. Firefox 68, Firefox 78, Firefox 91, and so on.
But because the default MIN_x_VERSION in src/settings.js is newer than the supported min-spec, I need to pass env. var.
EMCC_CFLAGS=-sMIN_x_VERSION=68for example when running the browser test suite.I combine that env. var. with the new
EMTEST_AUTOSKIP=1env. var. so that I can offload having to maintain a large knowledgebase of which browser supports/doesn't support which feature inside the test runner itself.This works great - almost.
The issue is that the browser feature skipping mechanism (
EMTEST_AUTOSKIPandEMTEST_LACKS_xenv. vars) has an intentional feature of skipping only the browser test run part, but not the test execution/Emscripten compilation part.The intent of this mechanism has been to be able to partially test the browser tests, even if a skip env. var. is present, but just not run the test in an old browser that's known to fail.
But this results in the problem. When one uses e.g.
then the test
browser.test_audio_worklet_es6will not skip, but will error out with a feature matrix checkTo fix this, we could either change the semantics of the skip env. vars to always skip the whole test, not just the running part. But that might reduce test coverage that was intentional to preserve.
Or we could adjust the
EMTEST_AUTOSKIP=1env. var. to be special and have a different "power level" of skipping compared to theEMTEST_LACKS_x=1env. vars. But that feels arbitrary and prone to future confusion.So this PR adds a bit of an awkward test to skip the whole test if any MIN_x_VERSION directives are explicitly present in EMCC_CFLAGS env. var. This way the above combination of flags will work to skip as desired, but will not reduce the test coverage on CircleCI.