diff --git a/Makefile b/Makefile index 124c37fdb0..62fd43ffab 100644 --- a/Makefile +++ b/Makefile @@ -200,8 +200,12 @@ check_format: check: px4fmu-v1_default px4fmu-v2_default px4fmu-v4_default px4-stm32f4discovery_default check_format tests -tests: posix_sitl_default - @(cd unittests && ./run_tests.sh) +unittest: posix_sitl_default + @(cd unittests && cmake -G$(PX4_CMAKE_GENERATOR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) && ctest) + +tests: unittest + @make --no-print-directory px4fmu-v2_default test + @make --no-print-directory posix_sitl_default test package_firmware: @zip --junk-paths Firmware.zip `find . -name \*.px4` diff --git a/unittests/.gitignore b/unittests/.gitignore index e9d1bc3e01..4f34a742f7 100644 --- a/unittests/.gitignore +++ b/unittests/.gitignore @@ -15,3 +15,8 @@ CMakeFiles CTestTestfile.cmake cmake_install.cmake Makefile +.ninja_deps +.ninja_log +build.ninja +rules.ninja + diff --git a/unittests/run_tests.sh b/unittests/run_tests.sh deleted file mode 100755 index 979f8c95dd..0000000000 --- a/unittests/run_tests.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -cmake . -make --no-print-directory clean -make --no-print-directory all -j4 - -set -e - -#./param_test -./conversion_test -./autodeclination_test -./mixer_test 2> /dev/null -./sbus2_test -./rc_input_test