diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-12-10 16:59:18 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-12-10 16:59:18 -0500 |
commit | bfd65fee1403ca93e847ee2cbd109aca46d7e41c (patch) | |
tree | 4bf03606cca65d86c3e1c4917f1fadc0daa493f0 /check.py | |
parent | 3bb2ec9cbaece20ce5930db64aa82d2018bbc10d (diff) | |
download | binaryen-bfd65fee1403ca93e847ee2cbd109aca46d7e41c.tar.gz binaryen-bfd65fee1403ca93e847ee2cbd109aca46d7e41c.tar.bz2 binaryen-bfd65fee1403ca93e847ee2cbd109aca46d7e41c.zip |
process on s2wasm, and first working testcase
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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']) |