summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@gmail.com>2018-03-23 14:08:06 -0400
committerAlon Zakai <alonzakai@gmail.com>2018-03-23 11:08:06 -0700
commit339548b048d4c58c9d488b33f78551e7ac14724c (patch)
treee90ce97d0f3981afa588a625383547f89257530c
parent9c2fa9247333233d3454c546677205b4a3c2e96a (diff)
downloadbinaryen-339548b048d4c58c9d488b33f78551e7ac14724c.tar.gz
binaryen-339548b048d4c58c9d488b33f78551e7ac14724c.tar.bz2
binaryen-339548b048d4c58c9d488b33f78551e7ac14724c.zip
fix auto_update_tests.py for wasm-opt (#1487)
After #1450, it looks like `auto_update_tests.py` was not changed to account for the new, updated expectations filename.
-rwxr-xr-xauto_update_tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py
index ab85c2efb..59982e581 100755
--- a/auto_update_tests.py
+++ b/auto_update_tests.py
@@ -109,7 +109,8 @@ for t in sorted(os.listdir(os.path.join('test', 'passes'))):
if t.endswith(('.wast', '.wasm')):
print '..', t
binary = '.wasm' in t
- passname = os.path.basename(t).replace('.wast', '').replace('.wasm', '')
+ base = os.path.basename(t).replace('.wast', '').replace('.wasm', '')
+ passname = base
if passname.isdigit():
passname = open(os.path.join('test', 'passes', passname + '.passes')).read().strip()
opts = [('--' + p if not p.startswith('O') else '-' + p) for p in passname.split('_')]
@@ -120,7 +121,7 @@ for t in sorted(os.listdir(os.path.join('test', 'passes'))):
with open('split.wast', 'w') as o: o.write(module)
cmd = WASM_OPT + opts + ['split.wast', '--print']
actual += run_command(cmd)
- with open(os.path.join('test', 'passes', passname + ('.bin' if binary else '') + '.txt'), 'w') as o: o.write(actual)
+ with open(os.path.join('test', 'passes', base + ('.bin' if binary else '') + '.txt'), 'w') as o: o.write(actual)
if 'emit-js-wrapper' in t:
with open('a.js') as i:
with open(t + '.js', 'w') as o: