summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hl/test/CMakeLists.txt4
-rw-r--r--hl/tools/h5watch/CMakeLists.txt10
-rw-r--r--hl/tools/h5watch/Makefile.am4
-rw-r--r--hl/tools/h5watch/extend_dset.c57
4 files changed, 38 insertions, 37 deletions
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 42a175f..987c5bb 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -14,8 +14,8 @@ PROJECT (HDF5_HL_TEST)
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
configure_file (${HDF5_HL_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
-INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
+include_directories (${CMAKE_CURRENT_BINARY_DIR})
+include_directories (${HDF5_TEST_SRC_DIR})
# --------------------------------------------------------------------
# Macro used to add a unit test
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
index e3a7e9d..6d55abc 100644
--- a/hl/tools/h5watch/CMakeLists.txt
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -9,9 +9,9 @@ set (H5WATCH_SOURCES
)
#-- Add h5watch program
-INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
-INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_DIR}/src)
-INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR})
+include_directories (${HDF5_TOOLS_DIR}/lib)
+include_directories (${HDF5_HL_TOOLS_DIR}/src)
+include_directories (${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR})
add_executable (h5watch ${H5WATCH_SOURCES})
TARGET_NAMING (h5watch STATIC)
@@ -20,6 +20,8 @@ target_link_libraries (h5watch ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_T
set_target_properties (h5watch PROPERTIES FOLDER tools/hl)
if (BUILD_TESTING)
+ include_directories (${HDF5_TEST_SRC_DIR})
+ include_directories(${HDF5_HL_SRC_DIR}/test)
#-- Add swmr_check_compat_vfd program
set (hl_swmr_check_compat_vfd_SOURCES
${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/swmr_check_compat_vfd.c
@@ -37,7 +39,7 @@ if (BUILD_TESTING)
add_executable (extend_dset ${extend_dset_SOURCES})
TARGET_NAMING (extend_dset STATIC)
TARGET_C_PROPERTIES (extend_dset STATIC " " " ")
- target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (extend_dset PROPERTIES FOLDER tools/hl)
add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c)
diff --git a/hl/tools/h5watch/Makefile.am b/hl/tools/h5watch/Makefile.am
index 35a08e6..b017e09 100644
--- a/hl/tools/h5watch/Makefile.am
+++ b/hl/tools/h5watch/Makefile.am
@@ -21,7 +21,7 @@
include $(top_srcdir)/config/commence.am
# Include src and tools/lib directories
-AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src
+AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src -I$(top_srcdir)/hl/test
# These are our main targets, the tools
TEST_SCRIPT=testh5watch.sh
@@ -43,7 +43,7 @@ LDADD=$(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
extend_dset_CPPFLAGS=$(AM_CPPFLAGS) -I$(top_srcdir)/test
# Add extend_dset specific library flags here
# (add the main test library to the list of libraries)
-extend_dset_LDADD=$(LDADD) $(LIBH5TEST)
+extend_dset_LDADD=$(LDADD) $(LIBH5TEST) $(LIBHDF5)
#
CHECK_CLEANFILES+=*.h5
diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c
index 4038a4f..f6b4161 100644
--- a/hl/tools/h5watch/extend_dset.c
+++ b/hl/tools/h5watch/extend_dset.c
@@ -13,8 +13,7 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include "H5HLprivate2.h"
-#include "h5test.h"
+#include "h5hltest.h"
/*
* Extending datasets in WATCH.h5 generated by h5watchgentest.c
@@ -35,24 +34,24 @@
/* Size of data buffer */
#define TEST_BUF_SIZE 100
-/*
+/*
* Test variations (incremental) for one-dimensional dataset:
- * Varies from 10->13->12->12->1->3
+ * Varies from 10->13->12->12->1->3
*/
-#define ONE_NTESTS 5
+#define ONE_NTESTS 5
int one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2};
-/*
+/*
* Test variations (incremental) for two-dimensional dataset:
- * Varies from {4,10}->{6,12}->{8,1}->{10,1}->
- * {3,3}->{2,2}->{1,2}->
- * {1,4}->{1,3}->{1,3}
+ * Varies from {4,10}->{6,12}->{8,1}->{10,1}->
+ * {3,3}->{2,2}->{1,2}->
+ * {1,4}->{1,3}->{1,3}
*/
#define TWO_NTESTS 9
int two_tests[TWO_NTESTS][2] = { {2, 2}, {2, -11}, {2, 0},
{-7, 2}, {-1, -1}, {-1, 0},
- {0, 2}, {0, -1}, {0, 0}
- };
+ {0, 2}, {0, -1}, {0, 0}
+ };
static herr_t extend_dset_two(const char *file, char *dname);
static herr_t extend_dset_one(const char *file, char *dname);
@@ -87,7 +86,7 @@ typedef struct set_t {
***********************************************************************
*
* Extending a two-dimensional dataset:
- * dims[0] dims[1]
+ * dims[0] dims[1]
* ------- -------
* case #1: increase increase
* case #2: increase decrease
@@ -99,12 +98,12 @@ typedef struct set_t {
* case #8: same decrease (no action)
* case #9: same same (no action)
*
- * two_tests[TWO_NTESTS][2] = { {2,2}, {2,-11}, {2,0},
+ * two_tests[TWO_NTESTS][2] = { {2,2}, {2,-11}, {2,0},
* {-7,2}, {-1,-1}, {-1,0},
* {0,2}, {0,-1}, {0,0} }
- * varies from {4,10}->{6,12}->{8,1}->{10,1}->
- * {3,3}->{2,2}->{1,2}->
- * {1,4}->{1,3}->{1,3}
+ * varies from {4,10}->{6,12}->{8,1}->{10,1}->
+ * {3,3}->{2,2}->{1,2}->
+ * {1,4}->{1,3}->{1,3}
***********************************************************************
*/
static herr_t
@@ -172,7 +171,7 @@ extend_dset_two(const char *file, char *dname)
/* sleep to emulate about 2 seconds of application operation */
HDsleep(2);
- /* Get current dimension sizes */
+ /* Get current dimension sizes */
if(H5LDget_dset_dims(did, cur_dims) < 0)
goto error;
@@ -187,7 +186,7 @@ extend_dset_two(const char *file, char *dname)
num_elmts = 1;
for(j = 0; j < (unsigned)ndims; j++)
num_elmts *= (unsigned)ext_dims[j];
-
+
/* Compound type */
if(!HDstrcmp(dname, DSET_CMPD_TWO)) {
@@ -254,15 +253,15 @@ error:
***********************************************************************
*
* Extending a one-dimensional dataset
- * Test cases:
- * #1: increase
- * #2: decrease
- * #3: same
- * #4: decrease
- * #5: increase
+ * Test cases:
+ * #1: increase
+ * #2: decrease
+ * #3: same
+ * #4: decrease
+ * #5: increase
*
- * one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2}
- * varies from 10->13->12->12->1->3
+ * one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2}
+ * varies from 10->13->12->12->1->3
*
***********************************************************************
*/
@@ -441,13 +440,13 @@ main(int argc, const char *argv[])
dname = HDstrdup(argv[2]);
if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) {
- if(extend_dset_one(fname, dname) < 0)
+ if(extend_dset_one(fname, dname) < 0)
goto error;
} else if(!HDstrcmp(dname, DSET_ONE) || !HDstrcmp(dname, DSET_ALLOC_LATE) || !HDstrcmp(dname, DSET_ALLOC_EARLY)) {
- if(extend_dset_one(fname, dname) < 0)
+ if(extend_dset_one(fname, dname) < 0)
goto error;
} else if(!HDstrcmp(dname, DSET_TWO) || !HDstrcmp(dname, DSET_CMPD_TWO)) {
- if(extend_dset_two(fname, dname) < 0)
+ if(extend_dset_two(fname, dname) < 0)
goto error;
} else {
HDfprintf(stdout, "Dataset cannot be extended...\n");