Skip to content

Commit a7c84e2

Browse files
committed
Do not write assertions to split.wast for spec tests
As part of our running of spec tests, we split out each module in a test script into a separate text file for processing with wasm-opt. We previously included the test assertions corresponding to the module into that text file, where they were ignored by the legacy text parser. The new parser errors out due to the extra tokens after the module, though, so to avoid problems once we switch to the new parser, stop including the assertions in those text files. Also remove a nearby unused argument as a drive-by cleanup.
1 parent adca3a1 commit a7c84e2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ def check_expected(actual, expected):
242242
for module, asserts in support.split_wast(wast):
243243
print(' testing split module', split_num)
244244
split_num += 1
245-
support.write_wast('split.wast', module, asserts)
245+
support.write_wast('split.wast', module)
246246
run_opt_test('split.wast') # also that our optimizer doesn't break on it
247-
result_wast_file = shared.binary_format_check('split.wast', verify_final_result=False, original_wast=wast)
247+
result_wast_file = shared.binary_format_check('split.wast', verify_final_result=False)
248248
with open(result_wast_file) as f:
249249
result_wast = f.read()
250250
# add the asserts, and verify that the test still passes

scripts/test/shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def get_tests(test_dir, extensions=[], recursive=False):
457457
# check utilities
458458

459459
def binary_format_check(wast, verify_final_result=True, wasm_as_args=['-g'],
460-
binary_suffix='.fromBinary', original_wast=None):
460+
binary_suffix='.fromBinary'):
461461
# checks we can convert the wast to binary and back
462462

463463
print(' (binary format check)')

0 commit comments

Comments
 (0)