Skip to content

Commit 37cf5df

Browse files
authored
Rename lld tests to finalize tests. NFC (#8395)
These tests are for checking the behavior of `wasm-emscripten-finalize`.
1 parent 1e36622 commit 37cf5df

79 files changed

Lines changed: 15 additions & 15 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from multiprocessing.pool import ThreadPool
2626
from pathlib import Path
2727

28-
from scripts.test import binaryenjs, lld, shared, support, wasm2js, wasm_opt
28+
from scripts.test import binaryenjs, finalize, shared, support, wasm2js, wasm_opt
2929

3030
assert sys.version_info >= (3, 10), 'requires Python 3.10'
3131

@@ -436,7 +436,7 @@ def wrapper(*args, **kwargs):
436436
'wasm-metadce': run_wasm_metadce_tests,
437437
'wasm-reduce': run_wasm_reduce_tests,
438438
'spec': run_spec_tests,
439-
'lld': lld.test_wasm_emscripten_finalize,
439+
'finalize': finalize.test_wasm_emscripten_finalize,
440440
'wasm2js': wasm2js.test_wasm2js,
441441
'validator': run_validator_tests,
442442
'example': run_example_tests,

scripts/auto_update_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import subprocess
1919
import sys
2020

21-
from test import binaryenjs, lld, shared, support, wasm2js, wasm_opt
21+
from test import binaryenjs, finalize, shared, support, wasm2js, wasm_opt
2222

2323

2424
def update_example_tests():
@@ -166,7 +166,7 @@ def update_lit_tests():
166166
'wasm-metadce': update_metadce_tests,
167167
'wasm-reduce': update_reduce_tests,
168168
'spec': update_spec_tests,
169-
'lld': lld.update_lld_tests,
169+
'finalize': finalize.update_finalize_tests,
170170
'wasm2js': wasm2js.update_wasm2js_tests,
171171
'binaryenjs': binaryenjs.update_binaryen_js_tests,
172172
'lit': update_lit_tests,
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ def run_test(input_path):
4848
def test_wasm_emscripten_finalize():
4949
print('\n[ checking wasm-emscripten-finalize testcases... ]\n')
5050

51-
for input_path in shared.get_tests(shared.get_test_dir('lld'), ['.wat', '.wasm']):
51+
for input_path in shared.get_tests(shared.get_test_dir('finalize'), ['.wat', '.wasm']):
5252
run_test(input_path)
5353

5454

55-
def update_lld_tests():
55+
def update_finalize_tests():
5656
print('\n[ updating wasm-emscripten-finalize testcases... ]\n')
5757

58-
for input_path in shared.get_tests(shared.get_test_dir('lld'), ['.wat', '.wasm']):
58+
for input_path in shared.get_tests(shared.get_test_dir('finalize'), ['.wat', '.wasm']):
5959
print('..', input_path)
6060
extension_arg_map = {
6161
'.out': [],
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ def files_with_extensions(path, extensions):
3333
def generate_wat_files(llvm_bin, emscripten_sysroot):
3434
print('\n[ building wat files from C sources... ]\n')
3535

36-
lld_path = os.path.join(shared.options.binaryen_test, 'lld')
37-
for src_file, ext in files_with_extensions(lld_path, ['.c', '.cpp', '.s']):
36+
test_path = os.path.join(shared.options.binaryen_test, 'finalize')
37+
for src_file, ext in files_with_extensions(test_path, ['.c', '.cpp', '.s']):
3838
print('..', src_file)
3939
obj_file = src_file.replace(ext, '.o')
4040

41-
src_path = os.path.join(lld_path, src_file)
42-
obj_path = os.path.join(lld_path, obj_file)
41+
src_path = os.path.join(test_path, src_file)
42+
obj_path = os.path.join(test_path, obj_file)
4343

4444
wasm_file = src_file.replace(ext, '.wasm')
4545
wat_file = src_file.replace(ext, '.wat')
4646

47-
obj_path = os.path.join(lld_path, obj_file)
48-
wasm_path = os.path.join(lld_path, wasm_file)
49-
wat_path = os.path.join(lld_path, wat_file)
47+
obj_path = os.path.join(test_path, obj_file)
48+
wasm_path = os.path.join(test_path, wasm_file)
49+
wat_path = os.path.join(test_path, wat_file)
5050
is_shared = 'shared' in src_file
5151
is_64 = '64' in src_file
5252

@@ -104,6 +104,6 @@ def generate_wat_files(llvm_bin, emscripten_sysroot):
104104

105105
if __name__ == '__main__':
106106
if len(shared.options.positional_args) != 2:
107-
print('Usage: generate_lld_tests.py [llvm/bin/dir] [path/to/emscripten]')
107+
print('Usage: generate_finalize_tests.py [llvm/bin/dir] [path/to/emscripten]')
108108
sys.exit(1)
109109
generate_wat_files(*shared.options.positional_args)

0 commit comments

Comments
 (0)