summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2024-11-25 15:58:58 -0800
committerGitHub <noreply@github.com>2024-11-25 15:58:58 -0800
commitf7afec956917c51071867f5b1b487111f1a1ef60 (patch)
tree4a1ebb84c0ca45f7c2a22fbcaf69954c8893efc0 /scripts
parent7cee02592033b830a05eeeb9990d15a1f33e6792 (diff)
downloadbinaryen-f7afec956917c51071867f5b1b487111f1a1ef60.tar.gz
binaryen-f7afec956917c51071867f5b1b487111f1a1ef60.tar.bz2
binaryen-f7afec956917c51071867f5b1b487111f1a1ef60.zip
[tests] Fix wasm2js test command line generation (#7114)
--emscripten is added to the command line if the filename contains the string 'emscripten', but the current logic includes the cwd, so it fails if the tests are run from a directory with 'emscripten' in the name. Fix it so the test only includes the basename.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/test/wasm2js.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/test/wasm2js.py b/scripts/test/wasm2js.py
index d716e5fe6..1f6ca4f8a 100644
--- a/scripts/test/wasm2js.py
+++ b/scripts/test/wasm2js.py
@@ -81,9 +81,9 @@ def test_wasm2js_output():
'--disable-exception-handling']
if opt:
cmd += ['-O']
- if 'emscripten' in t:
+ if 'emscripten' in basename:
cmd += ['--emscripten']
- if 'deterministic' in t:
+ if 'deterministic' in basename:
cmd += ['--deterministic']
js = support.run_command(cmd)
all_js.append(js)