From 82e3850261d1a810b1d07f4af1ec2fbf6384021b Mon Sep 17 00:00:00 2001 From: JaySon-Huang Date: Thu, 2 Jul 2026 18:10:04 +0800 Subject: [PATCH 1/2] tests: add runtime_ms for interrupted cases Signed-off-by: JaySon-Huang --- tests/gtest_parallel.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/gtest_parallel.py b/tests/gtest_parallel.py index b62c09fbee8..096a89a5310 100755 --- a/tests/gtest_parallel.py +++ b/tests/gtest_parallel.py @@ -253,6 +253,7 @@ def run(self): try: self.exit_code = sigint_handler.wait(task) except sigint_handler.ProcessWasInterrupted: + self.runtime_ms = int(1000 * (time.time() - begin)) thread.exit() self.runtime_ms = int(1000 * (time.time() - begin)) self.last_execution_time = None if self.exit_code else self.runtime_ms @@ -366,13 +367,27 @@ def move_to(self, destination_dir, tasks): def print_tests(self, message, tasks, print_try_number): self.out.permanent_line("%s (%s/%s):" % (message, len(tasks), self.total_tasks)) + is_interrupted = message == 'INTERRUPTED TESTS' for task in sorted(tasks): + try_number_suffix = ( + (" (try #%d)" % task.execution_number) if print_try_number else "") + if is_interrupted: + if task.runtime_ms is not None: + self.out.permanent_line( + "Interrupted: %d ms: %s %s%s" % ( + task.runtime_ms, task.test_binary, task.test_name, + try_number_suffix)) + else: + self.out.permanent_line( + "Interrupted: %s %s%s" % ( + task.test_binary, task.test_name, try_number_suffix)) + continue + runtime_ms = 'Interrupted' if task.runtime_ms is not None: runtime_ms = '%d ms' % task.runtime_ms self.out.permanent_line("%11s: %s %s%s" % ( - runtime_ms, task.test_binary, task.test_name, - (" (try #%d)" % task.execution_number) if print_try_number else "")) + runtime_ms, task.test_binary, task.test_name, try_number_suffix)) def log_exit(self, task): with self.stdout_lock: From ab5be733cf01bcb1ac060e3c2c6c9d523583bfab Mon Sep 17 00:00:00 2001 From: JaySon-Huang Date: Thu, 2 Jul 2026 18:11:03 +0800 Subject: [PATCH 2/2] tests: enlarge gtest timeout to 90min Signed-off-by: JaySon-Huang --- tests/run-gtest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/run-gtest.sh b/tests/run-gtest.sh index 6d73c6a59aa..f9c831ce115 100755 --- a/tests/run-gtest.sh +++ b/tests/run-gtest.sh @@ -56,8 +56,8 @@ function run_test_parallel() { args="--gtest_break_on_failure --gtest_catch_exceptions=0" fi - # run with 60 min timeout - python ${SRC_TESTS_PATH}/gtest_parallel.py ${test_bins} --workers=${NPROC} ${args} --print_test_times --timeout=3600 + # run with 90 min timeout + python ${SRC_TESTS_PATH}/gtest_parallel.py ${test_bins} --workers=${NPROC} ${args} --print_test_times --timeout=5400 } set -e