INCLUDES= -I$(top_srcdir)/include
TESTS= test_rl test_sg
+TESTS_ENVIRONMENT=../../../tools/tesh/tesh
+
EXTRA_DIST=rpc.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 = rpc.xml $(TESTS)
rpc_simulator_SOURCES = _rpc_simulator.c rpc.c
rpc_simulator_LDADD = $(top_builddir)/src/libsimgrid.la
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 */
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);
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));
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 */
-#! @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
-#! @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