summaryrefslogtreecommitdiffstats
path: root/java/test
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-08-07 04:59:31 (GMT)
committerGitHub <noreply@github.com>2022-08-07 04:59:31 (GMT)
commit956282fa6f5f5b7df92be6f14c12681f7ecabbc9 (patch)
tree262418febb0a037f752e577ab632accd358edd93 /java/test
parent7127d8912c8fa601d59b4e8ce522eaf149c02344 (diff)
downloadhdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.zip
hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.gz
hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.bz2
Develop cmake clean (#1971)
Diffstat (limited to 'java/test')
-rw-r--r--java/test/CMakeLists.txt55
1 files changed, 44 insertions, 11 deletions
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index 9d1ed2b..ab00a34 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -127,16 +127,32 @@ foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
endforeach ()
if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
+ add_test (
+ NAME JUnit-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ test.h5
+ testF2.h5
+ testPf00000.h5
+ testPf00001.h5
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test
+ )
+ set_tests_properties (JUnit-clear-objects PROPERTIES FIXTURES_SETUP clear_JUnit)
+
+ add_test (
+ NAME JUnit-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ test.h5
+ testF2.h5
+ testPf00000.h5
+ testPf00001.h5
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test
+ )
+ set_tests_properties (JUnit-clean-objects PROPERTIES FIXTURES_CLEANUP clear_JUnit)
+
foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
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
- COMMAND ${CMAKE_COMMAND} -E remove
- JUnit-${test_file}.out
- JUnit-${test_file}.out.err
- )
- add_test (
NAME JUnit-${test_file}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}"
@@ -156,7 +172,8 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
)
set_tests_properties (JUnit-${test_file} PROPERTIES
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
- DEPENDS "JUnit-${test_file}-clearall-objects"
+ FIXTURES_REQUIRED clear_JUnit
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test
)
endforeach ()
@@ -170,10 +187,12 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
macro (DO_VOL_TEST voltest volname volinfo volclasspath)
#message(STATUS "${voltest}-${volname} with ${volinfo}")
add_test (
- NAME JUnit-VOL-${volname}-${voltest}-clearall-objects
+ NAME JUnit-VOL-${volname}-${voltest}-clean-objects
COMMAND ${CMAKE_COMMAND} -E remove
- JUnit-VOL-${volname}-${voltest}.out
- JUnit-VOL-${volname}-${voltest}.out.err
+ test.h5
+ testF2.h5
+ testPf00000.h5
+ testPf00001.h5
WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test/${volname}
)
add_test (NAME JUnit-VOL-${volname}-${voltest}
@@ -196,7 +215,21 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
)
set_tests_properties (JUnit-VOL-${volname}-${voltest} PROPERTIES
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
- DEPENDS "JUnit-VOL-${volname}-${voltest}-clearall-objects"
+ DEPENDS "JUnit-VOL-${volname}-${voltest}-clear-objects"
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test/${volname}
+ )
+ add_test (
+ NAME JUnit-VOL-${volname}-${voltest}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ test.h5
+ testF2.h5
+ testPf00000.h5
+ testPf00001.h5
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test/${volname}
+ )
+ set_tests_properties (JUnit-VOL-${volname}-${voltest} PROPERTIES
+ ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
+ DEPENDS "JUnit-VOL-${volname}-${voltest}"
WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test/${volname}
)
endmacro ()