From 28a46d87c9ab3a941a0bbcd41172dbe8716660b9 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 11 Dec 2023 19:16:19 -0800 Subject: [PATCH] [test] Fix wasm2js stale check failure (#6168) 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. --- 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..cbae2216a9c 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)