diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-08-07 04:59:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-07 04:59:31 (GMT) |
commit | 956282fa6f5f5b7df92be6f14c12681f7ecabbc9 (patch) | |
tree | 262418febb0a037f752e577ab632accd358edd93 /java | |
parent | 7127d8912c8fa601d59b4e8ce522eaf149c02344 (diff) | |
download | hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.zip hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.gz hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.bz2 |
Develop cmake clean (#1971)
Diffstat (limited to 'java')
-rw-r--r-- | java/examples/datasets/CMakeLists.txt | 21 | ||||
-rw-r--r-- | java/examples/datatypes/CMakeLists.txt | 12 | ||||
-rw-r--r-- | java/examples/groups/CMakeLists.txt | 23 | ||||
-rw-r--r-- | java/examples/intro/CMakeLists.txt | 12 | ||||
-rw-r--r-- | java/test/CMakeLists.txt | 55 |
5 files changed, 108 insertions, 15 deletions
diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index e63ead0..a630e52 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -93,7 +93,8 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL) else () add_test ( NAME JAVA_datasets-${example}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 + COMMAND ${CMAKE_COMMAND} -E remove + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 ) endif () @@ -122,5 +123,23 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL) set_tests_properties (JAVA_datasets-${example} PROPERTIES DEPENDS JAVA_datasets-${example}-copy-objects ) + + if (example STREQUAL "H5Ex_D_External") + add_test ( + NAME JAVA_datasets-${example}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.data + ) + else () + add_test ( + NAME JAVA_datasets-${example}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 + ) + set_tests_properties (JAVA_datasets-${example}-clean-objects PROPERTIES + DEPENDS JAVA_datasets-${example} + ) + endif () endforeach () endif () diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt index 4512221..afaaf3d 100644 --- a/java/examples/datatypes/CMakeLists.txt +++ b/java/examples/datatypes/CMakeLists.txt @@ -70,7 +70,8 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL) foreach (example ${HDF_JAVA_EXAMPLES}) add_test ( NAME JAVA_datatypes-${example}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 + COMMAND ${CMAKE_COMMAND} -E remove + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 ) add_test ( @@ -97,5 +98,14 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL) set_tests_properties (JAVA_datatypes-${example} PROPERTIES DEPENDS JAVA_datatypes-${example}-copy-objects ) + + add_test ( + NAME JAVA_datatypes-${example}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 + ) + set_tests_properties (JAVA_datatypes-${example}-clean-objects PROPERTIES + DEPENDS JAVA_datatypes-${example} + ) endforeach () endif () diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt index 9f20abf..bec095d 100644 --- a/java/examples/groups/CMakeLists.txt +++ b/java/examples/groups/CMakeLists.txt @@ -78,7 +78,8 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL) else () add_test ( NAME JAVA_groups-${example}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 + COMMAND ${CMAKE_COMMAND} -E remove + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 ) endif () else () @@ -112,5 +113,25 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL) set_tests_properties (JAVA_groups-${example} PROPERTIES DEPENDS JAVA_groups-${example}-copy-objects ) + + if (NOT example STREQUAL "H5Ex_G_Iterate" AND NOT example STREQUAL "H5Ex_G_Visit") + if (example STREQUAL "H5Ex_G_Compact") + add_test ( + NAME JAVA_groups-${example}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}1.h5 + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}2.h5 + ) + else () + add_test ( + NAME JAVA_groups-${example}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 + ) + endif () + set_tests_properties (JAVA_groups-${example}-clean-objects PROPERTIES + DEPENDS JAVA_groups-${example} + ) + endif () endforeach () endif () diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt index a5e2a67..2ba15c9 100644 --- a/java/examples/intro/CMakeLists.txt +++ b/java/examples/intro/CMakeLists.txt @@ -59,7 +59,8 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL) foreach (example ${HDF_JAVA_EXAMPLES}) add_test ( NAME JAVA_intro-${example}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 + COMMAND ${CMAKE_COMMAND} -E remove + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 ) add_test ( @@ -87,6 +88,15 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL) set_tests_properties (JAVA_intro-${example} PROPERTIES DEPENDS JAVA_intro-${example}-copy-objects ) + + add_test ( + NAME JAVA_intro-${example}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 + ) + set_tests_properties (JAVA_intro-${example}-clean-objects PROPERTIES + DEPENDS JAVA_intro-${example} + ) endforeach () endif () 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 () |