summaryrefslogtreecommitdiff
path: root/scripts/test/shared.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-11-21 13:05:52 -0800
committerGitHub <noreply@github.com>2017-11-21 13:05:52 -0800
commit6cf7343bffa3d485161e221b23dfacd9243dec68 (patch)
treed330dcc980be1bceadf2df3d1b65fd60385e4879 /scripts/test/shared.py
parenteedcc291164a46474116e0e54ede3133214a7621 (diff)
downloadbinaryen-6cf7343bffa3d485161e221b23dfacd9243dec68.tar.gz
binaryen-6cf7343bffa3d485161e221b23dfacd9243dec68.tar.bz2
binaryen-6cf7343bffa3d485161e221b23dfacd9243dec68.zip
Fix wasm-reduce testing out of tree (#1284)
* fix wasm-reduce when out-of-tree: do not use a hardcoded bin/wasm-opt, instead add a Path namespace with utilities to get the proper path, and use BINARYEN_ROOT which our test setup code ensures
Diffstat (limited to 'scripts/test/shared.py')
-rw-r--r--scripts/test/shared.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py
index 65f1f6e74..88d6688fa 100644
--- a/scripts/test/shared.py
+++ b/scripts/test/shared.py
@@ -102,6 +102,10 @@ if not options.binaryen_bin:
else:
options.binaryen_bin = 'bin'
+# ensure BINARYEN_ROOT is set up
+os.environ['BINARYEN_ROOT'] = os.path.dirname(os.path.abspath(
+ options.binaryen_bin))
+
options.binaryen_bin = os.path.normpath(options.binaryen_bin)
wasm_dis_filenames = ['wasm-dis', 'wasm-dis.exe']