summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-04-24 21:44:35 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-04-24 21:44:35 (GMT)
commit9d84abe503267baaf3ddc675a4e3182d7f415be0 (patch)
treec8c6ad68accf6a903f20098b15565311d4b919fb /test
parent2deb953dbbde17712723529c4bca6a2bf3eedf6b (diff)
parent0fb5ce7ad50664f800ffe7e107e0fb0f90f66e12 (diff)
downloadhdf5-9d84abe503267baaf3ddc675a4e3182d7f415be0.zip
hdf5-9d84abe503267baaf3ddc675a4e3182d7f415be0.tar.gz
hdf5-9d84abe503267baaf3ddc675a4e3182d7f415be0.tar.bz2
Merge pull request #457 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '0fb5ce7ad50664f800ffe7e107e0fb0f90f66e12': Correct name of native function Fix javadoc Fix typo Signature change requires a ptr Change H5PLsize() signature Revert HDFFV-9655 Changed signature of H5PLgetsize Revert HDFFV-9655 by disabling test and not using new function. Fix path to actual executable location Windows ahs one more directory level
Diffstat (limited to 'test')
-rw-r--r--test/CMakeTests.cmake16
-rw-r--r--test/plugin.c23
-rw-r--r--test/test_plugin.sh.in22
3 files changed, 39 insertions, 22 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 86c5cb3..6eee237 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -986,8 +986,10 @@ endif ()
##############################################################################
if (WIN32)
set (CMAKE_SEP "\;")
+ set (BIN_REL_PATH "../../")
else ()
set (CMAKE_SEP ":")
+ set (BIN_REL_PATH "../")
endif ()
add_test (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
@@ -996,11 +998,15 @@ set_tests_properties (H5PLUGIN-plugin PROPERTIES
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
)
-add_test (NAME H5PLUGIN-pluginRelative COMMAND $<TARGET_FILE:plugin>)
-set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES
- ENVIRONMENT "HDF5_PLUGIN_PATH=@/../testdir1${CMAKE_SEP}@/../testdir2;srcdir=${HDF5_TEST_BINARY_DIR}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
-)
+##############################################################################
+# HDFFV-9655 relative plugin test disabled
+#
+#add_test (NAME H5PLUGIN-pluginRelative COMMAND $<TARGET_FILE:plugin>)
+#set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES
+# ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}"
+# WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
+#)
+##############################################################################
##############################################################################
### S W M R T E S T S
diff --git a/test/plugin.c b/test/plugin.c
index 2939595..862f99d 100644
--- a/test/plugin.c
+++ b/test/plugin.c
@@ -733,7 +733,7 @@ test_filter_path_apis(void)
if(H5Zfilter_avail(H5Z_FILTER_DYNLIB1) != TRUE) TEST_ERROR
- ndx = H5PLsize();
+ H5PLsize(&ndx);
TESTING(" remove");
/* Remove all existing paths*/
@@ -743,7 +743,8 @@ test_filter_path_apis(void)
TEST_ERROR
} /* end if */
/* Verify the table is empty */
- if(H5PLsize() > 0) TEST_ERROR
+ H5PLsize(&ndx);
+ if(ndx > 0) TEST_ERROR
PASSED();
TESTING(" remove (exceed min)");
@@ -764,7 +765,8 @@ test_filter_path_apis(void)
}
}
/* Verify the table is full */
- if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR
+ H5PLsize(&ndx);
+ if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR
PASSED();
TESTING(" append (exceed)");
@@ -835,7 +837,8 @@ test_filter_path_apis(void)
PASSED();
/* Verify the table is not full */
- if (H5PLsize() != H5PL_MAX_PATH_NUM - 1) TEST_ERROR
+ H5PLsize(&ndx);
+ if (ndx != H5PL_MAX_PATH_NUM - 1) TEST_ERROR
TESTING(" prepend");
/* Prepend one path*/
@@ -846,7 +849,8 @@ test_filter_path_apis(void)
}
/* Verify the table is full */
- if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR
+ H5PLsize(&ndx);
+ if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR
/* Verify that the entries were moved */
if(H5PLget(8, pathname, 256) <= 0) TEST_ERROR
@@ -880,7 +884,8 @@ test_filter_path_apis(void)
}
/* Verify the table is full */
- if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR
+ H5PLsize(&ndx);
+ if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR
/* Verify that the entries were not moved */
if(H5PLget(0, pathname, 256) <= 0) TEST_ERROR
@@ -909,7 +914,8 @@ test_filter_path_apis(void)
PASSED();
/* Verify the table is not full */
- if(H5PLsize() != 15) TEST_ERROR
+ H5PLsize(&ndx);
+ if(ndx != 15) TEST_ERROR
TESTING(" insert");
/* Insert one path*/
@@ -928,7 +934,8 @@ test_filter_path_apis(void)
PASSED();
/* Verify the table is full */
- if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR
+ H5PLsize(&ndx);
+ if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR
TESTING(" insert (exceed)");
/* Exceed the max path insert */
diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in
index 37d4462..4cddbb0 100644
--- a/test/test_plugin.sh.in
+++ b/test/test_plugin.sh.in
@@ -87,23 +87,27 @@ if [ $? != 0 ]; then
nerrors=`expr $nerrors + 1`
fi
+############################################
+# HDFFV-9655 test for relative path disabled
# setup plugin path relative to test
-ENVCMD="env HDF5_PLUGIN_PATH=@/${PLUGIN_LIBDIR1}:@/${PLUGIN_LIBDIR2}"
-
+# actual executable is in the .libs folder
+#ENVCMD="env HDF5_PLUGIN_PATH=@/../${PLUGIN_LIBDIR1}:@/../${PLUGIN_LIBDIR2}"
+#
# Run the test
#$ENVCMD $TEST_BIN
#if [ $? != 0 ]; then
# nerrors=`expr $nerrors + 1`
#fi
+#############################################
# print results
-#if test $nerrors -ne 0 ; then
-# echo "$nerrors errors encountered"
-# exit_code=$EXIT_FAILURE
-#else
-# echo "All Plugin API tests passed."
-# exit_code=$EXIT_SUCCESS
-#fi
+if test $nerrors -ne 0 ; then
+ echo "$nerrors errors encountered"
+ exit_code=$EXIT_FAILURE
+else
+ echo "All Plugin API tests passed."
+ exit_code=$EXIT_SUCCESS
+fi
# Clean up temporary files/directories and leave
$RM $PLUGIN_LIBDIR1 $PLUGIN_LIBDIR2