Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix failing tests when enable_debug is not activated.
authorAugustin Degomme <augustin.degomme@imag.fr>
Mon, 22 Sep 2014 09:20:43 +0000 (11:20 +0200)
committerAugustin Degomme <augustin.degomme@imag.fr>
Mon, 22 Sep 2014 13:52:49 +0000 (15:52 +0200)
Adds an alternative tesh file for logs

buildtools/Cmake/AddTests.cmake
teshsuite/xbt/log_usage/CMakeLists.txt
teshsuite/xbt/log_usage/log_usage_ndebug.tesh [new file with mode: 0644]

index 1a5cbbd..c3459a7 100644 (file)
@@ -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()
index b271c98..38f5c84 100644 (file)
@@ -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 (file)
index 0000000..40485cc
--- /dev/null
@@ -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!