From: Martin Quinson Date: Tue, 23 May 2017 23:05:48 +0000 (+0200) Subject: Java package names should not be uppercased X-Git-Tag: v3.16~231 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b0dd6b0d66292d75446c0b7698c9e93b6613c34d?ds=sidebyside Java package names should not be uppercased --- diff --git a/.gitignore b/.gitignore index 13852338c1..c5eea27e85 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/teshsuite/java/CMakeLists.txt b/teshsuite/java/CMakeLists.txt index 6f5381a13a..e782127f4b 100644 --- a/teshsuite/java/CMakeLists.txt +++ b/teshsuite/java/CMakeLists.txt @@ -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() diff --git a/teshsuite/java/SemaphoreGC/SemaphoreGC.java b/teshsuite/java/semaphoreGC/SemaphoreGC.java similarity index 85% rename from teshsuite/java/SemaphoreGC/SemaphoreGC.java rename to teshsuite/java/semaphoreGC/SemaphoreGC.java index 3939f28401..badbfe40ae 100644 --- a/teshsuite/java/SemaphoreGC/SemaphoreGC.java +++ b/teshsuite/java/semaphoreGC/SemaphoreGC.java @@ -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 "); + Msg.info("Usage: java -cp simgrid.jar:. semaphoreGC.SemaphoreGC "); System.exit(1); } Msg.createEnvironment(args[0]); diff --git a/teshsuite/java/SemaphoreGC/SemaphoreGC.tesh b/teshsuite/java/semaphoreGC/SemaphoreGC.tesh similarity index 86% rename from teshsuite/java/SemaphoreGC/SemaphoreGC.tesh rename to teshsuite/java/semaphoreGC/SemaphoreGC.tesh index 76c6b4a12e..d3d9f3ef66 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" +$ 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.java b/teshsuite/java/sleepHostOff/SleepHostOff.java similarity index 88% rename from teshsuite/java/SleepHostOff/SleepHostOff.java rename to teshsuite/java/sleepHostOff/SleepHostOff.java index c48cca76b6..78c95a5581 100644 --- a/teshsuite/java/SleepHostOff/SleepHostOff.java +++ b/teshsuite/java/sleepHostOff/SleepHostOff.java @@ -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 "); + Msg.info("Usage: java -cp simgrid.jar:. sleepHostOff.SleepHostOff "); System.exit(1); } diff --git a/teshsuite/java/SleepHostOff/SleepHostOff.tesh b/teshsuite/java/sleepHostOff/SleepHostOff.tesh similarity index 93% rename from teshsuite/java/SleepHostOff/SleepHostOff.tesh rename to teshsuite/java/sleepHostOff/SleepHostOff.tesh index 7fda994de8..8286614a0d 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" +$ 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