Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Java package names should not be uppercased
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 23 May 2017 23:05:48 +0000 (01:05 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 23 May 2017 23:06:23 +0000 (01:06 +0200)
.gitignore
teshsuite/java/CMakeLists.txt
teshsuite/java/semaphoreGC/SemaphoreGC.java [moved from teshsuite/java/SemaphoreGC/SemaphoreGC.java with 85% similarity]
teshsuite/java/semaphoreGC/SemaphoreGC.tesh [moved from teshsuite/java/SemaphoreGC/SemaphoreGC.tesh with 86% similarity]
teshsuite/java/sleepHostOff/SleepHostOff.java [moved from teshsuite/java/SleepHostOff/SleepHostOff.java with 88% similarity]
teshsuite/java/sleepHostOff/SleepHostOff.tesh [moved from teshsuite/java/SleepHostOff/SleepHostOff.tesh with 93% similarity]

index 1385233..c5eea27 100644 (file)
@@ -241,8 +241,8 @@ examples/smpi/trace_simple/smpi_trace_simple
 examples/smpi/trace_call_location/smpi_trace_call_location
 testall
 teshsuite/datadesc_usage.out
-teshsuite/java/SemaphoreGC/SemaphoreGC_compiled
-teshsuite/java/SleepHostOff/SleepHostOff_compiled
+teshsuite/java/semaphoreGC/semaphoreGC_compiled
+teshsuite/java/sleepHostOff/sleepHostOff_compiled
 teshsuite/mc/dwarf/dwarf
 teshsuite/mc/dwarf-expression/dwarf-expression
 teshsuite/mc/random-bug/random-bug
index 6f5381a..e782127 100644 (file)
@@ -1,5 +1,11 @@
-foreach(example SemaphoreGC SleepHostOff)
-  set(sources ${CMAKE_CURRENT_SOURCE_DIR}/${example}/${example}.java)
+set(semaphoreGC_files  SemaphoreGC)
+set(sleepHostOff_files SleepHostOff)
+
+foreach(example semaphoreGC sleepHostOff)
+  foreach (filename ${${example}_files} )
+    set(sources "${${example}_sources}" "${CMAKE_CURRENT_SOURCE_DIR}/${example}/${filename}.java")
+  endforeach()
+
   set(tesh_files   ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/${example}/${example}.tesh)
 
   if(enable_java)
@@ -21,6 +27,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 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)
 endif()
similarity index 85%
rename from teshsuite/java/SemaphoreGC/SemaphoreGC.java
rename to teshsuite/java/semaphoreGC/SemaphoreGC.java
index 3939f28..badbfe4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -7,7 +7,7 @@
  * This was reported as bug #19893 on gforge.
  */
 
-package SemaphoreGC;
+package semaphoreGC;
 
 import org.simgrid.msg.*;
 import org.simgrid.msg.Process;
@@ -39,7 +39,7 @@ public class SemaphoreGC {
   public static void main(String[] args) throws Exception {
     Msg.init(args);
     if (args.length < 1) {
-      Msg.info("Usage: java -cp simgrid.jar:. semaphore.SemaphoreGC <deployment.xml>");
+      Msg.info("Usage: java -cp simgrid.jar:. semaphoreGC.SemaphoreGC <deployment.xml>");
       System.exit(1);
     }
     Msg.createEnvironment(args[0]);
similarity index 86%
rename from teshsuite/java/SemaphoreGC/SemaphoreGC.tesh
rename to teshsuite/java/semaphoreGC/SemaphoreGC.tesh
index 76c6b4a..d3d9f3e 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"
+$ 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.
@@ -1,10 +1,9 @@
-/* Copyright (c) 2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2014-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-package SleepHostOff;
+package sleepHostOff;
 
 import org.simgrid.msg.*;
 import org.simgrid.msg.Process;
@@ -56,7 +55,7 @@ public class SleepHostOff {
     Msg.init(args);
 
     if (args.length < 1) {
-      Msg.info("Usage: java -cp simgrid.jar:. sleep_host_off.SleepHostOff <platform.xml>");
+      Msg.info("Usage: java -cp simgrid.jar:. sleepHostOff.SleepHostOff <platform.xml>");
       System.exit(1);
     }
 
@@ -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"
+$ 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