diff options
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -450,6 +450,23 @@ for wasm in tests + [os.path.join('spec', name) for name in ['address.wast']]:#s fail_if_not_contained(err, 'Successfully compiled asm.js code') ''' +if has_node: + print '\n[ checking binaryen.js testcases... ]\n' + + for s in sorted(os.listdir(os.path.join('test', 'binaryen.js'))): + if not s.endswith('.js'): continue + print s + f = open('a.js', 'w') + f.write(open(os.path.join('bin', 'binaryen.js')).read()) + f.write(open(os.path.join('test', 'binaryen.js', s)).read()) + f.close() + proc = subprocess.Popen([has_node, 'a.js'], stdout=subprocess.PIPE) + out, err = proc.communicate() + assert proc.returncode == 0 + expected = open(os.path.join('test', 'binaryen.js', s + '.txt')).read() + if expected not in out: + fail(out, expected) + print '\n[ checking .s testcases... ]\n' for dot_s_dir in ['dot_s', 'llvm_autogenerated']: |