summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/testh5diff.sh
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-09-16 21:57:27 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-09-16 21:57:27 (GMT)
commit6d97ffcc6cec0c23e718da16fcf0f2043df046c5 (patch)
tree7af1ae3242cdaa989f4813ef1a00d6c91aa8ccb7 /tools/h5diff/testh5diff.sh
parent6cb4260eff978e7dcbbd8014f1188dfd02550779 (diff)
downloadhdf5-6d97ffcc6cec0c23e718da16fcf0f2043df046c5.zip
hdf5-6d97ffcc6cec0c23e718da16fcf0f2043df046c5.tar.gz
hdf5-6d97ffcc6cec0c23e718da16fcf0f2043df046c5.tar.bz2
[svn-r19407] Purpose:
Add --exclude-path option Description: Merged from hdf5 trunk (r19406). Specified path to an object will be excluded from comparing the two files or two groups. If group is specified all the member objects will be excluded. Related to "1890: h5diff excluding object for file comparison via command line" Tested: jam, amani
Diffstat (limited to 'tools/h5diff/testh5diff.sh')
-rwxr-xr-xtools/h5diff/testh5diff.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index f9d58c2..71d78e7 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -56,6 +56,12 @@ DANGLE_LINK_FILE1=h5diff_danglelinks1.h5
DANGLE_LINK_FILE2=h5diff_danglelinks2.h5
GRP_RECURSE_FILE1=h5diff_grp_recurse1.h5
GRP_RECURSE_FILE2=h5diff_grp_recurse2.h5
+# same structure, same obj name with different value
+EXCLUDE_FILE1_1=h5diff_exclude1-1.h5
+EXCLUDE_FILE1_2=h5diff_exclude1-2.h5
+# different structure and obj names
+EXCLUDE_FILE2_1=h5diff_exclude2-1.h5
+EXCLUDE_FILE2_2=h5diff_exclude2-2.h5
TESTNAME=h5diff
EXIT_SUCCESS=0
@@ -727,6 +733,25 @@ TOOLTEST h5diff_512.txt -v --follow-symlinks $GRP_RECURSE_FILE1 $GRP_RECURSE_FIL
TOOLTEST h5diff_513.txt -v $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /slink_grp10 /slink_grp11
TOOLTEST h5diff_514.txt -v --follow-symlinks $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /slink_grp10 /slink_grp11
+# ##############################################################################
+# # Exclude objects (--exclude-path)
+# ##############################################################################
+#
+# Same structure, same names and different value.
+#
+# Exclude the object with different value. Expect return - same
+TOOLTEST h5diff_480.txt -v --exclude-path /group1/dset3 $EXCLUDE_FILE1_1 $EXCLUDE_FILE1_2
+# Verify different by not excluding. Expect return - diff
+TOOLTEST h5diff_481.txt -v $EXCLUDE_FILE1_1 $EXCLUDE_FILE1_2
+
+#
+# Different structure, different names.
+#
+# Exclude all the different objects. Expect return - same
+TOOLTEST h5diff_482.txt -v --exclude-path "/group1" --exclude-path "/dset1" $EXCLUDE_FILE2_1 $EXCLUDE_FILE2_2
+# Exclude only some different objects. Expect return - diff
+TOOLTEST h5diff_483.txt -v --exclude-path "/group1" $EXCLUDE_FILE2_1 $EXCLUDE_FILE2_2
+
# ##############################################################################