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:09:49 +0000 (15:09 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 6 Jun 2007 15:09:49 +0000 (15:09 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3572 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/gras/rpc/Makefile.am
examples/gras/rpc/Makefile.in
examples/gras/rpc/rpc.c
examples/gras/rpc/test_rl.in
examples/gras/rpc/test_sg.in

index 36e260b..c816f9e 100644 (file)
@@ -1,5 +1,7 @@
 INCLUDES= -I$(top_srcdir)/include
 TESTS= test_rl test_sg
 INCLUDES= -I$(top_srcdir)/include
 TESTS= test_rl test_sg
+TESTS_ENVIRONMENT=../../../tools/tesh/tesh
+
 EXTRA_DIST=rpc.xml $(TESTS)
 
 # AUTOMAKE variable definition
 EXTRA_DIST=rpc.xml $(TESTS)
 
 # AUTOMAKE variable definition
index 3dfd0e9..de02165 100644 (file)
@@ -241,6 +241,7 @@ target_os = @target_os@
 target_vendor = @target_vendor@
 INCLUDES = -I$(top_srcdir)/include
 TESTS = test_rl test_sg
 target_vendor = @target_vendor@
 INCLUDES = -I$(top_srcdir)/include
 TESTS = test_rl test_sg
+TESTS_ENVIRONMENT = ../../../tools/tesh/tesh
 EXTRA_DIST = rpc.xml $(TESTS)
 rpc_simulator_SOURCES = _rpc_simulator.c rpc.c
 rpc_simulator_LDADD = $(top_builddir)/src/libsimgrid.la
 EXTRA_DIST = rpc.xml $(TESTS)
 rpc_simulator_SOURCES = _rpc_simulator.c rpc.c
 rpc_simulator_LDADD = $(top_builddir)/src/libsimgrid.la
index 3248639..14e27e4 100644 (file)
@@ -109,7 +109,7 @@ int client(int argc,char *argv[]) {
   register_messages();
 
   /* 6. Keep the user informed of what's going on */
   register_messages();
 
   /* 6. Keep the user informed of what's going on */
-  INFO2("Connected to server which is on %s:%d ", 
+  INFO2("Connected to server which is on %s:%d",
        gras_socket_peer_name(toserver),gras_socket_peer_port(toserver));
 
   /* 7. Prepare and send the ping message to the server */
        gras_socket_peer_name(toserver),gras_socket_peer_port(toserver));
 
   /* 7. Prepare and send the ping message to the server */
@@ -124,7 +124,7 @@ int client(int argc,char *argv[]) {
   exception_catching();
 
   /* 8. Keep the user informed of what's going on, again */
   exception_catching();
 
   /* 8. Keep the user informed of what's going on, again */
-  INFO4("The answer to PING(%d) on %s:%d is PONG(%d)  ", 
+  INFO4("The answer to PING(%d) on %s:%d is PONG(%d)",
        ping, 
        gras_socket_peer_name(toserver),gras_socket_peer_port(toserver),
        pong);
        ping, 
        gras_socket_peer_name(toserver),gras_socket_peer_port(toserver),
        pong);
@@ -301,7 +301,7 @@ static int server_cb_ping(gras_msg_cb_ctx_t ctx,
   gras_socket_t expeditor = gras_msg_cb_ctx_from(ctx);
    
   /* 2. Log which client connected */
   gras_socket_t expeditor = gras_msg_cb_ctx_from(ctx);
    
   /* 2. Log which client connected */
-  INFO3("Got message PING(%d) from %s:%d ", 
+  INFO3("Got message PING(%d) from %s:%d",
        msg, 
        gras_socket_peer_name(expeditor), gras_socket_peer_port(expeditor));
   
        msg, 
        gras_socket_peer_name(expeditor), gras_socket_peer_port(expeditor));
   
@@ -346,7 +346,7 @@ int server (int argc,char *argv[]) {
   gras_cb_register("raise exception",&server_cb_raise_ex);
   gras_cb_register("kill",&server_cb_kill);
 
   gras_cb_register("raise exception",&server_cb_raise_ex);
   gras_cb_register("kill",&server_cb_kill);
 
-  INFO1("Listening on port %d ", gras_socket_my_port(mysock));
+  INFO1("Listening on port %d", gras_socket_my_port(mysock));
 
   /* 5. Wait for the ping incomming messages */
   
 
   /* 5. Wait for the ping incomming messages */
   
index 56fa246..aea8eac 100755 (executable)
@@ -1,11 +1,47 @@
-#! @BASH@ -e
-if [ x@EXEEXT@ = x ] ; then 
-#  exenv="libtool --mode=execute valgrind --show-reachable=yes --run-libc-freeres=no "
-  exenv=$SG_TEST_EXENV
-else
-  exenv=wine
-fi
-    
-$exenv ./rpc_server@EXEEXT@ 4002 $@ &
-$exenv ./rpc_forwarder@EXEEXT@ 4003 127.0.0.1 4002 $@ &
-$exenv ./rpc_client@EXEEXT@ 127.0.0.1 4002 127.0.0.1 4003 $@
+& $SG_TEST_EXENV ./rpc_server@EXEEXT@ 4002 --log=root.fmt:%m%n $@
+> Launch server (port=4002)
+> Listening on port 4002
+> Got message PING(1234) from 127.0.0.1:0
+> Answered with PONG(4321)
+> Asked to die by 127.0.0.1:0
+> Done.
+> Exiting GRAS
+
+& $SG_TEST_EXENV ./rpc_forwarder@EXEEXT@ 4003 127.0.0.1 4002 --log=root.fmt:%m%n $@
+> Launch forwarder (port=4003)
+> Forward a request
+> Forward a request
+> Forward a request
+> Forward a request
+> Forward a request
+> Asked to die by 127.0.0.1:0
+> Done.
+> Exiting GRAS
+
+& $SG_TEST_EXENV ./rpc_client@EXEEXT@ 127.0.0.1 4002 127.0.0.1 4003 --log=root.fmt:%m%n $@
+> Launch client (server on 127.0.0.1:4002)
+> Connected to 127.0.0.1:4002.
+> Connected to server which is on 127.0.0.1:4002
+> The answer to PING(1234) on 127.0.0.1:4002 is PONG(4321)
+> Call the exception raising RPC
+> Got the expected exception when calling the exception raising RPC
+> Called the exception raising RPC
+> Call the exception raising RPC (i=0)
+> Call the exception raising RPC (i=1)
+> Call the exception raising RPC (i=2)
+> Call the exception raising RPC (i=3)
+> Call the exception raising RPC (i=4)
+> Call the exception raising RPC on the forwarder (i=0)
+> Got the expected exception when calling the exception raising RPC
+> Call the exception raising RPC on the forwarder (i=1)
+> Got the expected exception when calling the exception raising RPC
+> Call the exception raising RPC on the forwarder (i=2)
+> Got the expected exception when calling the exception raising RPC
+> Call the exception raising RPC on the forwarder (i=3)
+> Got the expected exception when calling the exception raising RPC
+> Call the exception raising RPC on the forwarder (i=4)
+> Got the expected exception when calling the exception raising RPC
+> Ask 127.0.0.1:4003 to die
+> Ask 127.0.0.1:4002 to die
+> Done.
+> Exiting GRAS
index 34e918e..94149e6 100755 (executable)
@@ -1,9 +1,44 @@
-#! @BASH@
-if [ x@EXEEXT@ = x ] ; then 
-  exenv=$SG_TEST_EXENV
-else
-  exenv=wine
-fi
-
-exec $exenv ./rpc_simulator@EXEEXT@ @top_srcdir@/examples/msg/small_platform.xml @srcdir@/rpc.xml $@
+$ $SG_TEST_EXENV ./rpc_simulator@EXEEXT@ @top_srcdir@/examples/msg/small_platform.xml @srcdir@/rpc.xml $@
+> [Tremblay:server:(1) 0.000000] [Rpc/INFO] Launch server (port=4000)
+> [Tremblay:server:(1) 0.000000] [Rpc/INFO] Listening on port 4000
+> [Ginette:forwarder:(2) 0.000000] [Rpc/INFO] Launch forwarder (port=4000)
+> [Fafard:client:(3) 0.000000] [Rpc/INFO] Launch client (server on Tremblay:4000)
+> [Fafard:client:(3) 2.000000] [Rpc/INFO] Connected to Tremblay:4000.
+> [Fafard:client:(3) 2.000000] [Rpc/INFO] Connected to server which is on Tremblay:4000
+> [Tremblay:server:(1) 2.001977] [Rpc/INFO] Got message PING(1234) from Fafard:0
+> [Tremblay:server:(1) 2.003954] [Rpc/INFO] Answered with PONG(4321)
+> [Fafard:client:(3) 2.003954] [Rpc/INFO] The answer to PING(1234) on Tremblay:4000 is PONG(4321)
+> [Fafard:client:(3) 2.003954] [Rpc/INFO] Call the exception raising RPC
+> [Fafard:client:(3) 2.008017] [Rpc/INFO] Got the expected exception when calling the exception raising RPC
+> [Fafard:client:(3) 2.008017] [Rpc/INFO] Called the exception raising RPC
+> [Fafard:client:(3) 2.008017] [Rpc/INFO] Call the exception raising RPC (i=0)
+> [Fafard:client:(3) 2.012080] [Rpc/INFO] Call the exception raising RPC (i=1)
+> [Fafard:client:(3) 2.016144] [Rpc/INFO] Call the exception raising RPC (i=2)
+> [Fafard:client:(3) 2.020207] [Rpc/INFO] Call the exception raising RPC (i=3)
+> [Fafard:client:(3) 2.024270] [Rpc/INFO] Call the exception raising RPC (i=4)
+> [Fafard:client:(3) 2.028333] [Rpc/INFO] Call the exception raising RPC on the forwarder (i=0)
+> [Ginette:forwarder:(2) 2.029593] [Rpc/INFO] Forward a request
+> [Fafard:client:(3) 2.033540] [Rpc/INFO] Got the expected exception when calling the exception raising RPC
+> [Fafard:client:(3) 2.033540] [Rpc/INFO] Call the exception raising RPC on the forwarder (i=1)
+> [Ginette:forwarder:(2) 2.034800] [Rpc/INFO] Forward a request
+> [Fafard:client:(3) 2.038747] [Rpc/INFO] Got the expected exception when calling the exception raising RPC
+> [Fafard:client:(3) 2.038747] [Rpc/INFO] Call the exception raising RPC on the forwarder (i=2)
+> [Ginette:forwarder:(2) 2.040007] [Rpc/INFO] Forward a request
+> [Fafard:client:(3) 2.043954] [Rpc/INFO] Got the expected exception when calling the exception raising RPC
+> [Fafard:client:(3) 2.043954] [Rpc/INFO] Call the exception raising RPC on the forwarder (i=3)
+> [Ginette:forwarder:(2) 2.045214] [Rpc/INFO] Forward a request
+> [Fafard:client:(3) 2.049161] [Rpc/INFO] Got the expected exception when calling the exception raising RPC
+> [Fafard:client:(3) 2.049161] [Rpc/INFO] Call the exception raising RPC on the forwarder (i=4)
+> [Ginette:forwarder:(2) 2.050421] [Rpc/INFO] Forward a request
+> [Fafard:client:(3) 2.054368] [Rpc/INFO] Got the expected exception when calling the exception raising RPC
+> [Fafard:client:(3) 2.054368] [Rpc/INFO] Ask Ginette:4000 to die
+> [Fafard:client:(3) 2.055628] [Rpc/INFO] Ask Tremblay:4000 to die
+> [Ginette:forwarder:(2) 2.055628] [Rpc/INFO] Asked to die by Fafard:0
+> [Ginette:forwarder:(2) 2.055628] [Rpc/INFO] Done.
+> [Ginette:forwarder:(2) 2.055628] [gras/INFO] Exiting GRAS
+> [Fafard:client:(3) 2.057604] [Rpc/INFO] Done.
+> [Fafard:client:(3) 2.057604] [gras/INFO] Exiting GRAS
+> [Tremblay:server:(1) 2.057604] [Rpc/INFO] Asked to die by Fafard:0
+> [Tremblay:server:(1) 2.057604] [Rpc/INFO] Done.
+> [Tremblay:server:(1) 2.057604] [gras/INFO] Exiting GRAS