From 52e64891aaf7d642347496ee83a419e61918e91b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 17 Jan 2013 12:39:56 +0200 Subject: [PATCH] shared: Fix missing removal of test timeout for success/failure --- src/shared/tester.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/shared/tester.c b/src/shared/tester.c index aa057bc96..a41b226f2 100644 --- a/src/shared/tester.c +++ b/src/shared/tester.c @@ -471,6 +471,11 @@ void tester_test_passed(void) if (test->stage != TEST_STAGE_RUN) return; + if (test->timeout_id > 0) { + g_source_remove(test->timeout_id); + test->timeout_id = 0; + } + test->result = TEST_RESULT_PASSED; print_progress(test->name, COLOR_GREEN, "test passed"); @@ -489,6 +494,11 @@ void tester_test_failed(void) if (test->stage != TEST_STAGE_RUN) return; + if (test->timeout_id > 0) { + g_source_remove(test->timeout_id); + test->timeout_id = 0; + } + test->result = TEST_RESULT_FAILED; print_progress(test->name, COLOR_RED, "test failed"); -- 2.47.3