summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/CMakeLists.txt
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-09-17 12:45:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-09-17 12:45:55 (GMT)
commit6747ebd9858374ae912b6182024861b1710518c8 (patch)
tree9bd75142d9dd292fe4272118f650f1c91205a988 /tools/h5diff/CMakeLists.txt
parent9de3a84f916168831f29a4259fe93cb4823d8f57 (diff)
downloadhdf5-6747ebd9858374ae912b6182024861b1710518c8.zip
hdf5-6747ebd9858374ae912b6182024861b1710518c8.tar.gz
hdf5-6747ebd9858374ae912b6182024861b1710518c8.tar.bz2
[svn-r19413] Description:
Bring r19349:19411 from trunk to revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.4 (amazon) in debug mode Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
Diffstat (limited to 'tools/h5diff/CMakeLists.txt')
-rw-r--r--tools/h5diff/CMakeLists.txt134
1 files changed, 116 insertions, 18 deletions
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index 1342cd2..924c4ec 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -15,16 +15,7 @@ ADD_EXECUTABLE (h5diff
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
H5_NAMING (h5diff)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5diff
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5diff)
TARGET_LINK_LIBRARIES (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5diff)
@@ -42,14 +33,7 @@ IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
H5_NAMING (h5diffgentest)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (h5diffgentest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (h5diffgentest)
TARGET_LINK_LIBRARIES (h5diffgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
@@ -130,6 +114,10 @@ IF (BUILD_TESTING)
h5diff_457.txt
h5diff_458.txt
h5diff_459.txt
+ h5diff_480.txt
+ h5diff_481.txt
+ h5diff_482.txt
+ h5diff_483.txt
h5diff_50.txt
h5diff_51.txt
h5diff_52.txt
@@ -139,7 +127,21 @@ IF (BUILD_TESTING)
h5diff_56.txt
h5diff_57.txt
h5diff_58.txt
+ h5diff_500.txt
+ h5diff_501.txt
+ h5diff_503.txt
+ h5diff_504.txt
+ h5diff_505.txt
+ h5diff_506.txt
+ h5diff_507.txt
+ h5diff_508.txt
+ h5diff_509.txt
+ h5diff_510.txt
+ h5diff_512.txt
+ h5diff_513.txt
+ h5diff_514.txt
h5diff_600.txt
+ h5diff_601.txt
h5diff_603.txt
h5diff_604.txt
h5diff_605.txt
@@ -190,6 +192,16 @@ IF (BUILD_TESTING)
h5diff_ext2softlink_trg.h5
h5diff_danglelinks1.h5
h5diff_danglelinks2.h5
+ h5diff_grp_recurse1.h5
+ h5diff_grp_recurse2.h5
+ h5diff_grp_recurse_ext1.h5
+ h5diff_grp_recurse_ext2-1.h5
+ h5diff_grp_recurse_ext2-2.h5
+ h5diff_grp_recurse_ext2-3.h5
+ h5diff_exclude1-1.h5
+ h5diff_exclude1-2.h5
+ h5diff_exclude2-1.h5
+ h5diff_exclude2-2.h5
)
FOREACH (txt_file ${HDF5_REFERENCE_FILES})
@@ -294,6 +306,20 @@ SET (FILE17 h5diff_ext2softlink_src.h5)
SET (FILE18 h5diff_ext2softlink_trg.h5)
SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5)
SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
+SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
+SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5)
+# group recursive - same structure via external links through files
+SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5)
+SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5)
+SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5)
+SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5)
+# same structure, same obj name with different value
+SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5)
+SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5)
+# different structure and obj names
+SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5)
+SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
+
# ############################################################################
# # Common usage
@@ -418,6 +444,9 @@ ADD_H5_TEST (h5diff_58 1 -v ${FILE7} ${FILE8} refreg)
# 6.0: Check if the command line number of arguments is less than 3
ADD_H5_TEST (h5diff_600 1 ${FILE1})
+# 6.1: Check if non-exist object name is specified
+ADD_H5_TEST (h5diff_601 2 ${FILE1} ${FILE1} nono_obj)
+
# ##############################################################################
# # -d
@@ -675,6 +704,75 @@ ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} $
# dangling link found for ext links (obj to obj). Both dangle links
ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2)
+
+# ##############################################################################
+# # test for group diff recursivly
+# ##############################################################################
+# root
+ADD_H5_TEST (h5diff_500 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /)
+ADD_H5_TEST (h5diff_501 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /)
+
+# root vs group
+ADD_H5_TEST (h5diff_502 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /grp1/grp2/grp3)
+
+# group vs group (same name and structure)
+ADD_H5_TEST (h5diff_503 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /grp1)
+
+# group vs group (different name and structure)
+ADD_H5_TEST (h5diff_504 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /grp1/grp2/grp3)
+
+# groups vs soft-link
+ADD_H5_TEST (h5diff_505 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /slink_grp1)
+ADD_H5_TEST (h5diff_506 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /slink_grp2)
+
+# groups vs ext-link
+ADD_H5_TEST (h5diff_507 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1)
+ADD_H5_TEST (h5diff_508 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1)
+
+# soft-link vs ext-link
+ADD_H5_TEST (h5diff_509 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1)
+ADD_H5_TEST (h5diff_510 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1)
+
+# circled ext links
+ADD_H5_TEST (h5diff_511 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11)
+ADD_H5_TEST (h5diff_512 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11)
+
+# circled soft2ext-link vs soft2ext-link
+ADD_H5_TEST (h5diff_513 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11)
+ADD_H5_TEST (h5diff_514 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11)
+
+###############################################################################
+# Test for group recursive diff via multi-linked external links
+# With follow-symlinks, file $GRP_RECURSE1_EXT and $GRP_RECURSE2_EXT1 should
+# be same with the external links.
+###############################################################################
+# file vs file
+ADD_H5_TEST (h5diff_515 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1})
+ADD_H5_TEST (h5diff_516 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1})
+# group vs group
+ADD_H5_TEST (h5diff_517 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
+ADD_H5_TEST (h5diff_518 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
+
+
+# ##############################################################################
+# # Exclude path (--exclude-path)
+# ##############################################################################
+#
+# Same structure, same names and different value.
+#
+# Exclude the object with different value. Expect return - same
+ADD_H5_TEST (h5diff_480 0 -v --exclude-path /group1/dset3 ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2})
+# Verify different by not excluding. Expect return - diff
+ADD_H5_TEST (h5diff_481 1 -v ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2})
+
+#
+# Different structure, different names.
+#
+# Exclude all the different objects. Expect return - same
+ADD_H5_TEST (h5diff_482 0 -v --exclude-path "/group1" --exclude-path "/dset1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2})
+# Exclude only some different objects. Expect return - diff
+ADD_H5_TEST (h5diff_483 1 -v --exclude-path "/group1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2})
+
ENDIF (BUILD_TESTING)