From 72ef11eb79c4d91ffe00563da00fc7cd32c7a9de Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Mon, 18 Nov 2019 19:29:40 +0300 Subject: [PATCH] test.py: introduce add_test() to find_tests() To avoid code duplication, and to build upon later. --- test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index 30b86794fc..8370f77e70 100755 --- a/test.py +++ b/test.py @@ -276,10 +276,13 @@ def find_tests(args): prefix = os.path.join('build', mode, 'tests') standard_args = '--overprovisioned --unsafe-bypass-fsync 1 --blocked-reactor-notify-ms 2000000'.split() seastar_args = '-c2 -m2G'.split() + def add_test(test, kind): + tests_to_run.append((os.path.join(prefix, test), kind, custom_seastar_args.get(test, seastar_args) + standard_args)) + for test in other_tests: - tests_to_run.append((os.path.join(prefix, test), 'other', custom_seastar_args.get(test, seastar_args) + standard_args)) + add_test(test, 'other') for test in boost_tests: - tests_to_run.append((os.path.join(prefix, test), 'boost', custom_seastar_args.get(test, seastar_args) + standard_args)) + add_test(test, 'boost') if mode in ['release', 'dev']: tests_to_run.append(('build/' + mode + '/tests/lsa_async_eviction_test', 'other',