From cac9073dbdb6e9b5b742f660c2d6e67bba152575 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 10 Jan 2019 15:48:15 +0100 Subject: [PATCH] Use cmake's JAVA_EXECUTABLE to run Java tests. --- CMakeLists.txt | 1 + examples/java/CMakeLists.txt | 2 +- examples/java/app/bittorrent/app-bittorrent.tesh | 2 +- .../java/app/centralizedmutex/app-centralizedmutex.tesh | 2 +- examples/java/app/masterworker/app-masterworker.tesh | 2 +- examples/java/app/pingpong/app-pingpong.tesh | 2 +- examples/java/app/tokenring/app-tokenring.tesh | 6 +++--- examples/java/async/dsend/async-dsend.tesh | 2 +- examples/java/async/waitall/async-waitall.tesh | 2 +- examples/java/async/yield/async-yield.tesh | 2 +- examples/java/cloud/masterworker/cloud-masterworker.tesh | 2 +- examples/java/cloud/migration/cloud-migration.tesh | 2 +- examples/java/dht/chord/dht-chord.tesh | 2 +- examples/java/dht/kademlia/dht-kademlia.tesh | 2 +- examples/java/energy/consumption/energy-consumption.tesh | 2 +- examples/java/energy/pstate/energy-pstate.tesh | 2 +- examples/java/energy/vm/energy-vm.tesh | 2 +- examples/java/hostload/hostload.tesh | 2 +- examples/java/io/file/io-file.tesh | 2 +- examples/java/io/storage/io-storage.tesh | 2 +- examples/java/process/kill/process-kill.tesh | 2 +- examples/java/process/migration/process-migration.tesh | 2 +- .../java/process/startkilltime/process-startkilltime.tesh | 2 +- examples/java/process/suspend/process-suspend.tesh | 2 +- examples/java/task/priority/task-priority.tesh | 2 +- examples/java/trace/pingpong/trace-pingpong.tesh | 2 +- teshsuite/java/CMakeLists.txt | 4 ++-- teshsuite/java/semaphoregc/semaphoregc.tesh | 2 +- teshsuite/java/sleephostoff/sleephostoff.tesh | 2 +- 29 files changed, 32 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 85d9903830..c37495510e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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})") diff --git a/examples/java/CMakeLists.txt b/examples/java/CMakeLists.txt index 3b0ba59786..764d24b169 100644 --- a/examples/java/CMakeLists.txt +++ b/examples/java/CMakeLists.txt @@ -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() diff --git a/examples/java/app/bittorrent/app-bittorrent.tesh b/examples/java/app/bittorrent/app-bittorrent.tesh index d4dd1cac35..b8df1ff64d 100644 --- a/examples/java/app/bittorrent/app-bittorrent.tesh +++ b/examples/java/app/bittorrent/app-bittorrent.tesh @@ -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. diff --git a/examples/java/app/centralizedmutex/app-centralizedmutex.tesh b/examples/java/app/centralizedmutex/app-centralizedmutex.tesh index 5496f03f0d..bf8357d164 100644 --- a/examples/java/app/centralizedmutex/app-centralizedmutex.tesh +++ b/examples/java/app/centralizedmutex/app-centralizedmutex.tesh @@ -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 diff --git a/examples/java/app/masterworker/app-masterworker.tesh b/examples/java/app/masterworker/app-masterworker.tesh index ea836e1cc2..75cffcfb37 100644 --- a/examples/java/app/masterworker/app-masterworker.tesh +++ b/examples/java/app/masterworker/app-masterworker.tesh @@ -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). diff --git a/examples/java/app/pingpong/app-pingpong.tesh b/examples/java/app/pingpong/app-pingpong.tesh index 003140bfee..9e587d46b7 100644 --- a/examples/java/app/pingpong/app-pingpong.tesh +++ b/examples/java/app/pingpong/app-pingpong.tesh @@ -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 diff --git a/examples/java/app/tokenring/app-tokenring.tesh b/examples/java/app/tokenring/app-tokenring.tesh index c7ed48bba9..23bc1bdca4 100644 --- a/examples/java/app/tokenring/app-tokenring.tesh +++ b/examples/java/app/tokenring/app-tokenring.tesh @@ -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' diff --git a/examples/java/async/dsend/async-dsend.tesh b/examples/java/async/dsend/async-dsend.tesh index be3fc5e2ec..701ca73b97 100644 --- a/examples/java/async/dsend/async-dsend.tesh +++ b/examples/java/async/dsend/async-dsend.tesh @@ -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" diff --git a/examples/java/async/waitall/async-waitall.tesh b/examples/java/async/waitall/async-waitall.tesh index e9aba7eea3..4ef3cef230 100644 --- a/examples/java/async/waitall/async-waitall.tesh +++ b/examples/java/async/waitall/async-waitall.tesh @@ -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' diff --git a/examples/java/async/yield/async-yield.tesh b/examples/java/async/yield/async-yield.tesh index 9c7526d4ad..036dff43d1 100644 --- a/examples/java/async/yield/async-yield.tesh +++ b/examples/java/async/yield/async-yield.tesh @@ -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! diff --git a/examples/java/cloud/masterworker/cloud-masterworker.tesh b/examples/java/cloud/masterworker/cloud-masterworker.tesh index d33fcb0c74..a6afa2b916 100644 --- a/examples/java/cloud/masterworker/cloud-masterworker.tesh +++ b/examples/java/cloud/masterworker/cloud-masterworker.tesh @@ -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 diff --git a/examples/java/cloud/migration/cloud-migration.tesh b/examples/java/cloud/migration/cloud-migration.tesh index 71be7e6f20..42408a12ce 100644 --- a/examples/java/cloud/migration/cloud-migration.tesh +++ b/examples/java/cloud/migration/cloud-migration.tesh @@ -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) diff --git a/examples/java/dht/chord/dht-chord.tesh b/examples/java/dht/chord/dht-chord.tesh index 571d36fea8..1ef1a2d5fa 100644 --- a/examples/java/dht/chord/dht-chord.tesh +++ b/examples/java/dht/chord/dht-chord.tesh @@ -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 diff --git a/examples/java/dht/kademlia/dht-kademlia.tesh b/examples/java/dht/kademlia/dht-kademlia.tesh index df3a2bb13a..fc99e42abd 100644 --- a/examples/java/dht/kademlia/dht-kademlia.tesh +++ b/examples/java/dht/kademlia/dht-kademlia.tesh @@ -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! diff --git a/examples/java/energy/consumption/energy-consumption.tesh b/examples/java/energy/consumption/energy-consumption.tesh index 4a6c3ff359..ed377f7ef7 100644 --- a/examples/java/energy/consumption/energy-consumption.tesh +++ b/examples/java/energy/consumption/energy-consumption.tesh @@ -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 diff --git a/examples/java/energy/pstate/energy-pstate.tesh b/examples/java/energy/pstate/energy-pstate.tesh index b35f2d28bb..1dc3ab7f47 100644 --- a/examples/java/energy/pstate/energy-pstate.tesh +++ b/examples/java/energy/pstate/energy-pstate.tesh @@ -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 diff --git a/examples/java/energy/vm/energy-vm.tesh b/examples/java/energy/vm/energy-vm.tesh index e07fb6aa35..6cf1dd1a03 100644 --- a/examples/java/energy/vm/energy-vm.tesh +++ b/examples/java/energy/vm/energy-vm.tesh @@ -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 diff --git a/examples/java/hostload/hostload.tesh b/examples/java/hostload/hostload.tesh index 19c0a22954..9ebee0ebf8 100644 --- a/examples/java/hostload/hostload.tesh +++ b/examples/java/hostload/hostload.tesh @@ -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 diff --git a/examples/java/io/file/io-file.tesh b/examples/java/io/file/io-file.tesh index d70cf9083a..2428f4834f 100644 --- a/examples/java/io/file/io-file.tesh +++ b/examples/java/io/file/io-file.tesh @@ -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 diff --git a/examples/java/io/storage/io-storage.tesh b/examples/java/io/storage/io-storage.tesh index d89cae9b61..538e790056 100644 --- a/examples/java/io/storage/io-storage.tesh +++ b/examples/java/io/storage/io-storage.tesh @@ -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 diff --git a/examples/java/process/kill/process-kill.tesh b/examples/java/process/kill/process-kill.tesh index aa210f3f06..b8ddf029d7 100644 --- a/examples/java/process/kill/process-kill.tesh +++ b/examples/java/process/kill/process-kill.tesh @@ -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! diff --git a/examples/java/process/migration/process-migration.tesh b/examples/java/process/migration/process-migration.tesh index b2a24e4d07..f24af2f973 100644 --- a/examples/java/process/migration/process-migration.tesh +++ b/examples/java/process/migration/process-migration.tesh @@ -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 diff --git a/examples/java/process/startkilltime/process-startkilltime.tesh b/examples/java/process/startkilltime/process-startkilltime.tesh index 65c460ac31..c450a66da6 100644 --- a/examples/java/process/startkilltime/process-startkilltime.tesh +++ b/examples/java/process/startkilltime/process-startkilltime.tesh @@ -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. diff --git a/examples/java/process/suspend/process-suspend.tesh b/examples/java/process/suspend/process-suspend.tesh index 45e219bd81..1bde0b01f5 100644 --- a/examples/java/process/suspend/process-suspend.tesh +++ b/examples/java/process/suspend/process-suspend.tesh @@ -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... diff --git a/examples/java/task/priority/task-priority.tesh b/examples/java/task/priority/task-priority.tesh index 195fe6aa0c..91bfca06ac 100644 --- a/examples/java/task/priority/task-priority.tesh +++ b/examples/java/task/priority/task-priority.tesh @@ -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 diff --git a/examples/java/trace/pingpong/trace-pingpong.tesh b/examples/java/trace/pingpong/trace-pingpong.tesh index 7e1fee9dc0..319c13a7df 100644 --- a/examples/java/trace/pingpong/trace-pingpong.tesh +++ b/examples/java/trace/pingpong/trace-pingpong.tesh @@ -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' diff --git a/teshsuite/java/CMakeLists.txt b/teshsuite/java/CMakeLists.txt index 3c6e4c65ee..76c248efc9 100644 --- a/teshsuite/java/CMakeLists.txt +++ b/teshsuite/java/CMakeLists.txt @@ -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() diff --git a/teshsuite/java/semaphoregc/semaphoregc.tesh b/teshsuite/java/semaphoregc/semaphoregc.tesh index 8cbe59073a..010bd0b053 100644 --- a/teshsuite/java/semaphoregc/semaphoregc.tesh +++ b/teshsuite/java/semaphoregc/semaphoregc.tesh @@ -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. diff --git a/teshsuite/java/sleephostoff/sleephostoff.tesh b/teshsuite/java/sleephostoff/sleephostoff.tesh index c10a19d547..781268d54a 100644 --- a/teshsuite/java/sleephostoff/sleephostoff.tesh +++ b/teshsuite/java/sleephostoff/sleephostoff.tesh @@ -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 -- 2.20.1