diff options
Diffstat (limited to 'auto_update_tests.py')
-rwxr-xr-x | auto_update_tests.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py index ef96072de..9f9a877b0 100755 --- a/auto_update_tests.py +++ b/auto_update_tests.py @@ -29,27 +29,14 @@ from scripts.test import wasm_opt def update_example_tests(): print('\n[ checking example testcases... ]\n') - for t in shared.get_tests(shared.get_test_dir('example')): - basename = os.path.basename(t) + for src in shared.get_tests(shared.get_test_dir('example')): + basename = os.path.basename(src) output_file = os.path.join(shared.options.binaryen_bin, 'example') libdir = os.path.join(shared.BINARYEN_INSTALL_DIR, 'lib') cmd = ['-I' + os.path.join(shared.options.binaryen_root, 'src'), '-g', '-pthread', '-o', output_file] - if t.endswith('.txt'): - # check if there is a trace in the file, if so, we should build it - out = subprocess.Popen([os.path.join(shared.options.binaryen_root, 'scripts', 'clean_c_api_trace.py'), t], stdout=subprocess.PIPE).communicate()[0] - if len(out) == 0: - print(' (no trace in ', basename, ')') - continue - print(' (will check trace in ', basename, ')') - src = 'trace.cpp' - with open(src, 'wb') as o: - o.write(out) - expected = t + '.txt' - else: - src = t - expected = os.path.splitext(t)[0] + '.txt' if not src.endswith(('.c', '.cpp')): continue + expected = os.path.splitext(src)[0] + '.txt' # windows + gcc will need some work if shared.skip_if_on_windows('gcc'): return |