Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't use tesh to run monkey tests
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 28 Feb 2022 11:12:16 +0000 (12:12 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 28 Feb 2022 11:25:46 +0000 (12:25 +0100)
It should make it easier to get it working on platforms where python is on some obscure path.

Also, test one arbitrary monkey run with enforcing the output, just to
make sure that the monkey is actually testing something.

teshsuite/s4u/CMakeLists.txt
teshsuite/s4u/monkey-masterworkers/monkey-masterworkers.cpp
teshsuite/s4u/monkey-masterworkers/monkey-masterworkers.tesh [deleted file]
tools/simgrid-monkey

index 5a59c54..86987b7 100644 (file)
@@ -52,6 +52,12 @@ foreach(x basic-link-test basic-parsing-test host-on-off host-on-off-actors host
   ADD_TESH(tesh-s4u-${x} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x} --setenv rootdir=${CMAKE_HOME_DIRECTORY} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x}/${x}.tesh)
 endforeach()
 
+# Monkey tests are launched directly, not with tesh
+foreach(x  monkey-masterworkers)
+  ADD_TEST(monkey-s4u-${x} "${PYTHON_EXECUTABLE}" ${CMAKE_HOME_DIRECTORY}/tools/simgrid-monkey ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x}/${x})
+endforeach()
+
+
 # The output is not relevant
 ADD_TEST(tesh-s4u-comm-pt2pt    ${CMAKE_BINARY_DIR}/teshsuite/s4u/comm-pt2pt/comm-pt2pt    ${CMAKE_HOME_DIRECTORY}/examples/platforms/cluster_backbone.xml)
 
index eb1f4d0..3504dbb 100644 (file)
@@ -31,7 +31,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example")
 static simgrid::config::Flag<int> cfg_host_count{"host-count", "Host count (master on one, workers on the others)", 3};
 static simgrid::config::Flag<double> cfg_deadline{"deadline", "When to fail the simulation (infinite loop detection)",
                                                   120};
-static simgrid::config::Flag<int> cfg_task_count{"task-count", "Amount of tasks that must be executed to succeed", 1};
+static simgrid::config::Flag<int> cfg_task_count{"task-count", "Amount of tasks that must be executed to succeed", 2};
 
 int todo; // remaining amount of tasks to execute, a global variable
 sg4::Mailbox* mailbox; // as a global to reduce the amount of simcalls during actor reboot
diff --git a/teshsuite/s4u/monkey-masterworkers/monkey-masterworkers.tesh b/teshsuite/s4u/monkey-masterworkers/monkey-masterworkers.tesh
deleted file mode 100644 (file)
index effbd26..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-! output display
-$ ${rootdir:=.}/tools/simgrid-monkey ${bindir:=.}/monkey-masterworkers
index cb6b117..aca8809 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/python3
+#! /usr/bin/env python3
 
 # The goal is to introduce random failures in a simulation, to test simgrid under extreme conditions.
 #