From f3f6ebc417ad861340a652ce8cb75b16e0dbd480 Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Mon, 9 May 2016 10:39:44 -0700 Subject: [PATCH] t-runner: Refactored wait loop --- tools/test-runner.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/test-runner.c b/tools/test-runner.c index f66972f3..1e84180f 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -1178,26 +1178,24 @@ start_next_test: print_test_status(py_test, TEST_STATUS_PASSED, interval); test_stats->num_passed++; - test_stats->py_run_time += interval; } else if (WIFSIGNALED(status)) { print_test_status(py_test, TEST_STATUS_TIMEDOUT, interval); test_stats->num_timedout++; - test_stats->py_run_time += interval; } else { print_test_status(py_test, TEST_STATUS_FAILED, interval); test_stats->num_failed++; - test_stats->py_run_time += interval; } + + test_stats->py_run_time += interval; + + break; } else if (WIFSTOPPED(status)) l_info("Process %d stopped with signal %d", corpse, WSTOPSIG(status)); else if (WIFCONTINUED(status)) l_info("Process %d continued", corpse); - - if (corpse == test_exec_pid) - break; } l_free(py_test);