summaryrefslogtreecommitdiff
path: root/scripts/test
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2023-11-27 11:42:23 -0800
committerGitHub <noreply@github.com>2023-11-27 11:42:23 -0800
commite0314900bcf19be95d59dfdf695874d966f4ef4a (patch)
tree8032efa4bc33ecc5ed31fcf11bbf8dd1677e1ba1 /scripts/test
parentc5db74cae9bc0c46065ad1ec9f3ec48772d09784 (diff)
downloadbinaryen-e0314900bcf19be95d59dfdf695874d966f4ef4a.tar.gz
binaryen-e0314900bcf19be95d59dfdf695874d966f4ef4a.tar.bz2
binaryen-e0314900bcf19be95d59dfdf695874d966f4ef4a.zip
[wasm-emscripten-finalize] Remove --separate-data-segments (#6091)
See #6088
Diffstat (limited to 'scripts/test')
-rw-r--r--scripts/test/lld.py49
1 files changed, 12 insertions, 37 deletions
diff --git a/scripts/test/lld.py b/scripts/test/lld.py
index 4f1bbc0ee..91c7e57d6 100644
--- a/scripts/test/lld.py
+++ b/scripts/test/lld.py
@@ -18,7 +18,7 @@ from . import support
def args_for_finalize(filename):
- ret = ['--global-base=568']
+ ret = []
if 'safe_stack' in filename:
ret += ['--check-stack-overflow']
if 'shared' in filename:
@@ -30,38 +30,19 @@ def args_for_finalize(filename):
def run_test(input_path):
print('..', input_path)
- is_passive = '.passive.' in input_path
- mem_file = input_path + '.mem'
- extension_arg_map = {
- '.out': [],
- }
- if not is_passive:
- extension_arg_map.update({
- '.mem.out': ['--separate-data-segments', mem_file],
- })
- for ext, args in extension_arg_map.items():
- expected_file = input_path + ext
- if not os.path.exists(expected_file):
- if ext == '.out':
- shared.fail_with_error('output ' + expected_file +
- ' does not exist')
- else:
- continue
-
- cmd = shared.WASM_EMSCRIPTEN_FINALIZE + args
- if '64' in input_path:
- cmd += ['--enable-memory64', '--bigint']
- cmd += [input_path, '-S']
- cmd += args_for_finalize(os.path.basename(input_path))
- actual = support.run_command(cmd)
+ expected_file = input_path + '.out'
+ if not os.path.exists(expected_file):
+ shared.fail_with_error('output ' + expected_file +
+ ' does not exist')
- shared.fail_if_not_identical_to_file(actual, expected_file)
+ cmd = list(shared.WASM_EMSCRIPTEN_FINALIZE)
+ if '64' in input_path:
+ cmd += ['--enable-memory64', '--bigint']
+ cmd += [input_path, '-S']
+ cmd += args_for_finalize(os.path.basename(input_path))
+ actual = support.run_command(cmd)
- if ext == '.mem.out':
- with open(mem_file) as mf:
- mem = mf.read()
- shared.fail_if_not_identical_to_file(mem, input_path + '.mem.mem')
- os.remove(mem_file)
+ shared.fail_if_not_identical_to_file(actual, expected_file)
def test_wasm_emscripten_finalize():
@@ -76,15 +57,9 @@ def update_lld_tests():
for input_path in shared.get_tests(shared.get_test_dir('lld'), ['.wat', '.wasm']):
print('..', input_path)
- is_passive = '.passive.' in input_path
- mem_file = input_path + '.mem'
extension_arg_map = {
'.out': [],
}
- if not is_passive:
- extension_arg_map.update({
- '.mem.out': ['--separate-data-segments', mem_file + '.mem'],
- })
for ext, ext_args in extension_arg_map.items():
out_path = input_path + ext
if ext != '.out' and not os.path.exists(out_path):