diff --git a/sys/embunit/TestRunner.c b/sys/embunit/TestRunner.c index d19f8e936c..bf448e7db0 100644 --- a/sys/embunit/TestRunner.c +++ b/sys/embunit/TestRunner.c @@ -99,7 +99,7 @@ void TestRunner_runTest(Test* test) Test_run(test, &result_); } -void TestRunner_end(void) +int TestRunner_end(void) { char buf[16]; if (result_.failureCount) { @@ -118,4 +118,6 @@ void TestRunner_end(void) stdimpl_print(buf); stdimpl_print(" tests)\n"); } + + return TestRunnerHadErrors; } diff --git a/sys/include/embUnit/TestRunner.h b/sys/include/embUnit/TestRunner.h index ba8b44a107..a469154c77 100644 --- a/sys/include/embUnit/TestRunner.h +++ b/sys/include/embUnit/TestRunner.h @@ -41,7 +41,7 @@ extern "C" { void TestRunner_start(void); void TestRunner_runTest(Test* test); -void TestRunner_end(void); +int TestRunner_end(void); extern int TestRunnerHadErrors;