summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-09-13 16:33:00 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-09-13 16:33:00 (GMT)
commitcafab483ff373731e694096a9cdfdf262ed7cf5f (patch)
tree86c040c1d1bfb7bea553b137228e9908b9458892 /tools
parent2456a36f46a15ca44840cb64c7aac213f0ca8bf8 (diff)
parent05f49d5ffdbd4cf9e967d60a3a0efd0ca7f2c820 (diff)
downloadhdf5-cafab483ff373731e694096a9cdfdf262ed7cf5f.zip
hdf5-cafab483ff373731e694096a9cdfdf262ed7cf5f.tar.gz
hdf5-cafab483ff373731e694096a9cdfdf262ed7cf5f.tar.bz2
Merge pull request #1920 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '05f49d5ffdbd4cf9e967d60a3a0efd0ca7f2c820': (22 commits) HDFFV-10854 add release note for windows Fix get home dir for windows Use variable for test output Allow tests to dump output if not comparing revert as CHECK will first check for exception Clear exception for getting JNI string to clear the exception Correct Windows check revert windows change Windows ssl headers are not in system loacation Add include dirs and default lib for windows Add policy to use <package>_ROOT Add statement for label if code unimplemented Update Windows require for CURL to CMake 3.13 Fix unused var Add updated find module for earlier CMake versions Correct label and var names Add back missing java implementation use h5test.h add test library special windows override ...
Diffstat (limited to 'tools')
-rw-r--r--tools/libtest/CMakeLists.txt19
-rw-r--r--tools/libtest/CMakeTests.cmake2
-rw-r--r--tools/libtest/h5tools_test_utils.c37
3 files changed, 13 insertions, 45 deletions
diff --git a/tools/libtest/CMakeLists.txt b/tools/libtest/CMakeLists.txt
index 105607d..f3d28da 100644
--- a/tools/libtest/CMakeLists.txt
+++ b/tools/libtest/CMakeLists.txt
@@ -5,17 +5,14 @@ project (HDF5_TOOLS_LIBTEST C)
# Add the h5tools_utils test executables
#-----------------------------------------------------------------------------
add_executable (h5tools_test_utils ${HDF5_TOOLS_LIBTEST_SOURCE_DIR}/h5tools_test_utils.c)
-target_include_directories(h5tools_utils PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-TARGET_C_PROPERTIES (h5tools_utils STATIC)
-target_link_libraries (h5tools_utils PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-set_target_properties (h5tools_utils PROPERTIES FOLDER tools)
-
-if (BUILD_SHARED_LIBS)
- add_executable (h5tools_utils-shared ${HDF5_TOOLS_LIBTEST_SOURCE_DIR}/h5tools_utils.c)
- target_include_directories(h5tools_utils-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (h5tools_utils-shared SHARED)
- target_link_libraries (h5tools_utils-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- set_target_properties (h5tools_utils-shared PROPERTIES FOLDER tools)
+target_include_directories(h5tools_test_utils PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT ONLY_SHARED_LIBS)
+ TARGET_C_PROPERTIES (h5tools_test_utils STATIC)
+ target_link_libraries (h5tools_test_utils PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (h5tools_test_utils SHARED)
+ target_link_libraries (h5tools_test_utils PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET})
endif ()
+set_target_properties (h5tools_test_utils PROPERTIES FOLDER tools)
include (CMakeTests.cmake)
diff --git a/tools/libtest/CMakeTests.cmake b/tools/libtest/CMakeTests.cmake
index 403969d..4feee9b 100644
--- a/tools/libtest/CMakeTests.cmake
+++ b/tools/libtest/CMakeTests.cmake
@@ -34,7 +34,7 @@
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5LIBTEST-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
- add_test (NAME H5LIBTEST-${resultfile} COMMAND $<TARGET_FILE:h5tools_utils> ${ARGN})
+ add_test (NAME H5LIBTEST-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5tools_test_utils> ${ARGN})
if (NOT "${resultcode}" STREQUAL "0")
set_tests_properties (H5LIBTEST-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index b4d66e0..7908519 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -16,40 +16,11 @@
* Jacob Smith 2017-11-10
*/
-#include "hdf5.h"
-#include "H5private.h"
#include "h5tools_utils.h"
-/* #include "h5test.h" */ /* linking failure */
+#include "h5test.h"
#define UTIL_TEST_DEBUG 0
-#ifndef _H5TEST_
-
-#define UTIL_AT() HDfprintf(stdout, " at %s:%d in %s()...\n", \
- __FILE__, __LINE__, FUNC);
-
-#define UTIL_FAILED(msg) { \
- HDfprintf(stdout, "*FAILED*"); AT() \
- if (msg == NULL) { \
- HDfprintf(stdout,"(NULL)\n"); \
- } else { \
- HDfprintf(stdout, "%s\n", msg); \
- } \
- HDfflush(stdout); \
-}
-
-#define UTIL_TESTING(msg) { \
- HDfprintf(stdout, "TESTING %-62s", (msg)); \
- HDfflush(stdout); \
-}
-
-#define UTIL_PASSED() { \
- HDfprintf(stdout, " PASSED\n"); \
- HDfflush(stdout); \
-}
-
-#endif /* ifndef _H5TEST_ */
-
#ifndef __js_test__
#define __js_test__ 1L
@@ -548,7 +519,7 @@ test_parse_tuple(void)
- UTIL_TESTING("arbitrary-count tuple parsing");
+ TESTING("arbitrary-count tuple parsing");
#if H5TOOLS_UTILS_TEST_DEBUG > 0
show_progress = TRUE;
@@ -641,7 +612,7 @@ test_populate_ros3_fa(void)
int bad_version = 0xf87a; /* arbitrarily wrong version number */
#endif /* H5_HAVE_ROS3_VFD */
- UTIL_TESTING("programmatic ros3 fapl population");
+ TESTING("programmatic ros3 fapl population");
#ifndef H5_HAVE_ROS3_VFD
HDputs(" -SKIP-");
@@ -1172,7 +1143,7 @@ test_set_configured_fapl(void)
n_cases += 5;
#endif /* H5_HAVE_LIBHDFS */
- UTIL_TESTING("programmatic fapl set");
+ TESTING("programmatic fapl set");
for (unsigned i = 0; i < n_cases; i++) {
int result;