From 7316b0e7f2d0f2c29e4347da99d56f6fb8bea82c Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Sun, 28 Jul 2019 19:37:00 +0200 Subject: [PATCH] Example.DDS: Run example as unit test Part of #185 --- examples/dds/CMakeLists.txt | 6 ++++++ examples/dds/fairmq-start-ex-dds.sh.in | 3 +++ 2 files changed, 9 insertions(+) diff --git a/examples/dds/CMakeLists.txt b/examples/dds/CMakeLists.txt index 9972ecbe..abc3db8e 100644 --- a/examples/dds/CMakeLists.txt +++ b/examples/dds/CMakeLists.txt @@ -37,6 +37,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-ex-dds-env.sh ${CMAKE_CURRENT_ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-dds.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-dds.sh @ONLY) # test +add_test(NAME Example.DDS.localhost COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-dds.sh localhost) +set_tests_properties(Example.DDS.localhost PROPERTIES + TIMEOUT 15 + RUN_SERIAL true + PASS_REGULAR_EXPRESSION "Example successful" +) # install diff --git a/examples/dds/fairmq-start-ex-dds.sh.in b/examples/dds/fairmq-start-ex-dds.sh.in index 469c3489..a210ccff 100755 --- a/examples/dds/fairmq-start-ex-dds.sh.in +++ b/examples/dds/fairmq-start-ex-dds.sh.in @@ -82,4 +82,7 @@ logDir="${wrkDir}/logs" for file in $(find "${logDir}" -name "*.tar.gz"); do tar -xf ${file} -C "${logDir}" ; done echo "AGENT LOG FILES IN: ${logDir}" +# This string is used by ctest to detect success +echo "Example successful :)" + # Cleanup function is called by EXIT trap