Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Disable tests failing when debug logs are disabled with enable_debug=OFF.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 22 Feb 2022 08:01:27 +0000 (09:01 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 22 Feb 2022 08:55:06 +0000 (09:55 +0100)
examples/smpi/CMakeLists.txt
examples/smpi/comm_dynamic_costs/CMakeLists.txt
teshsuite/s4u/dag-incomplete-simulation/dag-incomplete-simulation.tesh
teshsuite/xbt/log_usage/log_usage_ndebug.tesh

index 7c46e06..11a0a10 100644 (file)
@@ -99,8 +99,12 @@ if(enable_smpi)
   endif()
 
   ADD_TESH(smpi-tracing        --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/trace --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/trace --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/trace ${CMAKE_HOME_DIRECTORY}/examples/smpi/trace/trace.tesh)
-  ADD_TESH(smpi-simple-execute       --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/simple-execute --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/simple-execute --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/simple-execute ${CMAKE_HOME_DIRECTORY}/examples/smpi/simple-execute/simple-execute.tesh)
-  ADD_TESH(smpi-simple-execute-cpp-platf       --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/simple-execute --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/simple-execute --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv libdir=${CMAKE_BINARY_DIR}/lib --cd ${CMAKE_BINARY_DIR}/examples/smpi/simple-execute ${CMAKE_HOME_DIRECTORY}/examples/smpi/simple-execute/simple-execute-cpp-platf.tesh)
+  if(enable_debug)
+    ADD_TESH(smpi-simple-execute       --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/simple-execute --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/simple-execute --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/simple-execute ${CMAKE_HOME_DIRECTORY}/examples/smpi/simple-execute/simple-execute.tesh)
+    ADD_TESH(smpi-simple-execute-cpp-platf       --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/simple-execute --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/simple-execute --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv libdir=${CMAKE_BINARY_DIR}/lib --cd ${CMAKE_BINARY_DIR}/examples/smpi/simple-execute ${CMAKE_HOME_DIRECTORY}/examples/smpi/simple-execute/simple-execute-cpp-platf.tesh)
+  else()
+    message("-- Examples smpi-simple-execute disabled (built without debug).")
+  endif()
   ADD_TESH(smpi-tracing-simple --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/trace_simple --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/trace_simple --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/trace_simple ${CMAKE_HOME_DIRECTORY}/examples/smpi/trace_simple/trace_simple.tesh)
   ADD_TESH(smpi-tracing-call-location --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/trace_call_location --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/trace_call_location ${CMAKE_HOME_DIRECTORY}/examples/smpi/trace_call_location/trace_call_location.tesh)
   ADD_TESH(smpi-replay         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/replay.tesh)
index f98d9ba..1c1f77a 100644 (file)
@@ -6,7 +6,11 @@ if(enable_smpi)
   set_target_properties(smpi_comm-dynamic-cost
       PROPERTIES SUFFIX .so
   )
-  ADD_TESH_FACTORIES(smpi_comm-dynamic-cost "*" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/comm_dynamic_costs --setenv libdir=${CMAKE_BINARY_DIR}/lib --cd ${CMAKE_BINARY_DIR}/examples/smpi/simple-execute ${CMAKE_HOME_DIRECTORY}/examples/smpi/comm_dynamic_costs/comm-dynamic-cost.tesh)
+  if(enable_debug)
+    ADD_TESH_FACTORIES(smpi_comm-dynamic-cost "*" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/comm_dynamic_costs --setenv libdir=${CMAKE_BINARY_DIR}/lib --cd ${CMAKE_BINARY_DIR}/examples/smpi/simple-execute ${CMAKE_HOME_DIRECTORY}/examples/smpi/comm_dynamic_costs/comm-dynamic-cost.tesh)
+  else()
+    message("-- Examples smpi_comm-dynamic-cost (built without debug).")
+  endif()
   add_dependencies(tests smpi_comm-dynamic-cost)
   add_dependencies(smpi_comm-dynamic-cost smpi_simple-execute) #depends on simple-execute
 endif()
index 9c57d3b..22f4bf7 100644 (file)
@@ -1,5 +1,5 @@
 ! output sort
-$ ./dag-incomplete-simulation ${platfdir}/two_hosts_platform_shared.xml "--log=root.fmt:[%10.6r]%e%m%n" --log=s4u_activity.t:debug
+$ ./dag-incomplete-simulation ${platfdir}/two_hosts_platform_shared.xml "--log=root.fmt:[%10.6r]%e%m%n" --log=s4u_activity.t:verbose
 > [  0.000000] 'A' is assigned to a resource and all dependencies are solved. Let's start
 > [  0.000000] 'Init' is assigned to a resource and all dependencies are solved. Let's start
 > [  0.000000] Remove a dependency from 'Init' on 'A'
index 5fc588f..e787e9f 100644 (file)
@@ -1,5 +1,6 @@
 #!/usr/bin/env tesh
 
+p Check different log thresholds
 $ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > [  0.000000] [0:maestro@] Test with the settings ''
 > [  0.000000] [0:maestro@] val=2
@@ -15,3 +16,86 @@ $ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > [  0.000000] [0:maestro@] false alarm!
 > [  0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
 > [  0.000000] [0:maestro@] false alarm!
+
+p Check the "file" log appender
+$ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n" --log=root.app:file:${bindir:=.}/log_usage.log
+$ cat ${bindir:=.}/log_usage.log
+> [  0.000000] [0:maestro@] Test with the settings ''
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info  '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [  0.000000] [0:maestro@] false alarm!
+
+p Check the "rollfile" log appender
+$ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n" --log=root.app:rollfile:500:${bindir:=.}/log_usage.log
+$ cat ${bindir:=.}/log_usage.log
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [  0.000000] [0:maestro@] false alarm!
+>
+> [End of log]
+>ttings ' '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info  '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [  0.000000] [0:maestro@] val=2
+>
+>                    
+
+$ rm -f ${bindir:=.}/log_usage.log
+
+p Check the "splitfile" log appender
+$ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n" --log=root.app:splitfile:500:${bindir:=.}/log_usage_%.log
+$ cat ${bindir:=.}/log_usage_0.log
+> [  0.000000] [0:maestro@] Test with the settings ''
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info  '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [  0.000000] [0:maestro@] val=2
+
+$ cat ${bindir:=.}/log_usage_1.log
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [  0.000000] [0:maestro@] false alarm!
+
+$ rm -f ${bindir:=.}/log_usage_0.log ${bindir:=.}/log_usage_1.log
+
+p Check the "splitfile" log appender without percent in template
+$ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n" --log=root.app:splitfile:500:${bindir:=.}/log_usage.log.
+$ cat ${bindir:=.}/log_usage.log.0
+> [  0.000000] [0:maestro@] Test with the settings ''
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info  '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [  0.000000] [0:maestro@] val=2
+
+$ cat ${bindir:=.}/log_usage.log.1
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [  0.000000] [0:maestro@] false alarm!
+
+$ rm -f ${bindir:=.}/log_usage.log.0 ${bindir:=.}/log_usage.log.1