Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Convert to tesh
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 6 Jun 2007 15:19:29 +0000 (15:19 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 6 Jun 2007 15:19:29 +0000 (15:19 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3573 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/gras/chrono/Makefile.am
examples/gras/chrono/Makefile.in
examples/gras/chrono/test_rl.in
examples/gras/chrono/test_sg.in
examples/gras/timer/Makefile.am
examples/gras/timer/Makefile.in
examples/gras/timer/test_rl.in
examples/gras/timer/test_sg.in
examples/gras/timer/timer.c

index 05103c3..0425e11 100644 (file)
@@ -1,6 +1,7 @@
 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
index ff886de..fa244a5 100644 (file)
@@ -235,6 +235,7 @@ target_os = @target_os@
 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
index cf6e5c7..5474cd5 100755 (executable)
@@ -1,8 +1,3 @@
-#! @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 $@ 
index 1debfc9..01ea14d 100755 (executable)
@@ -1,8 +1,3 @@
-#! @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
index 4adfc5a..ce2e0cd 100644 (file)
@@ -2,6 +2,7 @@ INCLUDES= -I$(top_srcdir)/include
 AM_CFLAGS=-g
 
 TESTS= test_rl test_sg
+TESTS_ENVIRONMENT=../../../tools/tesh/tesh
 EXTRA_DIST=$(NAME).xml $(TESTS)
 
 # AUTOMAKE variable definition
index 3b2337d..2a07ab0 100644 (file)
@@ -233,6 +233,7 @@ target_os = @target_os@
 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
index 4f67277..1afa26c 100755 (executable)
@@ -1,8 +1,16 @@
-#! @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
index e54fb71..45abb4b 100755 (executable)
@@ -1,8 +1,16 @@
-#! @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
index 4f6b7e6..b46d388 100644 (file)
@@ -26,7 +26,7 @@ static void repetitive_action(void) {
    
    /* 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;
    }
    
@@ -35,7 +35,7 @@ static void repetitive_action(void) {
       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 */
@@ -44,8 +44,7 @@ static void repetitive_action(void) {
 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 */
@@ -57,26 +56,25 @@ int client(int argc,char *argv[]) {
   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();