From 5971fdb1865ddb921a4a51aaa1e0e9d5276cac1d Mon Sep 17 00:00:00 2001 From: "Magomed Kostoev (mkostoevr)" Date: Fri, 26 Nov 2021 21:56:18 +0000 Subject: [PATCH] [KERNEL][TEST] Run serial tests in separated thread git-svn-id: svn://kolibrios.org@9323 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/runtests.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kernel/trunk/runtests.py b/kernel/trunk/runtests.py index 59d72e7481..61df5eb24e 100755 --- a/kernel/trunk/runtests.py +++ b/kernel/trunk/runtests.py @@ -131,7 +131,7 @@ def collect_tests(): tests.append(test_folder_path) return tests -def run_tests_serially(tests, root_dir): +def run_tests_serially_thread(test, root_dir): test_number = 1 for test in tests: test_dir = f"{root_dir}/{test}" @@ -153,6 +153,11 @@ def run_tests_serially(tests, root_dir): test_number += 1 +def run_tests_serially(tests, root_dir): + thread = Thread(target = run_tests_serially_thread, args = (tests, root_dir)) + thread.start() + return thread + if __name__ == "__main__": root_dir = os.getcwd() @@ -163,4 +168,6 @@ if __name__ == "__main__": prepare_test_img() tests = collect_tests() - run_tests_serially(tests, root_dir) + serial_executor_thread = run_tests_serially(tests, root_dir) + serial_executor_thread.join() +