From 195699849519c98af906fc0e9c343e8e2f84b492 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 20 Mar 2025 14:45:46 -0700 Subject: [PATCH] [test] Remove test/spec/expected-output. NFC For some reason these 4 tests had expected output but no others. The spec tests work based on internal assertions so comparing output should not be needed. --- check.py | 17 +---------------- test/spec/expected-output/func_ptrs.wast.log | 1 - test/spec/expected-output/names.wast.log | 2 -- test/spec/expected-output/old_imports.wast.log | 10 ---------- test/spec/expected-output/old_start.wast.log | 2 -- 5 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 test/spec/expected-output/func_ptrs.wast.log delete mode 100644 test/spec/expected-output/names.wast.log delete mode 100644 test/spec/expected-output/old_imports.wast.log delete mode 100644 test/spec/expected-output/old_start.wast.log diff --git a/check.py b/check.py index 128cdae8b0f..f12779b8f43 100755 --- a/check.py +++ b/check.py @@ -198,17 +198,6 @@ def run_opt_test(wast): cmd = shared.WASM_OPT + [wast, '-O', '-all', '-q'] support.run_command(cmd) - def check_expected(actual, expected): - if expected and os.path.exists(expected): - expected = open(expected).read() - print(' (using expected output)') - actual = actual.strip() - expected = expected.strip() - if actual != expected: - shared.fail(actual, expected) - - expected = os.path.join(shared.get_test_dir('spec'), 'expected-output', base + '.log') - # some spec tests should fail (actual process failure, not just assert_invalid) try: actual = run_spec_test(wast) @@ -219,8 +208,6 @@ def check_expected(actual, expected): else: shared.fail_with_error(str(e)) - check_expected(actual, expected) - run_spec_test(wast) # check binary format. here we can verify execution of the final @@ -241,9 +228,7 @@ def check_expected(actual, expected): # add the asserts, and verify that the test still passes transformed_spec_file.write(result_wast + '\n' + '\n'.join(asserts)) - # compare all the outputs to the expected output - actual = run_spec_test(base) - check_expected(actual, os.path.join(shared.get_test_dir('spec'), 'expected-output', base + '.log')) + run_spec_test(base) def run_validator_tests(): diff --git a/test/spec/expected-output/func_ptrs.wast.log b/test/spec/expected-output/func_ptrs.wast.log deleted file mode 100644 index 8f757d3c048..00000000000 --- a/test/spec/expected-output/func_ptrs.wast.log +++ /dev/null @@ -1 +0,0 @@ -83 : i32 diff --git a/test/spec/expected-output/names.wast.log b/test/spec/expected-output/names.wast.log deleted file mode 100644 index b694f30336a..00000000000 --- a/test/spec/expected-output/names.wast.log +++ /dev/null @@ -1,2 +0,0 @@ -42 : i32 -123 : i32 diff --git a/test/spec/expected-output/old_imports.wast.log b/test/spec/expected-output/old_imports.wast.log deleted file mode 100644 index 59c70fea97a..00000000000 --- a/test/spec/expected-output/old_imports.wast.log +++ /dev/null @@ -1,10 +0,0 @@ -13 : i32 -14 : i32 -42 : f32 -13 : i32 -13 : i32 -24 : i64 -25 : i64 -53 : f64 -24 : i64 -24 : i64 diff --git a/test/spec/expected-output/old_start.wast.log b/test/spec/expected-output/old_start.wast.log deleted file mode 100644 index f74aa5848ac..00000000000 --- a/test/spec/expected-output/old_start.wast.log +++ /dev/null @@ -1,2 +0,0 @@ -1 : i32 -2 : i32