Skip to content

Commit

Permalink
Runs the flush1/flush2 tests in their own directory
Browse files Browse the repository at this point in the history
Avoids file deletions by other tests.
  • Loading branch information
derobins committed May 27, 2021
1 parent f740f2e commit 746c048
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

# make test dir
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flush")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files")

Expand Down Expand Up @@ -603,7 +604,7 @@ add_test (NAME H5TEST-flush-clear-objects
noflush_extend.h5
noflush_extend-swmr.h5
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
${HDF5_TEST_BINARY_DIR}/H5TEST/flush
)
set_tests_properties (H5TEST-flush-clear-objects PROPERTIES FIXTURES_SETUP clear_flush)
if (HDF5_ENABLE_USING_MEMCHECKER)
Expand All @@ -616,14 +617,14 @@ else ()
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=flush1.txt"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST/flush"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
set_tests_properties (H5TEST-flush1 PROPERTIES
FIXTURES_REQUIRED clear_flush
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST/flush
)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-flush2 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:flush2>)
Expand All @@ -635,12 +636,14 @@ else ()
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=flush2.txt"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST/flush"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
set_tests_properties (H5TEST-flush2 PROPERTIES
FIXTURES_REQUIRED clear_flush
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST/flush
DEPENDS H5TEST-flush1
)

Expand Down

0 comments on commit 746c048

Please sign in to comment.