From 127a2902b1806c6b0f8d4ede4936ba9812483e84 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 3 Apr 2024 13:22:51 +0200 Subject: [PATCH] sys/embunit: return failure state in TextUIRunner_end() --- sys/embunit/TextUIRunner.c | 3 ++- sys/include/embUnit/TextUIRunner.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/embunit/TextUIRunner.c b/sys/embunit/TextUIRunner.c index 267faf946da9..9f8fd74da43f 100644 --- a/sys/embunit/TextUIRunner.c +++ b/sys/embunit/TextUIRunner.c @@ -101,7 +101,8 @@ void TextUIRunner_runTest(TestRef test) Outputter_printEndTest(outputterRef_,test); } -void TextUIRunner_end(void) +int TextUIRunner_end(void) { Outputter_printStatistics(outputterRef_,&result_); + return wasfailure_; } diff --git a/sys/include/embUnit/TextUIRunner.h b/sys/include/embUnit/TextUIRunner.h index 75892baa1107..c2a6d6fe1b29 100644 --- a/sys/include/embUnit/TextUIRunner.h +++ b/sys/include/embUnit/TextUIRunner.h @@ -47,7 +47,7 @@ void TextUIRunner_setOutputter(OutputterRef outputter); void TextUIRunner_startWithOutputter(OutputterRef outputter); void TextUIRunner_start(void); void TextUIRunner_runTest(TestRef test); -void TextUIRunner_end(void); +int TextUIRunner_end(void); #ifdef __cplusplus }