diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-08-22 18:41:25 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-08-22 18:41:25 (GMT) |
commit | 7e0bc290129ac8b90a43b563294db4e7eb359078 (patch) | |
tree | ac4e17d4e80cfcfcb626fc0a20e078b99c0ce797 /test | |
parent | ff00749dfc4655281ac8d5347f03234610058caf (diff) | |
download | hdf5-7e0bc290129ac8b90a43b563294db4e7eb359078.zip hdf5-7e0bc290129ac8b90a43b563294db4e7eb359078.tar.gz hdf5-7e0bc290129ac8b90a43b563294db4e7eb359078.tar.bz2 |
[svn-r24056] Move make_executable commands back from tests file
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 155 | ||||
-rw-r--r-- | test/CMakeTests.cmake | 133 |
2 files changed, 156 insertions, 132 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index cd07d40..2704f0c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -155,4 +155,159 @@ TARGET_C_PROPERTIES (testhdf5 " " " ") TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test) +MACRO (ADD_H5_EXE file) + ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) + TARGET_NAMING (${file} ${LIB_TYPE}) + TARGET_C_PROPERTIES (${file} " " " ") + TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) + SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test) +ENDMACRO (ADD_H5_EXE file) + +SET (H5_TESTS + accum + lheap + ohdr + stab + gheap + #cache + #cache_api + #cache_tagging + pool + hyperslab + istore + bittests + dt_arith + dtypes + cmpd_dset + filter_fail + extend + external + efc + objcopy + links + unlink + big + mtime + fillval + mount + flush1 + flush2 + app_ref + enum + set_extent + #ttsafe + getname + vfd + ntypes + dangle + dtransform + reserved + cross_read + freespace + mf + farray + earray + btree2 + fheap + #error_test + #err_compat + tcheck_version + testmeta + #links_env + file_image + enc_dec_plist + enc_dec_plist_with_endianess + unregister +) + +FOREACH (test ${H5_TESTS}) + ADD_H5_EXE(${test}) +ENDFOREACH (test ${H5_TESTS}) + +############################################################################## +############################################################################## +### A D D I T I O N A L T E S T S ### +############################################################################## +############################################################################## + +#-- Adding test for cache +ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) +TARGET_NAMING (cache ${LIB_TYPE}) +TARGET_C_PROPERTIES (cache " " " ") +TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test) + +#-- Adding test for cache_api +ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) +TARGET_NAMING (cache_api ${LIB_TYPE}) +TARGET_C_PROPERTIES (cache_api " " " ") +TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test) + +#-- Adding test for cache_tagging +ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) +TARGET_NAMING (cache_tagging ${LIB_TYPE}) +TARGET_C_PROPERTIES (cache_tagging " " " ") +TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test) + +#-- Adding test for ttsafe +ADD_EXECUTABLE (ttsafe + ${HDF5_TEST_SOURCE_DIR}/ttsafe.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c +) +TARGET_NAMING (ttsafe ${LIB_TYPE}) +TARGET_C_PROPERTIES (ttsafe " " " ") +TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test) + +#-- Adding test for err_compat +IF (HDF5_ENABLE_DEPRECATED_SYMBOLS) + ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c) + TARGET_NAMING (err_compat ${LIB_TYPE}) + TARGET_C_PROPERTIES (err_compat " " " ") + TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test) +ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS) + +#-- Adding test for error_test +ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c) +TARGET_NAMING (error_test ${LIB_TYPE}) +TARGET_C_PROPERTIES (error_test " " " ") +TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test) + +#-- Adding test for links_env +ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c) +TARGET_NAMING (links_env ${LIB_TYPE}) +TARGET_C_PROPERTIES (links_env " " " ") +TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test) + +#-- Adding test for libinfo +SET (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) +FILE (WRITE ${GREP_RUNNER} + "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") +IF (\${TEST_RESULT} STREQUAL \"0\") + MESSAGE (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") +ELSE (\${TEST_RESULT} STREQUAL \"0\") + MESSAGE (STATUS \"COMMAND Result: \${TEST_RESULT}\") +ENDIF (\${TEST_RESULT} STREQUAL \"0\") +" +) + +############################################################################## +### P L U G I N T E S T S +############################################################################## +IF (BUILD_SHARED_LIBS) + ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c) + TARGET_NAMING (plugin ${LIB_TYPE}) + TARGET_C_PROPERTIES (plugin " " " ") + TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET}) + SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test) +ENDIF (BUILD_SHARED_LIBS) + INCLUDE (CMakeTests.cmake) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 0a80f44..b64eeca 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -182,16 +182,6 @@ ENDIF (HDF5_ENABLE_USING_MEMCHECKER) ############################################################################## ############################################################################## -MACRO (ADD_H5_TEST file) - ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file} ${LIB_TYPE}) - TARGET_C_PROPERTIES (${file} " " " ") - TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) - SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test) - - ADD_TEST (NAME ${file} COMMAND $<TARGET_FILE:${file}>) -ENDMACRO (ADD_H5_TEST file) - # Remove any output file left over from previous test run ADD_TEST ( NAME h5test-clear-objects @@ -256,65 +246,8 @@ ADD_TEST ( unregister_filter_2.h5 ) -SET (H5_TESTS - accum - lheap - ohdr - stab - gheap - #cache - #cache_api - #cache_tagging - pool - hyperslab - istore - bittests - dt_arith - dtypes - cmpd_dset - filter_fail - extend - external - efc - objcopy - links - unlink - big - mtime - fillval - mount - flush1 - flush2 - app_ref - enum - set_extent - #ttsafe - getname - vfd - ntypes - dangle - dtransform - reserved - cross_read - freespace - mf - farray - earray - btree2 - fheap - #error_test - #err_compat - tcheck_version - testmeta - #links_env - file_image - enc_dec_plist - enc_dec_plist_with_endianess - unregister -) - FOREACH (test ${H5_TESTS}) - ADD_H5_TEST(${test}) + ADD_TEST (NAME ${test} COMMAND $<TARGET_FILE:${test}>) SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS h5test-clear-objects) ENDFOREACH (test ${H5_TESTS}) @@ -327,11 +260,6 @@ SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1) ############################################################################## #-- Adding test for cache -ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache " " " ") -TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test) ADD_TEST ( NAME h5test-clear-cache-objects COMMAND ${CMAKE_COMMAND} @@ -342,12 +270,6 @@ ADD_TEST (NAME cache COMMAND $<TARGET_FILE:cache>) SET_TESTS_PROPERTIES(cache PROPERTIES DEPENDS h5test-clear-cache-objects) #-- Adding test for cache_api -ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache_api ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache_api " " " ") -TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test) - ADD_TEST ( NAME h5test-clear-cache_api-objects COMMAND ${CMAKE_COMMAND} @@ -358,12 +280,6 @@ ADD_TEST (NAME cache_api COMMAND $<TARGET_FILE:cache_api>) SET_TESTS_PROPERTIES(cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects) #-- Adding test for cache_tagging -ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache_tagging ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache_tagging " " " ") -TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test) - ADD_TEST ( NAME h5test-clear-cache_tagging-objects COMMAND ${CMAKE_COMMAND} @@ -375,18 +291,6 @@ ADD_TEST (NAME cache_tagging COMMAND $<TARGET_FILE:cache_tagging>) SET_TESTS_PROPERTIES(cache_tagging PROPERTIES DEPENDS h5test-clear-cache_tagging-objects) #-- Adding test for ttsafe -ADD_EXECUTABLE (ttsafe - ${HDF5_TEST_SOURCE_DIR}/ttsafe.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c -) -TARGET_NAMING (ttsafe ${LIB_TYPE}) -TARGET_C_PROPERTIES (ttsafe " " " ") -TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test) - ADD_TEST ( NAME h5test-clear-ttsafe-objects COMMAND ${CMAKE_COMMAND} @@ -401,12 +305,6 @@ SET_TESTS_PROPERTIES(ttsafe PROPERTIES DEPENDS h5test-clear-ttsafe-objects) #-- Adding test for err_compat IF (HDF5_ENABLE_DEPRECATED_SYMBOLS) - ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c) - TARGET_NAMING (err_compat ${LIB_TYPE}) - TARGET_C_PROPERTIES (err_compat " " " ") - TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test) - ADD_TEST ( NAME h5test-clear-err_compat-objects COMMAND ${CMAKE_COMMAND} @@ -428,12 +326,6 @@ IF (HDF5_ENABLE_DEPRECATED_SYMBOLS) ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS) #-- Adding test for error_test -ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c) -TARGET_NAMING (error_test ${LIB_TYPE}) -TARGET_C_PROPERTIES (error_test " " " ") -TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test) - ADD_TEST ( NAME h5test-clear-error_test-objects COMMAND ${CMAKE_COMMAND} @@ -455,12 +347,6 @@ SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objec SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::") #-- Adding test for links_env -ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c) -TARGET_NAMING (links_env ${LIB_TYPE}) -TARGET_C_PROPERTIES (links_env " " " ") -TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test) - ADD_TEST ( NAME h5test-clear-links_env-objects COMMAND ${CMAKE_COMMAND} @@ -485,17 +371,6 @@ ADD_TEST (NAME links_env COMMAND "${CMAKE_COMMAND}" SET_TESTS_PROPERTIES(links_env PROPERTIES DEPENDS h5test-clear-links_env-objects) #-- Adding test for libinfo -SET (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) -FILE (WRITE ${GREP_RUNNER} - "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") -IF (\${TEST_RESULT} STREQUAL \"0\") - MESSAGE (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") -ELSE (\${TEST_RESULT} STREQUAL \"0\") - MESSAGE (STATUS \"COMMAND Result: \${TEST_RESULT}\") -ENDIF (\${TEST_RESULT} STREQUAL \"0\") -" -) - ADD_TEST (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}") ############################################################################## @@ -509,12 +384,6 @@ IF (BUILD_SHARED_LIBS) SET(CMAKE_SEP ":") ENDIF(WIN32 AND NOT CYGWIN) - ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c) - TARGET_NAMING (plugin ${LIB_TYPE}) - TARGET_C_PROPERTIES (plugin " " " ") - TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET}) - SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test) - ADD_TEST (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>) SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2") ELSE (BUILD_SHARED_LIBS) |