Skip to content

Commit 29f8535

Browse files
authored
Setup default test settings in test/common.py. NFC (#25083)
Emscripten itself never uses these values.
1 parent 24947a8 commit 29f8535

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

test/common.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,14 @@ def configure(data_dir):
137137
WASM_DIS = os.path.join(building.get_binaryen_bin(), 'wasm-dis')
138138
LLVM_OBJDUMP = shared.llvm_tool_path('llvm-objdump')
139139
PYTHON = sys.executable
140+
141+
assert config.NODE_JS # assert for mypy's benefit
142+
# By default we run the tests in the same version of node as emscripten itself used.
140143
if not config.NODE_JS_TEST:
141144
config.NODE_JS_TEST = config.NODE_JS
142-
145+
# The default set of JS_ENGINES contains the just node.
146+
if not config.JS_ENGINES:
147+
config.JS_ENGINES = [config.NODE_JS_TEST]
143148

144149
requires_network = unittest.skipIf(os.getenv('EMTEST_SKIP_NETWORK_TESTS'), 'This test requires network access')
145150

tools/config.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ def normalize_config_settings():
6262
global CACHE, PORTS, LLVM_ADD_VERSION, CLANG_ADD_VERSION, CLOSURE_COMPILER
6363
global NODE_JS, NODE_JS_TEST, V8_ENGINE, JS_ENGINES, SPIDERMONKEY_ENGINE, WASM_ENGINES
6464

65-
# EM_CONFIG stuff
66-
if not JS_ENGINES:
67-
JS_ENGINES = [NODE_JS_TEST if NODE_JS_TEST else NODE_JS]
68-
6965
SPIDERMONKEY_ENGINE = fix_js_engine(SPIDERMONKEY_ENGINE, listify(SPIDERMONKEY_ENGINE))
7066
NODE_JS = fix_js_engine(NODE_JS, listify(NODE_JS))
7167
NODE_JS_TEST = fix_js_engine(NODE_JS_TEST, listify(NODE_JS_TEST))

0 commit comments

Comments
 (0)