aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_tests.py
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2023-04-14 17:43:35 +0200
committerDave Wallace <dwallacelf@gmail.com>2023-04-25 15:46:42 +0000
commitc7d50475ecf53e8c65d875710c8a97be7dd11bd9 (patch)
tree276812b8e8ff5662849374024102d9fb7de54197 /test/run_tests.py
parentcffeca4f1e3c8de10a55aaf023de287448db8213 (diff)
tests: fix parallel runs skipping some tests
Fix corner case when a test would be skipped if it was not possible to start it due to insufficient cpus available in the middle of the loop. Type: fix Change-Id: Ie4580685ff55688375d649d7009131d9fe1e4f33 Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Diffstat (limited to 'test/run_tests.py')
-rw-r--r--test/run_tests.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/run_tests.py b/test/run_tests.py
index 3bbf1bc3153..2aa7b028ffc 100644
--- a/test/run_tests.py
+++ b/test/run_tests.py
@@ -430,7 +430,7 @@ def run_forked(testcase_suites):
stop_run = False
try:
- while wrapped_testcase_suites:
+ while wrapped_testcase_suites or testcase_suites:
finished_testcase_suites = set()
for wrapped_testcase_suite in wrapped_testcase_suites:
while wrapped_testcase_suite.result_parent_end.poll():
@@ -551,14 +551,16 @@ def run_forked(testcase_suites):
while testcase_suites:
results.append(TestResult(testcase_suites.pop(0)))
elif testcase_suites:
- a_suite = testcase_suites.pop(0)
+ a_suite = testcase_suites[0]
while a_suite and a_suite.is_tagged_run_solo:
+ testcase_suites.pop(0)
solo_testcase_suites.append(a_suite)
if testcase_suites:
- a_suite = testcase_suites.pop(0)
+ a_suite = testcase_suites[0]
else:
a_suite = None
if a_suite and can_run_suite(a_suite):
+ testcase_suites.pop(0)
run_suite(a_suite)
if solo_testcase_suites and tests_running == 0:
a_suite = solo_testcase_suites.pop(0)