Skip to content

Commit

Permalink
Add disabled regex to non-tools test folders
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF committed Nov 16, 2023
1 parent 1d68e45 commit f89ee1c
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 3 deletions.
3 changes: 3 additions & 0 deletions c++/test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ endif ()
set_tests_properties (CPP_testhdf5 PROPERTIES
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
if ("CPP_testhdf5" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (CPP_testhdf5 PROPERTIES DISABLED true)
endif ()

##############################################################################
##############################################################################
Expand Down
3 changes: 3 additions & 0 deletions c++/test/CMakeVFDTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ macro (ADD_VFD_TEST vfdname resultcode)
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT})
if ("CPP_VFD-${vfdname}-cpp_testhdf5" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DISABLED true)
endif ()
endif ()
endmacro ()

Expand Down
18 changes: 18 additions & 0 deletions fortran/test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ endif ()
set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES
FIXTURES_REQUIRED clear_testhdf5_fortran
)
if ("FORTRAN_testhdf5_fortran" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES DISABLED true)
endif ()

#-- Adding test for testhdf5_fortran_1_8
if (HDF5_ENABLE_USING_MEMCHECKER)
Expand All @@ -118,6 +121,9 @@ set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES
DEPENDS FORTRAN_testhdf5_fortran
FIXTURES_REQUIRED clear_testhdf5_fortran
)
if ("FORTRAN_testhdf5_fortran_1_8" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES DISABLED true)
endif ()

#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_USING_MEMCHECKER)
Expand All @@ -142,6 +148,9 @@ set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES
DEPENDS FORTRAN_testhdf5_fortran_1_8
FIXTURES_REQUIRED clear_testhdf5_fortran
)
if ("FORTRAN_fortranlib_test_F03" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES DISABLED true)
endif ()

#-- Adding test for vol_connector
if (HDF5_ENABLE_USING_MEMCHECKER)
Expand All @@ -164,6 +173,9 @@ endif ()
set_tests_properties (FORTRAN_vol_connector PROPERTIES
FIXTURES_REQUIRED clear_testhdf5_fortran
)
if ("FORTRAN_vol_connector" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_vol_connector PROPERTIES DISABLED true)
endif ()

#-- Adding test for fflush1
add_test (
Expand All @@ -177,6 +189,9 @@ add_test (
set_tests_properties (FORTRAN_fflush1 PROPERTIES
DEPENDS FORTRAN_flush1-clear-objects
)
if ("FORTRAN_fflush1" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_fflush1 PROPERTIES DISABLED true)
endif ()

#-- Adding test for fflush2
add_test (
Expand All @@ -186,6 +201,9 @@ add_test (
set_tests_properties (FORTRAN_fflush2 PROPERTIES
DEPENDS FORTRAN_fflush1
)
if ("FORTRAN_fflush2" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_fflush2 PROPERTIES DISABLED true)
endif ()
add_test (
NAME FORTRAN_flush1-clean-objects
COMMAND ${CMAKE_COMMAND} -E remove flush.h5
Expand Down
11 changes: 11 additions & 0 deletions fortran/testpar/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,16 @@
##############################################################################
##############################################################################
add_test (NAME MPI_TEST_FORT_parallel_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:parallel_test> ${MPIEXEC_POSTFLAGS})
if ("MPI_TEST_FORT_parallel_test" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_FORT_parallel_test PROPERTIES DISABLED true)
endif ()

add_test (NAME MPI_TEST_FORT_subfiling_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:subfiling_test> ${MPIEXEC_POSTFLAGS})
if ("MPI_TEST_FORT_subfiling_test" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_FORT_subfiling_test PROPERTIES DISABLED true)
endif ()

add_test (NAME MPI_TEST_FORT_async_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:async_test> ${MPIEXEC_POSTFLAGS})
if ("MPI_TEST_FORT_async_test" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_FORT_async_test PROPERTIES DISABLED true)
endif ()
4 changes: 4 additions & 0 deletions hl/c++/test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ else ()
)
endif ()
set_tests_properties (HL_CPP_ptableTest PROPERTIES DEPENDS HL_CPP_ptableTest-clear-objects)
if ("HL_CPP_ptableTest" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (HL_CPP_ptableTest PROPERTIES DISABLED true)
endif ()
add_test (
NAME HL_CPP_ptableTest-clean-objects
COMMAND ${CMAKE_COMMAND}
Expand All @@ -53,3 +56,4 @@ set_tests_properties (HL_CPP_ptableTest-clean-objects PROPERTIES
DEPENDS HL_CPP_ptableTest
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)

3 changes: 3 additions & 0 deletions hl/fortran/test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ macro (ADD_H5_FORTRAN_TEST file)
FIXTURES_REQUIRED clear_HL_FORTRAN_test
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
if ("HL_FORTRAN_f90_${file}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (HL_FORTRAN_f90_${file} PROPERTIES DISABLED true)
endif ()
endmacro ()

foreach (h5_test ${H5_TESTS})
Expand Down
3 changes: 3 additions & 0 deletions hl/test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ macro (HL_ADD_TEST hl_name)
ENVIRONMENT "srcdir=${HDF5_HL_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR}
)
if ("HL_${hl_name}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (HL_${hl_name} PROPERTIES DISABLED true)
endif ()
endmacro ()

HL_add_test (test_lite )
Expand Down
6 changes: 6 additions & 0 deletions java/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
FIXTURES_REQUIRED clear_JUnit
WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test
)
if ("JUnit-${test_file}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (JUnit-${test_file} PROPERTIES DISABLED true)
endif ()
endforeach ()


Expand Down Expand Up @@ -208,6 +211,9 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test/${volname}
)
if ("JUnit-VOL-${volname}-${voltest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (JUnit-VOL-${volname}-${voltest} PROPERTIES DISABLED true)
endif ()
add_test (
NAME JUnit-VOL-${volname}-${voltest}-clean-objects
COMMAND ${CMAKE_COMMAND} -E remove
Expand Down
6 changes: 3 additions & 3 deletions testpar/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ set_tests_properties (MPI_TEST_testphdf5 PROPERTIES
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_PAR_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
)
if ("MPI_TEST_testphdf5" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_testphdf5 PROPERTIES DISABLED true)
endif ()
if ("MPI_TEST_testphdf5" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_testphdf5 PROPERTIES DISABLED true)
endif ()
if (last_test)
set_tests_properties (MPI_TEST_testphdf5 PROPERTIES DEPENDS ${last_test})
endif ()
Expand Down

0 comments on commit f89ee1c

Please sign in to comment.