diff options
author | Daniel Agar <daniel@agar.ca> | 2015-01-05 18:34:13 -0500 |
---|---|---|
committer | Daniel Agar <daniel@agar.ca> | 2015-01-05 18:34:36 -0500 |
commit | 6287231fecded6b3329e28994d133c0246817864 (patch) | |
tree | a98956a12556d0594135dc0667b056e2fcb8feee | |
parent | 3efb1be48e7f5b3608a4bfef87a09748b3458c54 (diff) | |
download | px4-firmware-6287231fecded6b3329e28994d133c0246817864.tar.gz px4-firmware-6287231fecded6b3329e28994d133c0246817864.tar.bz2 px4-firmware-6287231fecded6b3329e28994d133c0246817864.zip |
cmake test harness output everything on failure
-rw-r--r-- | unittests/CMakeLists.txt | 12 | ||||
-rw-r--r-- | unittests/Makefile | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 7a7b2a731..b4a4ec423 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -14,20 +14,22 @@ add_definitions(-D__EXPORT=) set(CMAKE_C_FLAGS "-std=c99") set(CMAKE_CXX_FLAGS "-std=c++11 -Wno-write-strings") +# check +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure) + function(add_gtest) foreach(test_name ${ARGN}) target_link_libraries(${test_name} gtest_main) add_test(${test_name} ${test_name}) + add_dependencies(check ${test_name}) endforeach() endfunction() # add each test -# todo: add sbus2_test st24_test sf0x_test add_executable(autodeclination_test autodeclination_test.cpp ${CMAKE_SOURCE_DIR}/../src/lib/geo_lookup/geo_mag_declination.c) add_gtest(autodeclination_test) - # mixer_test add_executable(mixer_test mixer_test.cpp hrt.cpp ${CMAKE_SOURCE_DIR}/../src/modules/systemlib/mixer/mixer.cpp @@ -40,6 +42,8 @@ add_executable(mixer_test mixer_test.cpp hrt.cpp add_gtest(mixer_test) # conversion_test -add_executable(conversion_test conversion_test.cpp - ${CMAKE_SOURCE_DIR}/../src/systemcmds/tests/test_conv.cpp) +add_executable(conversion_test conversion_test.cpp ${CMAKE_SOURCE_DIR}/../src/systemcmds/tests/test_conv.cpp) add_gtest(conversion_test) + + +# todo: add sbus2_test st24_test sf0x_test diff --git a/unittests/Makefile b/unittests/Makefile index 0c50b3814..e1d2acacc 100644 --- a/unittests/Makefile +++ b/unittests/Makefile @@ -66,7 +66,7 @@ st24_test: $(ST24_FILES) cmake_gtests: mkdir -p build - cd build && CC=gcc cmake .. && $(MAKE) && $(MAKE) test + cd build && CC=gcc cmake .. && $(MAKE) check unittests: clean sbus2_test sf0x_test st24_test cmake_gtests ./sbus2_test |