diff --git a/.travis.yml b/.travis.yml index 6e6a964a0..7f4b81538 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,10 +17,12 @@ install: - sudo apt-get install gcc-arm-none-eabi - sudo apt-get install gcc-msp430 - sudo apt-get install pcregrep libpcre3 + - sudo apt-get install qemu-system-x86 python3 script: - ./dist/tools/compile_test/compile_test.py - - make -C ./tests/unittests term + - make -C ./tests/unittests test BOARD=native + - make -C ./tests/unittests test BOARD=qemu-i386 - ./dist/tools/licenses/check.sh master notifications: diff --git a/tests/unittests/Makefile b/tests/unittests/Makefile index 709d0d442..eb328c3ce 100644 --- a/tests/unittests/Makefile +++ b/tests/unittests/Makefile @@ -40,3 +40,9 @@ ifeq (, $(UNIT_TESTS)) else CFLAGS += -DTEST_SUITES='$(subst $() $(),$(charCOMMA),$(UNIT_TESTS:tests-%=%))' endif + +test: SHELL=bash +test: + @exec 5>&1 && \ + LOG=$$("$(MAKE)" -s term | tee >(cat - >&5)) && \ + grep 'OK ([1-9][0-9]* tests)' <<< $${LOG} > /dev/null diff --git a/tests/unittests/main.c b/tests/unittests/main.c index b9869d75f..e21f64374 100644 --- a/tests/unittests/main.c +++ b/tests/unittests/main.c @@ -31,11 +31,6 @@ int main(void) #endif TESTS_END(); -#if defined (BOARD_NATIVE) && !defined (OUTPUT) - void _exit(int); - _exit(TestRunnerHadErrors); -#endif - lpm_set(LPM_POWERDOWN); return 0; }