summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-12-10 16:59:18 -0500
committerAlon Zakai <alonzakai@gmail.com>2015-12-10 16:59:18 -0500
commitbfd65fee1403ca93e847ee2cbd109aca46d7e41c (patch)
tree4bf03606cca65d86c3e1c4917f1fadc0daa493f0 /check.py
parent3bb2ec9cbaece20ce5930db64aa82d2018bbc10d (diff)
downloadbinaryen-bfd65fee1403ca93e847ee2cbd109aca46d7e41c.tar.gz
binaryen-bfd65fee1403ca93e847ee2cbd109aca46d7e41c.tar.bz2
binaryen-bfd65fee1403ca93e847ee2cbd109aca46d7e41c.zip
process on s2wasm, and first working testcase
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/check.py b/check.py
index 5f745b15c..65d0549e9 100755
--- a/check.py
+++ b/check.py
@@ -212,6 +212,23 @@ for t in spec_tests:
if actual != expected:
fail(actual, expected)
+print '\n[ checking .s testcases... ]\n'
+
+for s in ['minimal.s']:
+ print '..', s
+ wasm = s.replace('.s', '.wast')
+ actual, err = subprocess.Popen([os.path.join('bin', 's2wasm'), os.path.join('test', 'dot_s', s)], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+ assert err == '', 'bad err:' + err
+
+ # verify output
+ expected_file = os.path.join('test', 'dot_s', wasm)
+ if not os.path.exists(expected_file):
+ print actual
+ raise Exception('output ' + expected_file + ' does not exist')
+ expected = open(expected_file).read()
+ if actual != expected:
+ fail(actual, expected)
+
print '\n[ checking example testcases... ]\n'
subprocess.check_call(['g++', '-std=c++11', os.path.join('test', 'example', 'find_div0s.cpp'), '-Isrc', '-g'])