summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-03-31 14:02:24 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-03-31 14:02:24 (GMT)
commit8e41b14811129b60914b0db51c34e76e1fb0b7e7 (patch)
tree28cfd5aa35bb8cdd10fe66855991fcec1e47fe54
parent018f92063e4b736819a1b11db0bdfcb684bcc2f4 (diff)
downloadhdf5-8e41b14811129b60914b0db51c34e76e1fb0b7e7.zip
hdf5-8e41b14811129b60914b0db51c34e76e1fb0b7e7.tar.gz
hdf5-8e41b14811129b60914b0db51c34e76e1fb0b7e7.tar.bz2
[svn-r29601] Cleanup case of CMake commands in tools.
Update CTestCustom file for new tests. Add connection from HDF5_ENABLE_USING_MEMCHECKER cmake option to library define USING_MEMCHECKER.
-rw-r--r--CMakeInstallation.cmake1
-rw-r--r--config/cmake/CTestCustom.cmake1
-rw-r--r--config/cmake/ConfigureChecks.cmake5
-rw-r--r--java/test/junit.sh.in20
-rw-r--r--tools/h5copy/CMakeTests.cmake2
-rw-r--r--tools/h5diff/CMakeTests.cmake6
-rw-r--r--tools/h5dump/CMakeTests.cmake5
-rw-r--r--tools/h5dump/CMakeTestsPBITS.cmake6
-rw-r--r--tools/h5dump/CMakeTestsVDS.cmake10
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake4
-rw-r--r--tools/h5ls/CMakeTests.cmake2
-rw-r--r--tools/h5ls/CMakeTestsVDS.cmake2
-rw-r--r--tools/h5repack/CMakeTests.cmake2
13 files changed, 41 insertions, 25 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index bb5f046..8dcaf85 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -530,6 +530,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
)
cpack_add_component (configinstall
DISPLAY_NAME "HDF5 CMake files"
+ HIDDEN
DEPENDS libraries
GROUP Development
INSTALL_TYPES Full Developer User
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 41cb488..85f7d27 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -46,6 +46,7 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5DUMP-clearall-objects
H5DUMP_PACKED_BITS-clearall-objects
H5DUMP-XML-clearall-objects
+ H5DUMP_VDS-clearall-objects
######### tools/h5import #########
H5IMPORT-clear-objects
######### tools/h5jam #########
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 49e9a05..ec0aecf 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -3,7 +3,10 @@
#-----------------------------------------------------------------------------
set (HDF_PREFIX "H5")
include (${HDF_RESOURCES_EXT_DIR}/ConfigureChecks.cmake)
-include (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
+
+if (HDF5_ENABLE_USING_MEMCHECKER)
+ set (H5_USING_MEMCHECKER 1)
+endif (HDF5_ENABLE_USING_MEMCHECKER)
#-----------------------------------------------------------------------------
# Option for --enable-strict-format-checks
diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in
index 698dc5d..f37703a 100644
--- a/java/test/junit.sh.in
+++ b/java/test/junit.sh.in
@@ -34,6 +34,9 @@ AWK='awk'
nerrors=0
verbose=yes
+# setup my machine information.
+myos=`uname -s`
+
# where the libs exist
HDFLIB_HOME="$top_srcdir/java/lib"
BLDLIBDIR="$top_builddir/java/lib"
@@ -231,13 +234,18 @@ sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
-e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
$actual_ext > $actual
-if $CMP $expect $actual; then
- echo " PASSED"
+# SunOS does not support this. Skip it.
+if [ $myos = SunOS ]; then
+ echo " SKIPPED"
else
- echo "*FAILED*"
- echo " Expected result differs from actual result"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ if $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result differs from actual result"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
fi
diff --git a/tools/h5copy/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake
index 9002e5a..4ef49ee 100644
--- a/tools/h5copy/CMakeTests.cmake
+++ b/tools/h5copy/CMakeTests.cmake
@@ -22,7 +22,7 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
+ get_filename_component(fname "${listfiles}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
#message (STATUS " Copying ${listfiles}")
add_custom_command (
diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake
index 0595edd..c815325 100644
--- a/tools/h5diff/CMakeTests.cmake
+++ b/tools/h5diff/CMakeTests.cmake
@@ -267,7 +267,7 @@
# copy test files from source to build dir
#
foreach (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${h5_tstfiles}" NAME)
+ get_filename_component(fname "${h5_tstfiles}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
#message (STATUS " Copying ${fname}")
add_custom_command (
@@ -1115,8 +1115,10 @@ ADD_H5_TEST (h5diff_90 0 -v ${FILE2} ${FILE2})
ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10})
# 11. floating point comparison
+# double value
ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2)
+# float value
ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2)
# with --use-system-epsilon for double value. expect less differences
@@ -1361,7 +1363,7 @@ ADD_H5_TEST (h5diff_517 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
ADD_H5_TEST (h5diff_518 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
# ##############################################################################
-# # Exclude path (--exclude-path)
+# # Exclude objects (--exclude-path)
# ##############################################################################
#
# Same structure, same names and different value.
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
index 9f7e2b0..7897311 100644
--- a/tools/h5dump/CMakeTests.cmake
+++ b/tools/h5dump/CMakeTests.cmake
@@ -1141,10 +1141,10 @@
ADD_H5_TEST_N (tattr-2 0 --enable-error-stack -N /\\\\/attr1 --any_path /attr4 --any_path=/attr5 tattr.h5)
# test for header and error messages
ADD_H5ERR_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5)
- # test for displaying attributes in shared datatype (also in group and dataset)
- ADD_H5_TEST (tnamed_dtype_attr 0 --enable-error-stack tnamed_dtype_attr.h5)
# test for displaying at least 9 attributes on root from a be machine
ADD_H5_TEST (tattr-4_be 0 --enable-error-stack tattr4_be.h5)
+ # test for displaying attributes in shared datatype (also in group and dataset)
+ ADD_H5_TEST (tnamed_dtype_attr 0 --enable-error-stack tnamed_dtype_attr.h5)
# test for displaying soft links and user-defined links
ADD_H5_TEST (tslink-1 0 --enable-error-stack tslink.h5)
@@ -1423,6 +1423,7 @@
# test for dataset region references
ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5)
ADD_H5ERR_MASK_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5)
+ ADD_H5_TEST (tattrreg 0 --enable-error-stack tattrreg.h5)
ADD_H5ERR_MASK_TEST (tattrregR 0 -R --enable-error-stack tattrreg.h5)
ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 --enable-error-stack -d /Dataset1 -s 0 -R -y -o)
diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake
index e76fa0e..745d5b1 100644
--- a/tools/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/h5dump/CMakeTestsPBITS.cmake
@@ -86,7 +86,7 @@
)
foreach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
- GET_FILENAME_COMPONENT(fname "${pbits_h5_file}" NAME)
+ get_filename_component(fname "${pbits_h5_file}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
#message (STATUS " Copying ${pbits_h5_file}")
add_custom_command (
@@ -99,7 +99,7 @@
foreach (ddl_pbits ${HDF5_REFERENCE_PBITS})
- GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
+ get_filename_component(fname "${ddl_pbits}" NAME)
set (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
#message (STATUS " Copying ${ddl_pbits}")
add_custom_command (
@@ -111,7 +111,7 @@
endforeach (ddl_pbits ${HDF5_REFERENCE_PBITS})
foreach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
- GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
+ get_filename_component(fname "${ddl_pbits}" NAME)
set (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
#message (STATUS " Copying ${ddl_pbits}")
add_custom_command (
diff --git a/tools/h5dump/CMakeTestsVDS.cmake b/tools/h5dump/CMakeTestsVDS.cmake
index cc68896..dcb90e0 100644
--- a/tools/h5dump/CMakeTestsVDS.cmake
+++ b/tools/h5dump/CMakeTestsVDS.cmake
@@ -65,7 +65,7 @@
)
foreach (vds_h5_file ${HDF5_REFERENCE_TEST_VDS})
- GET_FILENAME_COMPONENT(fname "${vds_h5_file}" NAME)
+ get_filename_component(fname "${vds_h5_file}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
#message (STATUS " Copying ${vds_h5_file}")
add_custom_command (
@@ -78,7 +78,7 @@
foreach (ddl_vds ${HDF5_REFERENCE_VDS})
- GET_FILENAME_COMPONENT(fname "${ddl_vds}" NAME)
+ get_filename_component(fname "${ddl_vds}" NAME)
set (ddldest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
#message (STATUS " Copying ${ddl_vds}")
add_custom_command (
@@ -90,7 +90,7 @@
endforeach (ddl_vds ${HDF5_REFERENCE_VDS})
foreach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS})
- GET_FILENAME_COMPONENT(fname "${ddl_vds}" NAME)
+ get_filename_component(fname "${ddl_vds}" NAME)
set (ddldest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
#message (STATUS " Copying ${ddl_vds}")
add_custom_command (
@@ -111,7 +111,7 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfilesvds")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif (NOT ${resultcode} STREQUAL "0")
@@ -144,7 +144,7 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> -p ${ARGN})
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfilesvds")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif (NOT ${resultcode} STREQUAL "0")
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake
index 0a667c4..fc6cae7 100644
--- a/tools/h5dump/CMakeTestsXML.cmake
+++ b/tools/h5dump/CMakeTestsXML.cmake
@@ -128,7 +128,7 @@
)
foreach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME)
+ get_filename_component(fname "${tst_xml_h5_file}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
#message (STATUS " Copying ${tst_xml_h5_file}")
add_custom_command (
@@ -140,7 +140,7 @@
endforeach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
foreach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME)
+ get_filename_component(fname "${tst_xml_other_file}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
#message (STATUS " Copying ${tst_xml_other_file}")
add_custom_command (
diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake
index a42fa17..c5aff21 100644
--- a/tools/h5ls/CMakeTests.cmake
+++ b/tools/h5ls/CMakeTests.cmake
@@ -96,7 +96,7 @@
# copy the list of test files
foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
+ get_filename_component(fname "${listfiles}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
#message (STATUS " Copying ${listfiles} to ${dest}")
add_custom_command (
diff --git a/tools/h5ls/CMakeTestsVDS.cmake b/tools/h5ls/CMakeTestsVDS.cmake
index 1ef3f20..3e85803 100644
--- a/tools/h5ls/CMakeTestsVDS.cmake
+++ b/tools/h5ls/CMakeTestsVDS.cmake
@@ -47,7 +47,7 @@
# copy the list of test files
foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
+ get_filename_component(fname "${listfiles}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
#message (STATUS " Copying ${listfiles} to ${dest}")
add_custom_command (
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index 8aee98f..07c3f9c 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -118,7 +118,7 @@
)
foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${h5_file}" NAME)
+ get_filename_component(fname "${h5_file}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
#message (STATUS " Copying ${h5_file}")
add_custom_command (