summaryrefslogtreecommitdiff
path: root/scripts/test/shared.py
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-08-29 16:56:56 -0700
committerGitHub <noreply@github.com>2017-08-29 16:56:56 -0700
commita0517dbde4df692e041f4fa42036910b1846ea49 (patch)
tree012cc6a083288ba65899219d1fbf558cd1f35bd1 /scripts/test/shared.py
parent8373d2bd7290893066ea313974425fda8d7e81d7 (diff)
downloadbinaryen-a0517dbde4df692e041f4fa42036910b1846ea49.tar.gz
binaryen-a0517dbde4df692e041f4fa42036910b1846ea49.tar.bz2
binaryen-a0517dbde4df692e041f4fa42036910b1846ea49.zip
Fix locaion of wasm-merge in auto_update_tests.py (#1151)
Also, fix -l and -rpath lib directories so that it can be run out-of-tree
Diffstat (limited to 'scripts/test/shared.py')
-rw-r--r--scripts/test/shared.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py
index f94f22fe8..aa1f9ae3e 100644
--- a/scripts/test/shared.py
+++ b/scripts/test/shared.py
@@ -102,9 +102,11 @@ if not options.binaryen_bin:
else:
options.binaryen_bin = 'bin'
+options.binaryen_bin = os.path.normpath(options.binaryen_bin)
+
wasm_dis_filenames = ['wasm-dis', 'wasm-dis.exe']
-if all(map(lambda f: not os.path.isfile(os.path.join(options.binaryen_bin, f)),
- wasm_dis_filenames)):
+if not any(os.path.isfile(os.path.join(options.binaryen_bin, f))
+ for f in wasm_dis_filenames):
warn('Binaryen not found (or has not been successfully built to bin/ ?')
# Locate Binaryen source directory if not specified.
@@ -151,6 +153,7 @@ NODEJS = which('nodejs') or which('node')
MOZJS = which('mozjs')
EMCC = which('emcc')
+BINARYEN_INSTALL_DIR = os.path.dirname(options.binaryen_bin)
WASM_OPT = [os.path.join(options.binaryen_bin, 'wasm-opt')]
WASM_AS = [os.path.join(options.binaryen_bin, 'wasm-as')]
WASM_DIS = [os.path.join(options.binaryen_bin, 'wasm-dis')]