summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/check.py b/check.py
index f0bb04f19..d1c676b41 100755
--- a/check.py
+++ b/check.py
@@ -96,8 +96,9 @@ def run_wasm_opt_tests():
binary = '.wasm' in t
base = os.path.basename(t).replace('.wast', '').replace('.wasm', '')
passname = base
- if passname.isdigit():
- passname = open(os.path.join(shared.get_test_dir('passes'), passname + '.passes')).read().strip()
+ passes_file = os.path.join(shared.get_test_dir('passes'), passname + '.passes')
+ if os.path.exists(passes_file):
+ passname = open(passes_file).read().strip()
opts = [('--' + p if not p.startswith('O') else '-' + p) for p in passname.split('_')]
actual = ''
for module, asserts in support.split_wast(t):