Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use cmake's JAVA_EXECUTABLE to run Java tests.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 10 Jan 2019 14:48:15 +0000 (15:48 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 10 Jan 2019 14:56:17 +0000 (15:56 +0100)
29 files changed:
CMakeLists.txt
examples/java/CMakeLists.txt
examples/java/app/bittorrent/app-bittorrent.tesh
examples/java/app/centralizedmutex/app-centralizedmutex.tesh
examples/java/app/masterworker/app-masterworker.tesh
examples/java/app/pingpong/app-pingpong.tesh
examples/java/app/tokenring/app-tokenring.tesh
examples/java/async/dsend/async-dsend.tesh
examples/java/async/waitall/async-waitall.tesh
examples/java/async/yield/async-yield.tesh
examples/java/cloud/masterworker/cloud-masterworker.tesh
examples/java/cloud/migration/cloud-migration.tesh
examples/java/dht/chord/dht-chord.tesh
examples/java/dht/kademlia/dht-kademlia.tesh
examples/java/energy/consumption/energy-consumption.tesh
examples/java/energy/pstate/energy-pstate.tesh
examples/java/energy/vm/energy-vm.tesh
examples/java/hostload/hostload.tesh
examples/java/io/file/io-file.tesh
examples/java/io/storage/io-storage.tesh
examples/java/process/kill/process-kill.tesh
examples/java/process/migration/process-migration.tesh
examples/java/process/startkilltime/process-startkilltime.tesh
examples/java/process/suspend/process-suspend.tesh
examples/java/task/priority/task-priority.tesh
examples/java/trace/pingpong/trace-pingpong.tesh
teshsuite/java/CMakeLists.txt
teshsuite/java/semaphoregc/semaphoregc.tesh
teshsuite/java/sleephostoff/sleephostoff.tesh

index 85d9903..c374955 100644 (file)
@@ -860,6 +860,7 @@ message("                version .............: ${CMAKE_CXX_COMPILER_VERSION}")
 if(${Java_FOUND})
   message("        Compiler: Javac .............: ${Java_JAVAC_EXECUTABLE}")
   message("                version .............: ${Java_VERSION_STRING}")
+  message("                runtime .............: ${Java_JAVA_EXECUTABLE}")
 endif()
 if(CMAKE_Fortran_COMPILER)
   message("        Compiler: Fortran ...........: ${SMPI_Fortran_COMPILER} (id: ${CMAKE_Fortran_COMPILER_ID})")
index 3b0ba59..764d24b 100644 (file)
@@ -75,6 +75,6 @@ if(enable_java)
            cloud-migration cloud-masterworker dht-chord dht-kademlia energy-consumption energy-pstate energy-vm hostload io-file io-storage
            process-kill process-migration process-startkilltime process-suspend task-priority trace-pingpong)
     string (REPLACE "-" "/" example_dir ${example})
-    ADD_TESH(java-${example}  --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java/${example_dir} ${CMAKE_HOME_DIRECTORY}/examples/java/${example_dir}/${example}.tesh)
+    ADD_TESH(java-${example}  --setenv javacmd=${Java_JAVA_EXECUTABLE} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java/${example_dir} ${CMAKE_HOME_DIRECTORY}/examples/java/${example_dir}/${example}.tesh)
   endforeach()
 endif()
index d4dd1ca..b8df1ff 100644 (file)
@@ -3,7 +3,7 @@
 ! output sort 19
 ! timeout 15
 
-$ java -classpath ${classpath:=.} app/bittorrent/Main ${srcdir:=.}/../platforms/cluster_backbone.xml ${srcdir:=.}/app/bittorrent/bittorrent.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} app/bittorrent/Main ${srcdir:=.}/../platforms/cluster_backbone.xml ${srcdir:=.}/app/bittorrent/bittorrent.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [5000.046836] [java/INFO] MSG_main finished; Terminating the simulation...
 > [node-0.simgrid.org:app.bittorrent.Tracker:(1) 0.000000] [java/INFO] Tracker launched.
index 5496f03..bf8357d 100644 (file)
@@ -2,7 +2,7 @@
 
 ! output sort 19
 
-$ java -classpath ${classpath:=.} app/centralizedmutex/Main ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/app/centralizedmutex/centralizedmutex.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} app/centralizedmutex/Main ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/app/centralizedmutex/centralizedmutex.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [Jupiter:app.centralizedmutex.Node:(2) 0.000000] [java/INFO] Send a request to the coordinator
 > [Fafard:app.centralizedmutex.Node:(3) 0.000000] [java/INFO] Send a request to the coordinator
index ea836e1..75cffcf 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} app/masterworker/Main ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/app/masterworker/masterworker.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${javacmd:=java} -classpath ${classpath:=.} app/masterworker/Main ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/app/masterworker/masterworker.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (1:app.masterworker.Master@Jacquelin) Hello! My PID is 1. Got 7 workers and 5 tasks to process
 > [  0.860026] (2:app.masterworker.Worker@Tremblay) Received "Task_0". Processing it (my pid is 2).
