diff options
author | Sam Clegg <sbc@chromium.org> | 2019-12-19 10:58:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-19 10:58:06 -0800 |
commit | 81c16df401347e8e067fe9ccf0c26ae532bc03d5 (patch) | |
tree | 87ca0baff5fdc5f6efb2a0031c5cd64b33075258 /scripts/test | |
parent | 4d28d3f32e7f213e300b24bc61c3f0ac9d6e1ab6 (diff) | |
download | binaryen-81c16df401347e8e067fe9ccf0c26ae532bc03d5.tar.gz binaryen-81c16df401347e8e067fe9ccf0c26ae532bc03d5.tar.bz2 binaryen-81c16df401347e8e067fe9ccf0c26ae532bc03d5.zip |
Revert "Fix renaming in FixInvokeFunctionNamesWalker (#2513)" (#2541)
This reverts commit f0a2e2c75c7bb3008f10b6edbb8dc4cfd27b7d28.
Diffstat (limited to 'scripts/test')
-rwxr-xr-x | scripts/test/generate_lld_tests.py | 16 | ||||
-rw-r--r-- | scripts/test/shared.py | 7 |
2 files changed, 10 insertions, 13 deletions
diff --git a/scripts/test/generate_lld_tests.py b/scripts/test/generate_lld_tests.py index 005e09f15..64fcff2ac 100755 --- a/scripts/test/generate_lld_tests.py +++ b/scripts/test/generate_lld_tests.py @@ -30,8 +30,8 @@ def files_with_extensions(path, extensions): yield file, ext -def generate_wat_files(llvm_bin, emscripten_root): - print('\n[ building wat files from C sources... ]\n') +def generate_wast_files(llvm_bin, emscripten_root): + print('\n[ building wast files from C sources... ]\n') lld_path = os.path.join(shared.options.binaryen_test, 'lld') for src_file, ext in files_with_extensions(lld_path, ['.c', '.cpp']): @@ -42,11 +42,11 @@ def generate_wat_files(llvm_bin, emscripten_root): obj_path = os.path.join(lld_path, obj_file) wasm_file = src_file.replace(ext, '.wasm') - wat_file = src_file.replace(ext, '.wat') + wast_file = src_file.replace(ext, '.wast') obj_path = os.path.join(lld_path, obj_file) wasm_path = os.path.join(lld_path, wasm_file) - wat_path = os.path.join(lld_path, wat_file) + wast_path = os.path.join(lld_path, wast_file) is_shared = 'shared' in src_file compile_cmd = [ @@ -70,10 +70,6 @@ def generate_wat_files(llvm_bin, emscripten_root): '--export', '__data_end', '--global-base=568', ] - # We had a regression where this test only worked if debug names - # were included. - if 'shared_longjmp' in src_file: - link_cmd.append('--strip-debug') if is_shared: compile_cmd.append('-fPIC') compile_cmd.append('-fvisibility=default') @@ -84,7 +80,7 @@ def generate_wat_files(llvm_bin, emscripten_root): try: support.run_command(compile_cmd) support.run_command(link_cmd) - support.run_command(shared.WASM_DIS + [wasm_path, '-o', wat_path]) + support.run_command(shared.WASM_DIS + [wasm_path, '-o', wast_path]) finally: # Don't need the .o or .wasm files, don't leave them around shared.delete_from_orbit(obj_path) @@ -95,4 +91,4 @@ if __name__ == '__main__': if len(shared.options.positional_args) != 2: print('Usage: generate_lld_tests.py [llvm/bin/dir] [path/to/emscripten]') sys.exit(1) - generate_wat_files(*shared.options.positional_args) + generate_wast_files(*shared.options.positional_args) diff --git a/scripts/test/shared.py b/scripts/test/shared.py index 44a8dcc52..1ec42bc59 100644 --- a/scripts/test/shared.py +++ b/scripts/test/shared.py @@ -87,7 +87,6 @@ def parse_args(args): options = parse_args(sys.argv[1:]) requested = options.positional_args -script_dir = os.path.dirname(os.path.abspath(__file__)) num_failures = 0 warnings = [] @@ -124,7 +123,8 @@ if not any(os.path.isfile(os.path.join(options.binaryen_bin, f)) # Locate Binaryen source directory if not specified. if not options.binaryen_root: - options.binaryen_root = os.path.dirname(os.path.dirname(script_dir)) + path_parts = os.path.abspath(__file__).split(os.path.sep) + options.binaryen_root = os.path.sep.join(path_parts[:-3]) options.binaryen_test = os.path.join(options.binaryen_root, 'test') @@ -207,7 +207,8 @@ if options.valgrind: def in_binaryen(*args): - return os.path.join(options.binaryen_root, *args) + __rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) + return os.path.join(__rootpath__, *args) os.environ['BINARYEN'] = in_binaryen() |