Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add test for --cfg=simix/breakpoint.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 19 Apr 2018 21:32:29 +0000 (23:32 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 19 Apr 2018 21:32:29 +0000 (23:32 +0200)
examples/s4u/CMakeLists.txt
examples/s4u/app-pingpong/simix-breakpoint.tesh [new file with mode: 0644]

index 64eb278..73a0660 100644 (file)
@@ -51,6 +51,7 @@ endforeach()
 
 set(examples_src  ${examples_src}                                                                          PARENT_SCOPE)
 set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent.tesh
 
 set(examples_src  ${examples_src}                                                                          PARENT_SCOPE)
 set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent.tesh
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/simix-breakpoint.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/s4u-dht-kademlia.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/s4u-dht-kademlia.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime.tesh
@@ -110,3 +111,9 @@ foreach (example trace-platform)
                           --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
                           ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh)
 endforeach()
                           --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
                           ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh)
 endforeach()
+
+if (NOT enable_memcheck)
+  ADD_TESH(simix-breakpoint --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/app-pingpong
+                            --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
+                            ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/simix-breakpoint.tesh)
+endif()
diff --git a/examples/s4u/app-pingpong/simix-breakpoint.tesh b/examples/s4u/app-pingpong/simix-breakpoint.tesh
new file mode 100644 (file)
index 0000000..fb17d89
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/env tesh
+
+p Testing option --cfg=simix/breakpoint
+
+! expect signal SIGTRAP
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-app-pingpong$EXEEXT ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=simix/breakpoint:3.1416
+> [  0.000000] (0:maestro@) Configuration change: Set 'simix/breakpoint' to '3.1416'
+> [  0.000000] (1:pinger@Tremblay) Ping -> Jupiter
+> [  0.000000] (2:ponger@Jupiter) Pong -> Tremblay
+> [  0.019014] (2:ponger@Jupiter) Task received : small communication (latency bound)
+> [  0.019014] (2:ponger@Jupiter)  Ping time (latency bound) 0.019014
+> [  0.019014] (2:ponger@Jupiter) task_bw->data = 0.019