index 003140b..9e587d4 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} app/pingpong/Main ${srcdir:=.}/../platforms/small_platform.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} app/pingpong/Main ${srcdir:=.}/../platforms/small_platform.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [Jacquelin:Sender:(1) 0.000000] [java/INFO] Host count: 1
 > [Jacquelin:Sender:(1) 0.000000] [java/INFO] sender time: 0.0
index c7ed48b..23bc1bd 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/../platforms/routing_cluster.xml '--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n'
+$ ${javacmd:=java} -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/../platforms/routing_cluster.xml '--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n'
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (0:maestro@) Number of hosts '6'
 > [  0.000000] (1:0@host1) Host '0' send 'Token' to Host '1'
@@ -17,7 +17,7 @@ $ java -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/../platforms/r
 > [  0.131796] (1:0@host1) Host '0' received 'Token'
 > [  0.131796] (0:maestro@) MSG_main finished; Terminating the simulation...
 
-$ java -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/../platforms/two_peers.xml '--log=root.fmt:[%12.6r]%e(%i:%P@%h)%e%m%n'
+$ ${javacmd:=java} -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/../platforms/two_peers.xml '--log=root.fmt:[%12.6r]%e(%i:%P@%h)%e%m%n'
 > [    0.000000] (0:maestro@) Using regular java threads.
 > [    0.000000] (0:maestro@) Number of hosts '2'
 > [    0.000000] (1:0@100030591) Host '0' send 'Token' to Host '1'
@@ -26,7 +26,7 @@ $ java -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/../platforms/t
 > [    1.248846] (1:0@100030591) Host '0' received 'Token'
 > [    1.248846] (0:maestro@) MSG_main finished; Terminating the simulation...
 
-$ java -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/../platforms/meta_cluster.xml '--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n'
+$ ${javacmd:=java} -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/../platforms/meta_cluster.xml '--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n'
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (0:maestro@) Number of hosts '60'
 > [  0.000000] (1:0@host-1.cluster1) Host '0' send 'Token' to Host '1'
index be3fc5e..701ca73 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env tesh
 
 ! timeout 30
-$ java -classpath ${classpath:=.} async/dsend/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${javacmd:=java} -classpath ${classpath:=.} async/dsend/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (1:Sender@Boivin) Hello! Got 6 receivers to contact
 > [  0.000000] (1:Sender@Boivin) Sending "Task_1" to "Bourassa"
index e9aba7e..4ef3cef 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} async/waitall/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${javacmd:=java} -classpath ${classpath:=.} async/waitall/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (1:Sender@Boivin) I have 6 receivers to contact
 > [  0.000000] (1:Sender@Boivin) Start the Sending 'Task_1' to 'Bourassa'
index 9c7526d..036dff4 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env tesh
 
 ! timeout 30
-$ java -classpath ${classpath:=.} async/yield/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${javacmd:=java} -classpath ${classpath:=.} async/yield/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (1:Yielder@Boivin) Yielded 10. Good bye now!
 > [  0.000000] (2:Yielder@Bourassa) Yielded 15. Good bye now!
index d33fcb0..a6afa2b 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} cloud/masterworker/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${javacmd:=java} -classpath ${classpath:=.} cloud/masterworker/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (1:Master@Boivin) Launched 6 VMs
 > [  0.000000] (1:Master@Boivin) Send some work to everyone
index 71be7e6..42408a1 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} cloud/migration/Main ${srcdir:=.}/../platforms/three_multicore_hosts.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} cloud/migration/Main ${srcdir:=.}/../platforms/three_multicore_hosts.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [PM0:Test:(1) 0.000000] [java/INFO] This example evaluates the migration time of a VM in presence of collocated VMs on the source and the dest nodes
 > [PM0:Test:(1) 0.000000] [java/INFO] The migrated VM has a memory intensity rate of 70% of the network BW and a cpu load of 90% " (see cloudcom 2013 paper "Adding a Live Migration Model Into SimGrid" for further information) 
index 571d36f..1ef1a2d 100644 (file)
@@ -2,7 +2,7 @@
 
 ! output sort 19
 
-$ java -classpath ${classpath:=.} dht/chord/Main ${srcdir:=.}/../platforms/cluster_backbone.xml ${srcdir:=.}/dht/chord/chord.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} dht/chord/Main ${srcdir:=.}/../platforms/cluster_backbone.xml ${srcdir:=.}/dht/chord/chord.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [1046.732943] [java/INFO] MSG_main finished; Terminating the simulation...
 > [node-1.simgrid.org:dht.chord.Node:(2) 0.000000] [java/INFO] Joining the ring with id 366680 knowing node 42
