summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/test/CMakeLists.txt22
1 files changed, 9 insertions, 13 deletions
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index ffaf5f5..c6cf607 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -113,14 +113,14 @@ endif ()
get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY OUTPUT_NAME)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$<CONFIG:Debug>:${CMAKE_DEBUG_POSTFIX}>;")
+set (CMAKE_JAVA_CLASSPATH ".")
+foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
+ set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
+endforeach ()
if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
- set (CMAKE_JAVA_CLASSPATH ".")
- foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
- set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
- endforeach ()
- set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_JAR_FILE}")
+ set (TEST_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_JAR_FILE}")
add_test (
NAME JUnit-${test_file}-clearall-objects
@@ -132,7 +132,7 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
NAME JUnit-${test_file}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}"
- -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}"
+ -D "TEST_CLASSPATH:STRING=${TEST_JAVA_CLASSPATH}"
-D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore"
-D "TEST_PROGRAM=test.${test_file}"
-D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
@@ -184,7 +184,7 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
-D "TEST_MASK_ERROR=TRUE"
# -D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=JUnit-${volname}-${voltest}.txt"
- -P "${HDF_RESOURCES_DIR}/jvolTest.cmake"
+ -P "${HDF_RESOURCES_DIR}/jrunTest.cmake"
)
set_tests_properties (JUnit-VOL-${volname}-${voltest} PROPERTIES
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
@@ -228,12 +228,8 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
foreach (volinfo IN LISTS ${voltest})
foreach (h5_file ${HDF5_JAVA_TEST_SOURCES})
- set (CMAKE_JAVA_CLASSPATH ".")
- foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
- set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
- endforeach ()
- set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${h5_file}_JAR_FILE}")
- DO_VOL_TEST (${h5_file} ${voltest} "${volinfo}" ${CMAKE_JAVA_CLASSPATH})
+ set (VOL_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${h5_file}_JAR_FILE}")
+ DO_VOL_TEST (${h5_file} ${voltest} "${volinfo}" "${VOL_JAVA_CLASSPATH}")
endforeach ()
endforeach ()
endforeach ()