From b100074e1fe1c80f57fe295b7f05d6186e279004 Mon Sep 17 00:00:00 2001 From: Felix Herrmann Date: Mon, 25 May 2020 15:30:41 +0200 Subject: execute unittests with cmake now you can do make test after make :) === Sample build and test: $ cmake -Bbuild -H. \ -DDLT_IPC=UNIX_SOCKET \ -DWITH_DLT_ADAPTOR=ON \ -DWITH_DLT_UNIT_TESTS=ON \ -DWITH_DLT_CXX11_EXT=ON \ -DWITH_DLT_MONITOR=OFF \ -DWITH_DLT_USE_IPv6=OFF $ cd build $ make $ make test Running tests... Test project /home/fherrmann/git/dlt-daemon/build Start 1: gtest_dlt_common 1/5 Test #1: gtest_dlt_common ................. Passed 0.02 sec Start 2: gtest_dlt_user 2/5 Test #2: gtest_dlt_user ................... Passed 1.01 sec Start 3: gtest_dlt_daemon_common 3/5 Test #3: gtest_dlt_daemon_common .......... Passed 0.01 sec Start 4: dlt_env_ll_unit_test 4/5 Test #4: dlt_env_ll_unit_test ............. Passed 0.04 sec Start 5: gtest_dlt_daemon_event_handler 5/5 Test #5: gtest_dlt_daemon_event_handler ... Passed 1.01 sec 100% tests passed, 0 tests failed out of 5 Total Test time (real) = 2.09 sec === Signed-off-by: Felix Herrmann Signed-off-by: KHANH LUONG HONG DUY --- .travis/gtest_dlt_all.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to '.travis') diff --git a/.travis/gtest_dlt_all.sh b/.travis/gtest_dlt_all.sh index 4273859..1eeb231 100755 --- a/.travis/gtest_dlt_all.sh +++ b/.travis/gtest_dlt_all.sh @@ -41,15 +41,9 @@ function gtest_run_test() echo "$1 passed" } -pushd tests > /dev/null - -gtest_run_test gtest_dlt_common - -gtest_run_test gtest_dlt_user +CTEST_OUTPUT_ON_FAILURE=1 make test -gtest_run_test gtest_dlt_daemon_common - -gtest_run_test gtest_dlt_daemon_event_handler +pushd tests > /dev/null # Without General section in dlt_gateway.conf ./gtest_dlt_daemon_gateway.sh > /dev/null @@ -62,6 +56,4 @@ gtest_run_test gtest_dlt_daemon_gateway ./gtest_dlt_daemon_logstorage.sh > /dev/null gtest_run_test gtest_dlt_daemon_offline_log -gtest_run_test dlt_env_ll_unit_test - popd > /dev/null -- cgit v1.2.1