From 98b618f09bc106d401c0045fa7252f1cd15bd3c0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 19 May 2023 14:28:51 -0700 Subject: [PATCH] Test runner: Allow randomMODEn for any test mode (#19401) Previously other and browser were hardcoded. This allows all modes to work. For example, with this PR you can do tests/runner.py randomwasmfs10 and it will run 10 random wasmfs.* tests. --- test/runner.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/runner.py b/test/runner.py index 3baf775eb970c..53c75f16afbfc 100755 --- a/test/runner.py +++ b/test/runner.py @@ -207,14 +207,12 @@ def get_random_test_parameters(arg): relevant_modes = passing_core_test_modes if len(arg): num_str = arg - if arg.startswith('other'): - base_module = 'other' - relevant_modes = ['other'] - num_str = arg.replace('other', '') - elif arg.startswith('browser'): - base_module = 'browser' - relevant_modes = ['browser'] - num_str = arg.replace('browser', '') + for mode in passing_core_test_modes + misc_test_modes: + if arg.startswith(mode): + base_module = mode + relevant_modes = [mode] + num_str = arg.replace(mode, '') + break num_tests = int(num_str) return num_tests, base_module, relevant_modes