diff --git a/tests/unittests/Makefile b/tests/unittests/Makefile index 0044f13b2d..cc9bdd0217 100644 --- a/tests/unittests/Makefile +++ b/tests/unittests/Makefile @@ -35,6 +35,7 @@ INCLUDES += -I$(RIOTBASE)/tests/unittests/common # some tests need more stack CFLAGS += -DTHREAD_STACKSIZE_MAIN=THREAD_STACKSIZE_LARGE +CFLAGS += -DCONFIG_CORE_EXIT_WITH_MAIN=1 # for these boards, enable asan (Address Sanitizer) ASAN_BOARDS ?= native native64 diff --git a/tests/unittests/main.c b/tests/unittests/main.c index 99d8755ca4..0a4e087f15 100644 --- a/tests/unittests/main.c +++ b/tests/unittests/main.c @@ -49,7 +49,5 @@ int main(void) #ifndef NO_TEST_SUITES UNCURRY(RUN_TEST_SUITES, TEST_SUITES) #endif - TESTS_END(); - - return 0; + return TESTS_END(); }