# Java examples
set(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/java/:${CMAKE_BINARY_DIR}/simgrid.jar")
if(enable_java)
- ADD_TEST(java-bittorrent ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java bittorrent/bittorrent.tesh)
+ ADD_TEST(java-async ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java async/async.tesh)
+ ADD_TEST(java-bittorrent ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java bittorrent/bittorrent.tesh)
+ ADD_TEST(java-bypass ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java master_slave_bypass/bypass.tesh)
+ ADD_TEST(java-chord ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java chord/chord.tesh)
+ ADD_TEST(java-cloud ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java cloud/cloud.tesh)
+ ADD_TEST(java-commTime ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java commTime/commtime.tesh)
+ ADD_TEST(java-io ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java io/io.tesh)
+ ADD_TEST(java-kademlia ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java kademlia/kademlia.tesh)
+ ADD_TEST(java-kill ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java master_slave_kill/kill.tesh)
+ ADD_TEST(java-masterslave ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java masterslave/masterslave.tesh)
+ ADD_TEST(java-migration ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java migration/migration.tesh)
+ ADD_TEST(java-mutualExclusion ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java mutualExclusion/mutualexclusion.tesh)
+ ADD_TEST(java-pingPong ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java pingPong/pingpong.tesh)
+ ADD_TEST(java-priority ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java priority/priority.tesh)
+ ADD_TEST(java-startKillTime ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java startKillTime/startKillTime.tesh)
+ ADD_TEST(java-suspend ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java suspend/suspend.tesh)
+ if(HAVE_TRACING)
+ ADD_TEST(java-tracing ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_HOME_DIRECTORY}/examples/java tracing/tracingPingPong.tesh)
+ endif()
endif()
# Lua examples
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar async/AsyncTest ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/async/asyncDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ java -cp ${classpath:=.} async/AsyncTest ./platform.xml ./async/asyncDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (10:async.Slave@Robert) Receiving on 'slave_8'
> [ 0.000000] (11:async.Slave@Sirois) Receiving on 'slave_9'
> [ 0.000000] (12:async.Slave@Monique) Receiving on 'slave_10'
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar chord/Chord ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/chord/chord.xml
+$ java -cp ${classpath:=.} chord/Chord ./platform.xml ./chord/chord.xml
> [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
> [652.540924] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
> [Boivin:chord.Node:(7) 0.000000] [jmsg/INFO] Joining the ring with id 8 knowing node 1
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar cloud/Cloud ${srcdir:=.}/examples/platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ java -cp ${classpath:=.} cloud/Cloud ./platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (10:Slave 8@Jean_Yves) Receiving on slave_8
> [ 0.000000] (11:Slave 9@Fafard) Receiving on slave_9
> [ 0.000000] (1:Master@Jacquelin) Launched 10 VMs
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar commTime/CommTimeTest ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/commTime/commTimeDeployment.xml
+$ java -cp ${classpath:=.} commTime/CommTimeTest ./platform.xml ./commTime/commTimeDeployment.xml
> [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
> [7016.452828] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
> [Bellemarre:commTime.Slave:(15) 0.000000] [jmsg/INFO] Receiving on 'slave_13'
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar kademlia/Kademlia ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/kademlia/kademlia.xml
+$ java -cp ${classpath:=.} kademlia/Kademlia ./platform.xml ./kademlia/kademlia.xml
> [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
> [900.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
> [Boivin:kademlia.Node:(2) 0.000000] [jmsg/INFO] Hi, I'm going to join the network with the id 1!
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar master_slave_bypass/MsBypass ${srcdir:=.}/examples/master_slave_bypass/platform.xml
+$ java -cp ${classpath:=.} master_slave_bypass/MsBypass ./master_slave_bypass/platform.xml
> [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
> [0.013010] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
> [alice:process2:(2) 0.000000] [jmsg/INFO] Slave Hello!
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar master_slave_kill/MsKill ${srcdir:=.}/examples/master_slave_kill/platform.xml
+$ java -cp ${classpath:=.} master_slave_kill/MsKill ./master_slave_kill/platform.xml
> [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
> [0.013010] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
> [alice:slave:(2) 0.000000] [jmsg/INFO] Slave Hello!
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar masterslave/Masterslave ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/masterslave/masterslaveDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ java -cp ${classpath:=.} masterslave/Masterslave ./platform.xml ./masterslave/masterslaveDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:masterslave.Master@Jacquelin) Hello! Got 7 slaves and 5 tasks to process
> [ 0.000000] (2:masterslave.Forwarder@Jackson) Receiving on 'slave_0'
> [ 0.000000] (3:masterslave.Forwarder@Casavant) Receiving on 'slave_1'
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar migration/Migration ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/migration/migrationDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ java -cp ${classpath:=.} migration/Migration ./platform.xml ./migration/migrationDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:migration.Emigrant@Jacquelin) I'll look for a new job on another machine where the grass is greener.
> [ 0.000000] (1:migration.Emigrant@Boivin) Yeah, found something to do
> [ 1.000000] (2:migration.Policeman@Boivin) Wait a bit before migrating the emigrant.
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar mutualExclusion/centralized/MutexCentral ${srcdir:=.}/examples/mutualExclusion/ring3.xml ${srcdir:=.}/examples/mutualExclusion/centralized/mutex_centralized_deployment.xml
+$ java -cp ${classpath:=.} mutualExclusion/centralized/MutexCentral ./mutualExclusion/ring3.xml ./mutualExclusion/mutex_centralized_deployment.xml
> [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
> [0.007806] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
> [Host 0:mutualExclusion.centralized.Coordinator:(1) 0.001301] [jmsg/INFO] Got a request from mutualExclusion.centralized.Node. Queue empty: grant it
> [Host 1:mutualExclusion.centralized.Node:(2) 0.000000] [jmsg/INFO] Send a request to the coordinator
> [Host 1:mutualExclusion.centralized.Node:(2) 0.001301] [jmsg/INFO] Wait for a grant from the coordinator
> [Host 2:mutualExclusion.centralized.Node:(3) 0.000000] [jmsg/INFO] Send a request to the coordinator
-> [Host 2:mutualExclusion.centralized.Node:(3) 0.003903] [jmsg/INFO] Wait for a grant from the coordinator
\ No newline at end of file
+> [Host 2:mutualExclusion.centralized.Node:(3) 0.003903] [jmsg/INFO] Wait for a grant from the coordinator
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar pingPong/PingPongTest ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/pingPong/pingPongDeployment.xml
+$ java -cp ${classpath:=.} pingPong/PingPongTest ./platform.xml ./pingPong/pingPongDeployment.xml
> [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
> [1.048882] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
> [Boivin:pingPong.Receiver:(2) 0.000000] [jmsg/INFO] hello!
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar priority/Priority ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/priority/priorityDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ java -cp ${classpath:=.} priority/Priority ./platform.xml ./priority/priorityDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:priority.Test@Fafard) Hello! Running a task of size 7.6296E7 with priority 1.0
> [ 0.000000] (2:priority.Test@Fafard) Hello! Running a task of size 7.6296E7 with priority 2.0
> [ 0.833332] (2:priority.Test@Fafard) Goodbye now!
#! ./tesh
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar startKillTime/StartKillTime ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/startKillTime/deployment_start_kill.xml
+$ java -cp ${classpath:=.} startKillTime/StartKillTime ./platform.xml ./startKillTime/deployment_start_kill.xml
> [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
> [Jacquelin:startKillTime.Master:(1) 0.000000] [jmsg/INFO] Hello!
> [Boivin:startKillTime.Slave:(2) 1.000000] [jmsg/INFO] Hello!
#! ./tesh
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar suspend/Suspend ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/suspend/suspendDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ java -cp ${classpath:=.} suspend/Suspend ./platform.xml ./suspend/suspendDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:suspend.DreamMaster@Jacquelin) Let's create a lazy guy.
> [ 0.000000] (1:suspend.DreamMaster@Jacquelin) Let's wait a little bit...
> [ 0.000000] (2:Lazy@Jacquelin) Nobody's watching me ? Let's go to sleep.
! output sort
-$ java -cp .:${srcdir:=.}/examples:${srcdir:=.}/simgrid.jar tracing/TracingTest ${srcdir:=.}/examples/platform.xml ${srcdir:=.}/examples/tracing/tracingPingPongDeployment.xml --cfg=tracing:1 --cfg=tracing/filename:simulation.trace --cfg=tracing/platform:1
+$ java -cp ${classpath:=.} tracing/TracingTest ./platform.xml ./tracing/tracingPingPongDeployment.xml --cfg=tracing:1 --cfg=tracing/filename:simulation.trace --cfg=tracing/platform:1
> [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to '1'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'simulation.trace'