diff options
author | Songyu Lu <songyulu@hdfgroup.org> | 2019-07-29 16:22:20 (GMT) |
---|---|---|
committer | Songyu Lu <songyulu@hdfgroup.org> | 2019-07-29 16:22:20 (GMT) |
commit | f7cc189609f046ccf1b145fae7b97c70b535e137 (patch) | |
tree | 325c4ec63ea78154d2bfb7d7613f5d661e2763b7 /test/CMakeTests.cmake | |
parent | 59d7db40a72142b9027748e762f4b2e8038aefa9 (diff) | |
download | hdf5-f7cc189609f046ccf1b145fae7b97c70b535e137.zip hdf5-f7cc189609f046ccf1b145fae7b97c70b535e137.tar.gz hdf5-f7cc189609f046ccf1b145fae7b97c70b535e137.tar.bz2 |
1. Updated the commands for compiling two new tests (external_env.c and vds_env.c).
2. Changed the data file names for external.c and external_env.c to avoid potential name conflict.
Diffstat (limited to 'test/CMakeTests.cmake')
-rw-r--r-- | test/CMakeTests.cmake | 197 |
1 files changed, 75 insertions, 122 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 6532536..60271ee 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -560,71 +560,6 @@ if (TEST_CACHE_IMAGE) ) endif () -#-- Adding test for external_env -add_test ( - NAME H5TEST-clear-external_env-objects - COMMAND ${CMAKE_COMMAND} - -D "TEST_PROGRAM=$<TARGET_FILE:external_env>" - -D "TEST_ARGS:STRING=" - -D "TEST_ENV_VAR:STRING=HDF5_EXTFILE_PREFIX" - -D "TEST_ENV_VALUE:STRING=\${ORIGIN}" - -D "TEST_EXPECT=0" - -D "TEST_OUTPUT=external_env.txt" - -D "TEST_REFERENCE=external_env.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - -E remove - extern_1r.raw - extern_2r.raw - extern_3r.raw - extern_4r.raw - extern_1w.raw - extern_2w.raw - extern_3w.raw - extern_4w.raw - external_env.txt - external_env.out - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST -) -set_tests_properties (H5TEST-clear-external_env-objects PROPERTIES FIXTURES_SETUP external_env_clear_objects) -add_test (NAME H5TEST-external_env COMMAND $<TARGET_FILE:external_env>) -set_tests_properties (H5TEST-external_env PROPERTIES - FIXTURES_REQUIRED external_env_clear_objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST -) - -#-- Adding test for vds_env -add_test ( - NAME H5TEST-clear-vds_env-objects - COMMAND ${CMAKE_COMMAND} - -D "TEST_PROGRAM=$<TARGET_FILE:vds_env>" - -D "TEST_ARGS:STRING=" - -D "TEST_ENV_VAR:STRING=HDF5_VDS_PREFIX" - -D "TEST_ENV_VALUE:STRING=\${ORIGIN}/tmp" - -D "TEST_EXPECT=0" - -D "TEST_OUTPUT=vds_env.txt" - -D "TEST_REFERENCE=vds_env.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - -E remove - vds_virt_0.h5 - vds_virt_3.h5 - vds_src_2.h5 - vds_env.txt - vds_env.out - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST -) -set_tests_properties (H5TEST-clear-vds_env-objects PROPERTIES FIXTURES_SETUP vds_env_clear_objects) -add_test (NAME H5TEST-vds_env COMMAND $<TARGET_FILE:vds_env>) -set_tests_properties (H5TEST-vds_env PROPERTIES - FIXTURES_REQUIRED vds_env_clear_objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST -) - #-- Adding test for flush1/2 add_test (NAME H5TEST-clear-flush-objects COMMAND ${CMAKE_COMMAND} @@ -854,66 +789,84 @@ set_tests_properties (H5TEST-links_env PROPERTIES WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) - #-- Adding test for external_env - add_test (NAME H5TEST-shared-clear-external_env-objects - COMMAND ${CMAKE_COMMAND} - -E remove - extern_1r.raw - extern_2r.raw - extern_3r.raw - extern_4r.raw - extern_1w.raw - extern_2w.raw - extern_3w.raw - extern_4w.raw - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - set_tests_properties (H5TEST-shared-clear-external_env-objects PROPERTIES FIXTURES_SETUP shared_external_env_clear_objects) - add_test (NAME H5TEST-shared-external_env COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:external_env-shared>" - -D "TEST_ARGS:STRING=" - -D "TEST_ENV_VAR:STRING=HDF5_EXTFILE_PREFIX" - -D "TEST_ENV_VALUE:STRING=\${ORIGIN}" - -D "TEST_EXPECT=0" - -D "TEST_OUTPUT=external_env.txt" - -D "TEST_REFERENCE=external_env.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - set_tests_properties (H5TEST-shared-external_env PROPERTIES - FIXTURES_REQUIRED shared_external_env_clear_objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared +#-- Adding test for external_env +add_test ( + NAME H5TEST-clear-external_env-objects + COMMAND ${CMAKE_COMMAND} + -E remove + extern_env_1r.raw + extern_env_2r.raw + extern_env_3r.raw + extern_env_4r.raw + extern_env_1w.raw + extern_env_2w.raw + extern_env_3w.raw + extern_env_4w.raw + external_env.txt + external_env.out + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST +) +set_tests_properties (H5TEST-clear-external_env-objects PROPERTIES FIXTURES_SETUP external_env_clear_objects) +if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5TEST-external_env COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:external_env>) +else () + add_test (NAME H5TEST-external_env COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" + -D "TEST_PROGRAM=$<TARGET_FILE:external_env>" + -D "TEST_ARGS:STRING=" + -D "TEST_ENV_VAR:STRING=HDF5_EXTFILE_PREFIX" + -D "TEST_ENV_VALUE:STRING=\${ORIGIN}" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=external_env.txt" + #-D "TEST_REFERENCE=external_env.out" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) +endif () +set_tests_properties (H5TEST-external_env PROPERTIES + FIXTURES_REQUIRED external_env_clear_objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST +) - #-- Adding test for vds_env - add_test (NAME H5TEST-shared-clear-vds_env-objects - COMMAND ${CMAKE_COMMAND} - -E remove - vds_virt_0.h5 - vds_virt_3.h5 - vds_src_2.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - set_tests_properties (H5TEST-shared-clear-vds_env-objects PROPERTIES FIXTURES_SETUP shared_vds_env_clear_objects) - add_test (NAME H5TEST-shared-vds_env COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:vds_env-shared>" - -D "TEST_ARGS:STRING=" - -D "TEST_ENV_VAR:STRING=HDF5_VDS_PREFIX" - -D "TEST_ENV_VALUE:STRING=\${ORIGIN}/tmp" - -D "TEST_EXPECT=0" - -D "TEST_OUTPUT=vds_env.txt" - -D "TEST_REFERENCE=vds_env.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - set_tests_properties (H5TEST-shared-vds_env PROPERTIES - FIXTURES_REQUIRED shared_vds_env_clear_objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared +#-- Adding test for vds_env +add_test ( + NAME H5TEST-clear-vds_env-objects + COMMAND ${CMAKE_COMMAND} + -E remove + vds_virt_0.h5 + vds_virt_3.h5 + vds_src_2.h5 + vds_env.txt + vds_env.out + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST +) +set_tests_properties (H5TEST-clear-vds_env-objects PROPERTIES FIXTURES_SETUP vds_env_clear_objects) +if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5TEST-vds_env COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:vds_env>) +else () + add_test (NAME H5TEST-vds_env COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" + -D "TEST_PROGRAM=$<TARGET_FILE:vds_env>" + -D "TEST_ARGS:STRING=" + -D "TEST_ENV_VAR:STRING=HDF5_VDS_PREFIX" + -D "TEST_ENV_VALUE:STRING=\${ORIGIN}/tmp" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=vds_env.txt" + #-D "TEST_REFERENCE=vds_env.out" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) +endif () +set_tests_properties (H5TEST-vds_env PROPERTIES + FIXTURES_REQUIRED vds_env_clear_objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST +) if (NOT BUILD_SHARED_LIBS) #-- Adding test for libinfo |