From 03fa84df8b0e569ac3beb07d94268f5939cd684c Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Mon, 2 Nov 2020 16:24:40 -0500 Subject: [PATCH] Run status tool executable as test in tracetools Backport (with modification) of afee11747bfd548a43a368bd0e17fe73d8bf01f9 from !216 Signed-off-by: Christophe Bedard --- tracetools/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tracetools/CMakeLists.txt b/tracetools/CMakeLists.txt index df522cf..a4e7cc9 100644 --- a/tracetools/CMakeLists.txt +++ b/tracetools/CMakeLists.txt @@ -137,6 +137,15 @@ if(BUILD_TESTING) set(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS ${LTTNG_INCLUDE_DIRS}) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() + + if(TRACETOOLS_STATUS_CHECKING_TOOL) + # Run status tool executable as test and set pass/fail expectation appropriately + add_test(test_status_tool status) + if(NOT TRACETOOLS_LTTNG_ENABLED) + set_tests_properties(test_status_tool PROPERTIES WILL_FAIL TRUE) + endif() + endif() + endif() ament_package()