summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xauto_update_tests.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py
index ee7d15d18..4fbe7f8ce 100755
--- a/auto_update_tests.py
+++ b/auto_update_tests.py
@@ -22,7 +22,7 @@ for t in sorted(os.listdir('test')):
if t.endswith('.wast') and not t.startswith('spec'):
print '..', t
t = os.path.join('test', t)
- actual, err = subprocess.Popen([os.path.join('bin', 'binaryen-shell'), t, '-print-before'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+ actual, err = subprocess.Popen([os.path.join('bin', 'binaryen-shell'), t, '--print-before'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
actual = actual.replace('printing before:\n', '')
open(t, 'w').write(actual)
@@ -39,15 +39,6 @@ for dot_s_dir in ['dot_s', 'llvm_autogenerated']:
expected_file = os.path.join('test', dot_s_dir, wasm)
open(expected_file, 'w').write(actual)
-for wasm in ['min.wast', 'hello_world.wast', 'unit.wast', 'emcc_O2_hello_world.wast', 'emcc_hello_world.wast']:
- if wasm.endswith('.wast'):
- print '..', wasm
- asm = wasm.replace('.wast', '.2asm.js')
- actual, err = subprocess.Popen([os.path.join('bin', 'wasm2asm'), os.path.join('test', wasm)], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
- assert err == '', 'bad err:' + err
- expected_file = os.path.join('test', asm)
- open(expected_file, 'w').write(actual)
-
for wasm in ['address.wast']:#os.listdir(os.path.join('test', 'spec')):
if wasm.endswith('.wast'):
print '..', wasm
@@ -63,7 +54,7 @@ for t in sorted(os.listdir(os.path.join('test', 'passes'))):
if t.endswith('.wast'):
print '..', t
passname = os.path.basename(t).replace('.wast', '')
- cmd = [os.path.join('bin', 'binaryen-shell'), '-print-after', '-' + passname, os.path.join('test', 'passes', t)]
+ cmd = [os.path.join('bin', 'binaryen-shell'), '--print-after', ('--' + passname if passname != 'O' else '-O'), os.path.join('test', 'passes', t)]
print ' ', ' '.join(cmd)
actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
open(os.path.join('test', 'passes', passname + '.txt'), 'w').write(actual)
@@ -71,7 +62,7 @@ for t in sorted(os.listdir(os.path.join('test', 'passes'))):
print '\n[ checking binary format testcases... ]\n'
for wast in sorted(os.listdir('test')):
- if wast.endswith('.wast') and not wast in ['unit.wast']: # blacklist some known failures
+ if wast.endswith('.wast') and not wast in []: # blacklist some known failures
cmd = [os.path.join('bin', 'wasm-as'), os.path.join('test', wast), '-o', 'a.wasm']
print ' '.join(cmd)
if os.path.exists('a.wasm'): os.unlink('a.wasm')