Skip to content

Commit 6fcf73c

Browse files
authored
[test] Remove spidermonkey flag handling from config.py. NFC (emscripten-core#23737)
This flag is injected for testing purposes so is better places in common.py along with other engine flags.
1 parent 15967b4 commit 6fcf73c

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

test/common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,7 @@ def setUp(self):
11871187
self.ldflags = []
11881188
# Increate stack trace limit to maximise usefulness of test failure reports
11891189
self.node_args = ['--stack-trace-limit=50']
1190+
self.spidermonkey_args = ['-w']
11901191

11911192
nodejs = self.get_nodejs()
11921193
if nodejs:
@@ -1516,8 +1517,10 @@ def run_js(self, filename, engine=None, args=None,
15161517
engine = self.js_engines[0]
15171518
if engine == config.NODE_JS_TEST:
15181519
engine = engine + self.node_args
1519-
if engine == config.V8_ENGINE:
1520+
elif engine == config.V8_ENGINE:
15201521
engine = engine + self.v8_args
1522+
elif engine == config.SPIDERMONKEY_ENGINE:
1523+
engine = engine + self.spidermonkey_args
15211524
try:
15221525
jsrun.run_js(filename, engine, args,
15231526
stdout=stdout,

tools/config.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,7 @@ def normalize_config_settings():
6363
if not JS_ENGINES:
6464
JS_ENGINES = [NODE_JS]
6565

66-
# Engine tweaks
67-
if SPIDERMONKEY_ENGINE:
68-
new_spidermonkey = SPIDERMONKEY_ENGINE
69-
if '-w' not in str(new_spidermonkey):
70-
new_spidermonkey += ['-w']
71-
SPIDERMONKEY_ENGINE = fix_js_engine(SPIDERMONKEY_ENGINE, new_spidermonkey)
66+
SPIDERMONKEY_ENGINE = fix_js_engine(SPIDERMONKEY_ENGINE, listify(SPIDERMONKEY_ENGINE))
7267
NODE_JS = fix_js_engine(NODE_JS, listify(NODE_JS))
7368
NODE_JS_TEST = fix_js_engine(NODE_JS_TEST, listify(NODE_JS_TEST))
7469
V8_ENGINE = fix_js_engine(V8_ENGINE, listify(V8_ENGINE))

0 commit comments

Comments
 (0)