From 835c3323038d9289268132f96fb9fe78304da3ee Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 28 Oct 2020 08:40:38 +0100 Subject: [PATCH] testing: Do not ignore the return value of RUN_ALL_TESTS Instead of ignoring the return value of RUN_ALL_TESTS, exit with the same status code. This will make failing tests actually fail the build, instead of logging the error, and then exiting successfully. Signed-off-by: Gergely Nagy --- testing/setup-googletest.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testing/setup-googletest.h b/testing/setup-googletest.h index 38852dbe..a79eb6db 100644 --- a/testing/setup-googletest.h +++ b/testing/setup-googletest.h @@ -36,7 +36,6 @@ /* Turn off virtual_io's input. */ \ Kaleidoscope.device().keyScanner().setEnableReadMatrix(false); \ testing::InitGoogleTest(); \ - /* We assign the return value of RUN_ALL_TESTS, to */ \ - /* silence a compiler warning. */ \ - int __ignore__ = RUN_ALL_TESTS(); \ + int result = RUN_ALL_TESTS(); \ + exit(result); \ }