diff options
Diffstat (limited to 'auto_update_tests.py')
-rwxr-xr-x | auto_update_tests.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py index c2cdc1601..10481cab5 100755 --- a/auto_update_tests.py +++ b/auto_update_tests.py @@ -6,7 +6,8 @@ from scripts.test.support import run_command, split_wast, node_test_glue, node_h from scripts.test.shared import ( ASM2WASM, MOZJS, NODEJS, S2WASM, WASM_SHELL, WASM_OPT, WASM_AS, WASM_DIS, WASM_CTOR_EVAL, WASM_MERGE, WASM_REDUCE, WASM2ASM, WASM_METADCE, - BINARYEN_INSTALL_DIR, has_shell_timeout) + WASM_LINK_METADATA, WASM_EMSCRIPTEN_FINALIZE, BINARYEN_INSTALL_DIR, + files_with_pattern, has_shell_timeout) from scripts.test.wasm2asm import tests, spec_tests, extra_tests, assert_tests print '[ processing and updating testcases... ]\n' @@ -72,6 +73,25 @@ for dot_s_dir in ['dot_s', 'llvm_autogenerated']: with open(expected_file, 'w') as o: o.write(actual) +print '\n[ checking wasm-link-metadata testcases... ]\n' + +for obj_path in files_with_pattern('test', 'lld', '*.o'): + print '..', obj_path + json_path = obj_path.replace('.o', '.json') + + cmd = WASM_LINK_METADATA + [obj_path] + actual = run_command(cmd) + with open(json_path, 'w') as o: o.write(actual) + +print '\n[ checking wasm-emscripten-finalize testcases... ]\n' + +for wast_path in files_with_pattern('test', 'lld', '*.wast'): + print '..', wast_path + out_path = wast_path + '.out' + cmd = WASM_EMSCRIPTEN_FINALIZE + [wast_path, '-S'] + actual = run_command(cmd) + with open(out_path, 'w') as o: o.write(actual) + for t in sorted(os.listdir(os.path.join('test', 'print'))): if t.endswith('.wast'): print '..', t |