INCLUDES= -I$(top_srcdir)/include
AM_CFLAGS=-g
TESTS= test_rl test_sg
+TESTS_ENVIRONMENT=../../../tools/tesh/tesh
EXTRA_DIST=chrono.xml
# AUTOMAKE variable definition
target_vendor = @target_vendor@
INCLUDES = -I$(top_srcdir)/include
TESTS = test_rl test_sg
+TESTS_ENVIRONMENT = ../../../tools/tesh/tesh
EXTRA_DIST = chrono.xml
chrono_simulator_SOURCES = _chrono_simulator.c chrono.c
chrono_simulator_LDADD = $(top_builddir)/src/libsimgrid.la
-#! @BASH@ -e
-if [ x@EXEEXT@ = x ] ; then
- exenv=$SG_TEST_EXENV
-else
- exenv=wine
-fi
-
-exec $exenv ./chrono_multiplier@EXEEXT@ $@
+
+! output display
+$ $SG_TEST_EXENV ./chrono_multiplier@EXEEXT@ --log=root.fmt:%m%n $@
-#! @BASH@
-if [ x@EXEEXT@ = x ] ; then
- exenv=$SG_TEST_EXENV
-else
- exenv=wine
-fi
-exec $exenv ./chrono_simulator@EXEEXT@ @top_srcdir@/examples/msg/small_platform.xml @srcdir@/chrono.xml
+! output display
+$ $SG_TEST_EXENV ./chrono_simulator@EXEEXT@ @top_srcdir@/examples/msg/small_platform.xml @srcdir@/chrono.xml
AM_CFLAGS=-g
TESTS= test_rl test_sg
+TESTS_ENVIRONMENT=../../../tools/tesh/tesh
EXTRA_DIST=$(NAME).xml $(TESTS)
# AUTOMAKE variable definition
target_vendor = @target_vendor@
INCLUDES = -I$(top_srcdir)/include
TESTS = test_rl test_sg
+TESTS_ENVIRONMENT = ../../../tools/tesh/tesh
EXTRA_DIST = $(NAME).xml $(TESTS)
timer_simulator_SOURCES = _timer_simulator.c timer.c
timer_simulator_LDADD = $(top_builddir)/src/libsimgrid.la
-#! @BASH@ -e
-if [ x@EXEEXT@ = x ] ; then
- exenv=$SG_TEST_EXENV
-else
- exenv=wine
-fi
-
-exec $exenv ./timer_client@EXEEXT@
+! set timeout 20
+$ $SG_TEST_EXENV ./timer_client@EXEEXT@ --log=root.fmt:%m%n
+> Programming the repetitive_action with a frequency of 1.000000 sec
+> Programming the delayed_action for after 2.000000 sec
+> Have a rest
+> Canceling the delayed_action.
+> Re-programming the delayed_action for after 2.000000 sec
+> Repetitive_action has nothing to do yet
+> Repetitive_action has nothing to do yet
+> delayed_action setting globals->still_to_do to 5
+> repetitive_action decrementing globals->still_to_do. New value: 4
+> repetitive_action decrementing globals->still_to_do. New value: 3
+> repetitive_action decrementing globals->still_to_do. New value: 2
+> repetitive_action decrementing globals->still_to_do. New value: 1
+> repetitive_action decrementing globals->still_to_do. New value: 0
+> Exiting GRAS
-#! @BASH@
-if [ x@EXEEXT@ = x ] ; then
- exenv=$SG_TEST_EXENV
-else
- exenv=wine
-fi
-exec $exenv ./timer_simulator@EXEEXT@ @top_srcdir@/examples/msg/small_platform.xml @srcdir@/timer.xml $@
+$ $SG_TEST_EXENV ./timer_simulator@EXEEXT@ @top_srcdir@/examples/msg/small_platform.xml @srcdir@/timer.xml $@
+> [Fafard:client:(1) 0.000000] [test/INFO] Programming the repetitive_action with a frequency of 1.000000 sec
+> [Fafard:client:(1) 0.000000] [test/INFO] Programming the delayed_action for after 2.000000 sec
+> [Fafard:client:(1) 0.000000] [test/INFO] Have a rest
+> [Fafard:client:(1) 1.000000] [test/INFO] Canceling the delayed_action.
+> [Fafard:client:(1) 1.000000] [test/INFO] Re-programming the delayed_action for after 2.000000 sec
+> [Fafard:client:(1) 1.000000] [test/INFO] Repetitive_action has nothing to do yet
+> [Fafard:client:(1) 2.000000] [test/INFO] Repetitive_action has nothing to do yet
+> [Fafard:client:(1) 2.000000] [test/INFO] delayed_action setting globals->still_to_do to 5
+> [Fafard:client:(1) 3.000000] [test/INFO] repetitive_action decrementing globals->still_to_do. New value: 4
+> [Fafard:client:(1) 4.000000] [test/INFO] repetitive_action decrementing globals->still_to_do. New value: 3
+> [Fafard:client:(1) 5.000000] [test/INFO] repetitive_action decrementing globals->still_to_do. New value: 2
+> [Fafard:client:(1) 6.000000] [test/INFO] repetitive_action decrementing globals->still_to_do. New value: 1
+> [Fafard:client:(1) 7.000000] [test/INFO] repetitive_action decrementing globals->still_to_do. New value: 0
+> [Fafard:client:(1) 7.000000] [gras/INFO] Exiting GRAS
/* Stop if nothing to do yet */
if (globals->still_to_do <= 0) {
- INFO1("[%.0f] Repetitive_action has nothing to do yet",gras_os_time());
+ INFO0("Repetitive_action has nothing to do yet");
return;
}
gras_timer_cancel_repeat(REPEAT_INTERVAL,repetitive_action);
}
- INFO2("[%.0f] repetitive_action decrementing globals->still_to_do. New value: %d",gras_os_time(),
+ INFO1("repetitive_action decrementing globals->still_to_do. New value: %d",
globals->still_to_do-1);
globals->still_to_do--; /* should be the last line of the action since value=0 stops the program */
static void delayed_action(void) {
my_globals *globals=(my_globals*)gras_userdata_get();
- INFO2("[%.0f] delayed_action setting globals->still_to_do to %d",
- gras_os_time(),LOOP_COUNT);
+ INFO1("delayed_action setting globals->still_to_do to %d",LOOP_COUNT);
globals->still_to_do = LOOP_COUNT;
} /* end_of_delayed_action */
globals=gras_userdata_new(my_globals);
globals->still_to_do = -1;
- INFO2("[%.0f] Programming the repetitive_action with a frequency of %f sec", gras_os_time(), REPEAT_INTERVAL);
+ INFO1("Programming the repetitive_action with a frequency of %f sec", REPEAT_INTERVAL);
gras_timer_repeat(REPEAT_INTERVAL,repetitive_action);
- INFO2("[%.0f] Programming the delayed_action for after %f sec", gras_os_time(), DELAY_INTERVAL);
+ INFO1("Programming the delayed_action for after %f sec", DELAY_INTERVAL);
gras_timer_delay(REPEAT_INTERVAL,delayed_action);
- INFO1("[%.0f] Have a rest", gras_os_time());
+ INFO0("Have a rest");
gras_os_sleep(DELAY_INTERVAL / 2.0);
- INFO1("[%.0f] Canceling the delayed_action.",gras_os_time());
+ INFO0("Canceling the delayed_action.");
gras_timer_cancel_delay(REPEAT_INTERVAL,delayed_action);
- INFO2("[%.0f] Re-programming the delayed_action for after %f sec", gras_os_time(),DELAY_INTERVAL);
+ INFO1("Re-programming the delayed_action for after %f sec",DELAY_INTERVAL);
gras_timer_delay(REPEAT_INTERVAL,delayed_action);
while (globals->still_to_do == -1 || /* Before delayed action runs */
globals->still_to_do > 0 /* after delayed_action, and not enough repetitive_action */) {
- DEBUG2("[%.0f] Prepare to handle messages for 5 sec (still_to_do=%d)",
- gras_os_time(), globals->still_to_do);
+ DEBUG1("Prepare to handle messages for 5 sec (still_to_do=%d)", globals->still_to_do);
gras_msg_handle(5.0);
}
gras_exit();