From 0bd0115d3ef410bbe3e817c1752a176a20ae32e3 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 11 Dec 2023 18:35:14 -0800 Subject: [PATCH 1/2] [test] Fix wasm2js stale check failure I tried to exclude wasm2js asserts tests from `check_for_stale_files` in #6164, but ended up doing it incorrectly. The file I checked for was `wasm2js.wast.asserts`, while the output I should have excluded was `wasm2js.asserts.js`. This fixes the code so we now check the prefix and not the filename. This is currently breaking the main branch, which was caused by me landing multiple PRs at once. Sorry for the breakage. Landing this will fix it. --- scripts/test/wasm2js.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/test/wasm2js.py b/scripts/test/wasm2js.py index 6463fa3a852..77386a5b953 100644 --- a/scripts/test/wasm2js.py +++ b/scripts/test/wasm2js.py @@ -41,9 +41,9 @@ def check_for_stale_files(): all_files = os.listdir(shared.get_test_dir('wasm2js')) for f in all_files: - if f in assert_tests: - continue prefix = f.split('.')[0] + if prefix in [t.split('.')[0] for t in assert_tests]: + continue if prefix not in all_tests: shared.fail_with_error('orphan test output: %s' % f) From a935dcc172b7d71dc4925a90d3210ee31f4fcc41 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 11 Dec 2023 18:40:47 -0800 Subject: [PATCH 2/2] lint --- scripts/test/wasm2js.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test/wasm2js.py b/scripts/test/wasm2js.py index 77386a5b953..cbae2216a9c 100644 --- a/scripts/test/wasm2js.py +++ b/scripts/test/wasm2js.py @@ -43,7 +43,7 @@ def check_for_stale_files(): for f in all_files: prefix = f.split('.')[0] if prefix in [t.split('.')[0] for t in assert_tests]: - continue + continue if prefix not in all_tests: shared.fail_with_error('orphan test output: %s' % f)