From b67d02bfb60cb123444d42b12cd0bce2acb75bcc Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Mon, 22 Sep 2014 11:20:43 +0200 Subject: [PATCH] Fix failing tests when enable_debug is not activated. Adds an alternative tesh file for logs --- buildtools/Cmake/AddTests.cmake | 10 ++++++++-- teshsuite/xbt/log_usage/CMakeLists.txt | 1 + teshsuite/xbt/log_usage/log_usage_ndebug.tesh | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 teshsuite/xbt/log_usage/log_usage_ndebug.tesh diff --git a/buildtools/Cmake/AddTests.cmake b/buildtools/Cmake/AddTests.cmake index 1a5cbbd4cb..c3459a7e04 100644 --- a/buildtools/Cmake/AddTests.cmake +++ b/buildtools/Cmake/AddTests.cmake @@ -179,7 +179,11 @@ ENDIF() ENDIF() ENDIF() ADD_TESH(tesh-xbt-parmap --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/parmap_test --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/parmap_test parmap_test.tesh) - ADD_TESH(tesh-xbt-log --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/log_usage --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_usage log_usage.tesh) + IF(enable_debug) + ADD_TESH(tesh-xbt-log --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/log_usage --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_usage log_usage.tesh) + ELSE() + ADD_TESH(tesh-xbt-log --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/log_usage --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_usage log_usage_ndebug.tesh) + ENDIF() ADD_TESH(tesh-xbt-graphxml --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/graphxml_usage --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/graphxml_usage graphxml_usage.tesh) ADD_TESH(tesh-xbt-heap --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/heap_bench --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/heap_bench heap_bench.tesh) #ADD_TESH(test-xbt-parmap --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/parmap_bench --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/parmap_bench parmap_bench.tesh) @@ -376,7 +380,9 @@ ENDIF() ENDIF() # https://gforge.inria.fr/tracker/index.php?func=detail&aid=17132&group_id=12&atid=165 ADD_TESH_FACTORIES(tesh-smpi-bug-17132 "thread" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132 --cd ${CMAKE_BINARY_DIR}/teshsuite/bug-17132 ${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132/bug-17132.tesh) - ADD_TESH_FACTORIES(tesh-smpi-bug-17132-surf-debug "thread" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132 --cd ${CMAKE_BINARY_DIR}/teshsuite/bug-17132 ${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132/bug-17132-surf-debug.tesh) + IF(enable_debug) + ADD_TESH_FACTORIES(tesh-smpi-bug-17132-surf-debug "thread" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132 --cd ${CMAKE_BINARY_DIR}/teshsuite/bug-17132 ${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132/bug-17132-surf-debug.tesh) + ENDIF() IF(HAVE_TRACING) ADD_TESH(tesh-smpi-replay-ti-tracing --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pingpong TI_output.tesh) ENDIF() diff --git a/teshsuite/xbt/log_usage/CMakeLists.txt b/teshsuite/xbt/log_usage/CMakeLists.txt index b271c983dc..38f5c8426c 100644 --- a/teshsuite/xbt/log_usage/CMakeLists.txt +++ b/teshsuite/xbt/log_usage/CMakeLists.txt @@ -14,6 +14,7 @@ endif() set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/log_usage.tesh + ${CMAKE_CURRENT_SOURCE_DIR}/log_usage_ndebug.tesh PARENT_SCOPE ) set(xml_files diff --git a/teshsuite/xbt/log_usage/log_usage_ndebug.tesh b/teshsuite/xbt/log_usage/log_usage_ndebug.tesh new file mode 100644 index 0000000000..40485cc813 --- /dev/null +++ b/teshsuite/xbt/log_usage/log_usage_ndebug.tesh @@ -0,0 +1,17 @@ +#! ./tesh + +$ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" +> [ 0.000000] [0:@] Test with the settings '' +> [ 0.000000] [0:@] val=2 +> [ 0.000000] [0:@] false alarm! +> [ 0.000000] [0:@] Test with the settings ' ' +> [ 0.000000] [0:@] val=2 +> [ 0.000000] [0:@] false alarm! +> [ 0.000000] [0:@] Test with the settings ' test.thres:info root.thres:info ' +> [ 0.000000] [0:@] val=2 +> [ 0.000000] [0:@] false alarm! +> [ 0.000000] [0:@] Test with the settings ' test.thres:verbose root.thres:error ' +> [ 0.000000] [0:@] val=2 +> [ 0.000000] [0:@] false alarm! +> [ 0.000000] [0:@] Test with the settings ' test.thres:critical ' +> [ 0.000000] [0:@] false alarm! -- 2.20.1