summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-01-15 18:28:53 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-01-15 18:28:53 (GMT)
commit7022a3380cdee2fa521c8e21e9897e2a7bf1b95a (patch)
tree2fd57a486ffcbc3c5d700f981a2322d5787f582f /examples
parent26c65e106a430a4c78d88a232d945c156466bc64 (diff)
downloadhdf5-7022a3380cdee2fa521c8e21e9897e2a7bf1b95a.zip
hdf5-7022a3380cdee2fa521c8e21e9897e2a7bf1b95a.tar.gz
hdf5-7022a3380cdee2fa521c8e21e9897e2a7bf1b95a.tar.bz2
HDFFV-11001 need to qualify all by parallel or serial types
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeTests.cmake60
1 files changed, 31 insertions, 29 deletions
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
index ea3b2c5..fd7f1dc 100644
--- a/examples/CMakeTests.cmake
+++ b/examples/CMakeTests.cmake
@@ -64,38 +64,40 @@ set (test_ex_CLEANFILES
vds-eiger.h5
)
-# Remove any output file left over from previous test run
-add_test (
- NAME EXAMPLES-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_CLEANFILES}
-)
-set_tests_properties (EXAMPLES-clear-objects PROPERTIES FIXTURES_SETUP clear_EXAMPLES)
+if (HDF5_TEST_SERIAL)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME EXAMPLES-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_CLEANFILES}
+ )
+ set_tests_properties (EXAMPLES-clear-objects PROPERTIES FIXTURES_SETUP clear_EXAMPLES)
-foreach (example ${examples})
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME EXAMPLES-${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${example}>)
- else ()
- add_test (NAME EXAMPLES-${example} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${example}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=${example}.txt"
- #-D "TEST_REFERENCE=${example}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- set_tests_properties (EXAMPLES-${example} PROPERTIES FIXTURES_REQUIRED clear_EXAMPLES)
- if (last_test)
- set_tests_properties (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "EXAMPLES-${example}")
-endforeach ()
+ foreach (example ${examples})
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME EXAMPLES-${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${example}>)
+ else ()
+ add_test (NAME EXAMPLES-${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=${example}.txt"
+ #-D "TEST_REFERENCE=${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (EXAMPLES-${example} PROPERTIES FIXTURES_REQUIRED clear_EXAMPLES)
+ if (last_test)
+ set_tests_properties (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "EXAMPLES-${example}")
+ endforeach ()
+endif ()
### Windows pops up a modal permission dialog on this test
-if (H5_HAVE_PARALLEL AND NOT WIN32)
+if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL AND NOT WIN32)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME MPI_TEST_EXAMPLES-ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ph5example> ${MPIEXEC_POSTFLAGS})
else ()