index df3a2bb..fc99e42 100644 (file)
@@ -2,7 +2,7 @@
 
 ! output sort 19
 
-$ java -classpath ${classpath:=.} dht/kademlia/Main ${srcdir:=.}/../platforms/cluster_backbone.xml ${srcdir:=.}/dht/kademlia/kademlia.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} dht/kademlia/Main ${srcdir:=.}/../platforms/cluster_backbone.xml ${srcdir:=.}/dht/kademlia/kademlia.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [900.000000] [java/INFO] MSG_main finished; Terminating the simulation...
 > [node-0.simgrid.org:dht.kademlia.Node:(1) 0.000000] [java/INFO] Hi, I'm going to create the network with the id 0!
index 4a6c3ff..ed377f7 100644 (file)
@@ -2,7 +2,7 @@
 
 ! timeout 15
 
-$ java -classpath ${classpath:=.} energy/consumption/Main ${srcdir:=.}/../platforms/energy_platform.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} energy/consumption/Main ${srcdir:=.}/../platforms/energy_platform.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [MyHost1:energyConsumer:(1) 0.000000] [java/INFO] Energetic profile: 100.0:120.0:200.0, 93.0:110.0:170.0, 90.0:105.0:150.0
 > [MyHost1:energyConsumer:(1) 0.000000] [java/INFO] Initial peak speed= 1.0E8 flop/s; Energy dissipated = 0.0 J
index b35f2d2..1dc3ab7 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} energy/pstate/Main ${srcdir:=.}/../platforms/energy_platform.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} energy/pstate/Main ${srcdir:=.}/../platforms/energy_platform.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [MyHost1:dvfs_test:(2) 0.000000] [java/INFO] Count of Processor states=3
 > [MyHost1:dvfs_test:(2) 0.000000] [java/INFO] Current power peak=1.0E8
index e07fb6a..6cf1dd1 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} energy/vm/Main ${srcdir:=.}/../platforms/energy_platform.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} energy/vm/Main ${srcdir:=.}/../platforms/energy_platform.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [MyHost1:energy VM runner:(1) 0.000000] [java/INFO] Creating and starting two VMs
 > [MyHost1:energy VM runner:(1) 0.000000] [java/INFO] Create two tasks on Host1: one inside a VM, the other directly on the host
index 19c0a22..9ebee0e 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} hostload/Main ${srcdir:=.}/../platforms/small_platform.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} hostload/Main ${srcdir:=.}/../platforms/small_platform.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [Boivin::(1) 0.000000] [java/INFO] Speed=9.8095E7 flop/s
 > [Boivin::(1) 0.000000] [java/INFO] Computed Flops 0.0
index d70cf90..2428f48 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} io/file/Main ${srcdir:=.}/../platforms/storage/storage.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} io/file/Main ${srcdir:=.}/../platforms/storage/storage.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [0.000000] [java/INFO] Number of hosts:4
 > [alice:0:(1) 0.000000] [java/INFO] Open file c:\Windows\setupact.log
index d89cae9..538e790 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} io/storage/Main ${srcdir:=.}/../platforms/storage/storage.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} io/storage/Main ${srcdir:=.}/../platforms/storage/storage.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [denise:0:(1) 0.000000] [java/INFO] ------------------------------------
 > [denise:0:(1) 0.000000] [java/INFO] Disk name: Disk2
index aa210f3..b8ddf02 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ java -classpath ${classpath:=.} process/kill/Main ${srcdir:=.}/../platforms/small_platform.xml --lof=no_loc
+$ ${javacmd:=java} -classpath ${classpath:=.} process/kill/Main ${srcdir:=.}/../platforms/small_platform.xml --lof=no_loc
 > [0.000000] [java/INFO] Using regular java threads.
 > [Jacquelin:killer:(1) 0.000000] [java/INFO] Hello!
 > [Boivin:victim:(2) 0.000000] [java/INFO] Hello!
index b2a24e4..f24af2f 100644 (file)
@@ -2,7 +2,7 @@
 
 ! output sort 19
 
-$ java -classpath ${classpath:=.} process/migration/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${javacmd:=java} -classpath ${classpath:=.} process/migration/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (2:emigrant@Jacquelin) I'll look for a new job on another machine where the grass is greener.
 > [  0.000000] (2:emigrant@Boivin) Yeah, found something to do
index 65c460a..c450a66 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/env tesh
-$ java -classpath ${classpath:=.} process/startkilltime/Main ${srcdir:=.}/../platforms/cluster_backbone.xml ${srcdir:=.}/process/startkilltime/startkilltime.xml
+$ ${javacmd:=java} -classpath ${classpath:=.} process/startkilltime/Main ${srcdir:=.}/../platforms/cluster_backbone.xml ${srcdir:=.}/process/startkilltime/startkilltime.xml
 > [0.000000] [java/INFO] Using regular java threads.
 > [node-0.simgrid.org:process.startkilltime.Sleeper:(1) 0.000000] [java/INFO] Hello! I go to sleep.
 > [node-1.simgrid.org:process.startkilltime.Sleeper:(2) 1.000000] [java/INFO] Hello! I go to sleep.
