[test] Separate test runner configuration from main compiler config#27382
[test] Separate test runner configuration from main compiler config#27382sbc100 wants to merge 1 commit into
Conversation
bdc56e9 to
f1b3f11
Compare
|
This change does run the risk of making bisecting across this change (with local test-config settings in place) as little annoying. However, most users likely don't use test config settings (the defaults are normally good enough) and commenting out these settings when running a bisect would likely be fine in most cases too. |
b00d1f0 to
193e72a
Compare
|
I'm not sure I follow the motivation. Right now, I have one config file to edit. What do I gain by having two? Also, each config file has some logic for managing it, like we autogenerate |
|
As as laid out in the PR description the motivation is really twofold:
A couple of notes on the impact of this:
There is not reason that the compiler and test framework should share config file or a config file format. Imagine if I proposed to the llvm project that clang and lit should share config file format? Or, in binaryen, if I proposed that check.py and wasm-opt should share a config file? |
|
I do admint there are couple of wrinkles here that I still need to figure out. For example there is one part of the config that is shared and that is the default node JS version. I'm trying to figure out way to deal with that now. |
Counterpoint, some projects have a single config file for many components. Firefox has one config file for all parts of the browser, not one for the JS engine and one for WebGL and one for networking etc. A single config file means only one file needs to be managed, which is nice. So the question is whether the testing stuff is really entirely separate from the main project. I don't feel strongly about that actually. But I think the other benefits you mention are independent of this? For example, changing the config file format sounds like a good idea regardless of how many config files we have. Do we even need a test config file, btw? If it is just for the node version, perhaps we can just use the path/an env var? |
But does the firefox test framework also get configured via this one config file? I honestly don't know.
Indeed. Changing the config file format to make simpler is the primary goal.
Indeed, I did consider that, but there are some cases where there is some actual complexity needed for the test config, at least for my test config. Sometimes I want to setup mulitple JS_ENGINES in an array, for example. We could argue that having mulitple JS_ENGINES in the same test run is almost never used.. The nice thing about this PR is that it basically means don't need a test config file... its completely optional and most people probably won't need/use one. |
I don't either. A unit test framework like gtest would use the main config file I'd guess, but maybe not an external one.
But for those that do, they'd need to figure out where that file is and how it is managed etc. - that's the complexity I'm not happy about. |
I asked AI about how the firefox tests are run: """ Specifically, they do not use the firefox config file it seems. i.e. The firefox config file is not interpreted by the test runner. |
Followup to emscripten-core#27216 Move test-only configuration settings (NODE_JS_TEST, V8_ENGINE, SPIDERMONKEY_ENGINE, JS_ENGINES, WASMER, WASMTIME, WASM_ENGINES) out of the main compiler config file (.emscripten) into `test/config.py`. We are making this change for two reasons: 1. To keep test suite configuration separate from core compiler code. 2. To prepare for converting the main compiler configuration file to a simpler non-Python format (emscripten.conf). If any test-only settings are found in the main config file, the compiler now errors out requesting that they be moved to `test/config.py`. See: emscripten-core#27219
193e72a to
253e0fb
Compare
Followup to #27216
Move test-only configuration settings (NODE_JS_TEST, V8_ENGINE, SPIDERMONKEY_ENGINE, JS_ENGINES, WASMER, WASMTIME, WASM_ENGINES) out of the main compiler config file (
.emscripten) and into a newtest/config.pyfile.We are making this change for two reasons:
emscripten.conf).If any test-only settings are found in the main config file, the compiler now errors out requesting that they be moved to
test/config.py.Also, add some docs about how to configure that test suite, which were previously missing.
See: #27219