index 45e219b..1bde0b0 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env tesh
 
 ! output sort 19
-$ java -classpath ${classpath:=.} process/suspend/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${javacmd:=java} -classpath ${classpath:=.} process/suspend/Main ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (1:DreamMaster@Jacquelin) Let's create a lazy guy.
 > [  0.000000] (1:DreamMaster@Jacquelin) Let's wait a little bit...
index 195fe6a..91bfca0 100644 (file)
@@ -2,7 +2,7 @@
 
 ! output sort 19
 
-$ java -classpath ${classpath:=.} task/priority/Main ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/task/priority/priority.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${javacmd:=java} -classpath ${classpath:=.} task/priority/Main ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/task/priority/priority.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (1:task.priority.Test@Fafard) Hello! Running a task of size 7.6296E7 with priority 1.0
 > [  0.000000] (2:task.priority.Test@Fafard) Hello! Running a task of size 7.6296E7 with priority 2.0
index 7e1fee9..319c13a 100644 (file)
@@ -2,7 +2,7 @@
 
 ! output sort 19
 
-$ java -classpath ${classpath:=.} trace/pingpong/Main ${srcdir:=.}/../platforms/small_platform.xml --cfg=tracing:yes  --cfg=tracing/filename:simulation.trace --cfg=tracing/platform:yes
+$ ${javacmd:=java} -classpath ${classpath:=.} trace/pingpong/Main ${srcdir:=.}/../platforms/small_platform.xml --cfg=tracing:yes  --cfg=tracing/filename:simulation.trace --cfg=tracing/platform:yes
 > [0.000000] [java/INFO] Using regular java threads.
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'simulation.trace'
index 3c6e4c6..76c248e 100644 (file)
@@ -28,6 +28,6 @@ set(examples_src ${examples_src} ${sources}
 set(tesh_files   ${tesh_files}                                                                 PARENT_SCOPE)
 
 if(enable_java)
-  ADD_TESH(tesh-java-semaphoregc  --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/teshsuite/java/semaphoregc  ${CMAKE_HOME_DIRECTORY}/teshsuite/java/semaphoregc/semaphoregc.tesh)
-  ADD_TESH(tesh-java-sleephostoff --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/teshsuite/java/sleephostoff ${CMAKE_HOME_DIRECTORY}/teshsuite/java/sleephostoff/sleephostoff.tesh)
+  ADD_TESH(tesh-java-semaphoregc  --setenv javacmd=${Java_JAVA_EXECUTABLE} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/teshsuite/java/semaphoregc  ${CMAKE_HOME_DIRECTORY}/teshsuite/java/semaphoregc/semaphoregc.tesh)
+  ADD_TESH(tesh-java-sleephostoff --setenv javacmd=${Java_JAVA_EXECUTABLE} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/teshsuite/java/sleephostoff ${CMAKE_HOME_DIRECTORY}/teshsuite/java/sleephostoff/sleephostoff.tesh)
 endif()
index 8cbe590..010bd0b 100644 (file)
@@ -1,6 +1,6 @@
 ! timeout 15
 
-$ java -classpath ${classpath:=.} semaphoregc.SemaphoreGC ${srcdir:=.}/small_platform.xml "--log=root.fmt:[%10.4r]%e(%i:%P@%h)%e%m%n"
+$ ${javacmd:=java} -classpath ${classpath:=.} semaphoregc.SemaphoreGC ${srcdir:=.}/small_platform.xml "--log=root.fmt:[%10.4r]%e(%i:%P@%h)%e%m%n"
 > [    0.0000] (0:maestro@) Using regular java threads.
 > [    0.0000] (1:SemCreator@Fafard) Creating 50 new Semaphores, yielding and triggering a GC after each
 > [  500.0000] (1:SemCreator@Fafard) It worked, we survived. The test is passed.
index c10a19d..781268d 100644 (file)
@@ -1,4 +1,4 @@
-$ java -classpath ${classpath:=.} sleephostoff.SleepHostOff ${srcdir:=.}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${javacmd:=java} -classpath ${classpath:=.} sleephostoff.SleepHostOff ${srcdir:=.}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Using regular java threads.
 > [  0.000000] (1:TestRunner@Fafard) **** **** **** ***** ***** Test Sleep ***** ***** **** **** ****
 > [  0.000000] (1:TestRunner@Fafard) Test sleep: Create a process on Tremblay that simply make periodic sleep, turn off Tremblay