summaryrefslogtreecommitdiffstats
path: root/windows
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-09-16 18:09:59 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-09-16 18:09:59 (GMT)
commita9a3f22e786983ec4e946bd1a8cdd42ec8058c53 (patch)
treed144bfe7cf780f925535a2466ce37059e6917123 /windows
parent9f028ea4589cfd21ce610050c75895ed69b2ee08 (diff)
downloadhdf5-a9a3f22e786983ec4e946bd1a8cdd42ec8058c53.zip
hdf5-a9a3f22e786983ec4e946bd1a8cdd42ec8058c53.tar.gz
hdf5-a9a3f22e786983ec4e946bd1a8cdd42ec8058c53.tar.bz2
[svn-r19401] Purpose:
Fix for Bug1975 h5diff - support recursive comparison on group when specified as an object Description: Merged from hdf5 trunk (r19400). Compare member objects and groups recursively when two files or groups are specified to be compared. Support parallel diff and handling symbolic links accordingly. Tested: jam, amani
Diffstat (limited to 'windows')
-rw-r--r--windows/tools/h5diff/testh5diff.bat122
1 files changed, 93 insertions, 29 deletions
diff --git a/windows/tools/h5diff/testh5diff.bat b/windows/tools/h5diff/testh5diff.bat
index 0023ec3..17babe4 100644
--- a/windows/tools/h5diff/testh5diff.bat
+++ b/windows/tools/h5diff/testh5diff.bat
@@ -48,6 +48,8 @@ set srcfile17=h5diff_ext2softlink_src.h5
set srcfile18=h5diff_ext2softlink_trg.h5
set srclnkfile1=h5diff_danglelinks1.h5
set srclnkfile2=h5diff_danglelinks2.h5
+set src_grp_recurse1=h5diff_grp_recurse1.h5
+set src_grp_recurse2=h5diff_grp_recurse2.h5
set file1=%indir%\h5diff_basic1.h5
set file2=%indir%\h5diff_basic2.h5
@@ -69,6 +71,8 @@ set file17=%indir%\h5diff_ext2softlink_src.h5
set file18=%indir%\h5diff_ext2softlink_trg.h5
set lnkfile1=%indir%\h5diff_danglelinks1.h5
set lnkfile2=%indir%\h5diff_danglelinks2.h5
+set grp_recurse1=%indir%\h5diff_grp_recurse1.h5
+set grp_recurse2=%indir%\h5diff_grp_recurse2.h5
rem The tool name
@@ -222,7 +226,7 @@ rem The tests
rem To avoid the printing of the complete full path of the test file, that hides
rem all the other parameters for long paths, the printing of the command line
rem is done first in
-rem TESTING with the name only of the test file $TOOL, not its full path $TESTFILErem ############################################################################
+rem TESTING with the name only of the test file $TOOL, not its full path $TESTFILE
rem ############################################################################
rem ############################################################################
@@ -282,9 +286,9 @@ rem ############################################################################
call :testing %h5diff% -q %srcfile1% %srcfile2%
call :tooltest h5diff_18.txt -q %file1% %file2%
- rem ##############################################################################
+ rem ########################################################################
rem # not comparable types
- rem ##############################################################################
+ rem ########################################################################
rem 2.0
call :testing %h5diff% -v %srcfile3% %srcfile3% dset g1
@@ -298,9 +302,9 @@ rem ############################################################################
call :testing %h5diff% -v %srcfile3% %srcfile3% dset t1
call :tooltest h5diff_22.txt -v %file3% %file3% dset t1
- rem ##############################################################################
+ rem #######################################################################
rem # compare groups, types, links (no differences and differences)
- rem ##############################################################################
+ rem #######################################################################
rem 2.3
call :testing %h5diff% -v %srcfile3% %srcfile3% g1 g1
@@ -328,9 +332,9 @@ rem ############################################################################
- rem ##############################################################################
+ rem ########################################################################
rem # Dataset datatypes
- rem ##############################################################################
+ rem ########################################################################
rem 5.0
call :testing %h5diff% -v %srcfile4% %srcfile4% dset0a dset0b
@@ -368,19 +372,23 @@ rem ############################################################################
call :testing %h5diff% -v %srcfile7% %srcfile8% refreg
call :tooltest h5diff_58.txt -v %file7% %file8% refreg
- rem ##############################################################################
+ rem ########################################################################
rem # Error messages
- rem ##############################################################################
+ rem ########################################################################
rem 6.0: Check if the command line number of arguments is less than 3
call :testing %h5diff% %srcfile1%
call :tooltest h5diff_600.txt %file1%
+ rem 6.1: Check if non-exist object name is specified
+ call :testing %h5diff% %srcfile1% %srcfile1% nono_obj
+ call :tooltest h5diff_601.txt %file1% %file1% nono_obj
- rem ##############################################################################
+
+ rem ########################################################################
rem # -d
- rem ##############################################################################
+ rem ########################################################################
rem 6.3: negative value
@@ -416,9 +424,9 @@ rem ############################################################################
call :tooltest h5diff_610.txt -d 1 %file1% %file2% g1/dset3 g1/dset4
- rem ##############################################################################
+ rem ########################################################################
rem # -p
- rem ##############################################################################
+ rem ########################################################################
@@ -455,9 +463,9 @@ rem ############################################################################
call :tooltest h5diff_619.txt -p 0.005 %file1% %file2% g1/dset3 g1/dset4
- rem ##############################################################################
+ rem ########################################################################
rem # -n
- rem ##############################################################################
+ rem ########################################################################
rem 6.21: negative value
call :testing %h5diff% -n -4 %srcfile1% %srcfile2% g1/dset3 g1/dset4
@@ -496,15 +504,15 @@ rem ############################################################################
call :testing %h5diff% file1.h6 file2.h6
call :tooltest h5diff_629.txt file1.h6 file2.h6
- rem ##############################################################################
+ rem ########################################################################
rem 7. attributes
- rem ##############################################################################
+ rem ########################################################################
call :testing %h5diff% -v %srcfile5% %srcfile6%
call :tooltest h5diff_70.txt -v %file5% %file6%
- rem ##############################################################################
+ rem #######################################################################
rem 8. all dataset datatypes
- rem ##############################################################################
+ rem #######################################################################
call :testing %h5diff% -v %srcfile7% %srcfile8%
call :tooltest h5diff_80.txt -v %file7% %file8%
@@ -513,13 +521,13 @@ rem ############################################################################
call :tooltest h5diff_90.txt -v %file2% %file2%
rem 10. read by hyperslab, print indexes
- rem ##############################################################################
+ rem #######################################################################
rem Not skipped on windows as this has not been a problem - ADB 1/22/2009
rem if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then
rem # skip this test which sometimes hangs in some THG machines
rem SKIP -v $SRCFILE9 $SRCFILE10
rem else
- rem ##############################################################################
+ rem #######################################################################
call :testing %h5diff% -v %srcfile9% %srcfile10%
call :tooltest h5diff_100.txt -v %file9% %file10%
rem fi
@@ -563,16 +571,16 @@ rem ############################################################################
call :testing %h5diff% -c %srcfile2% %srcfile2% g2/dset8 g2/dset9
call :tooltest h5diff_207.txt -c %file2% %file2% g2/dset8 g2/dset9
- rem ##############################################################################
+ rem #######################################################################
rem # Links compare without --follow-symlinks nor --no-dangling-links
- rem ##############################################################################
+ rem #######################################################################
rem test for bug1749
call :testing %h5diff% -v %srcfile12% %srcfile12% /link_g1 /link_g2
call :tooltest h5diff_300.txt -v %file12% %file12% /link_g1 /link_g2
- rem ##############################################################################
+ rem #######################################################################
rem # Links compare with --follow-symlinks Only
- rem ##############################################################################
+ rem #######################################################################
rem soft links file to file
call :testing %h5diff% --follow-symlinks -v %srcfile13% %srcfile13%
call :tooltest h5diff_400.txt --follow-symlinks -v %file13% %file13%
@@ -678,9 +686,9 @@ rem ############################################################################
call :tooltest h5diff_425.txt --follow-symlinks -v %file17% %file17% /ext_link_to_slink1 /ext_link_to_slink2
- rem ##############################################################################
+ rem #######################################################################
rem # Dangling links compare (--follow-symlinks and --no-dangling-links)
- rem ##############################################################################
+ rem #######################################################################
rem dangling links --follow-symlinks (FILE to FILE)
call :testing %h5diff% --follow-symlinks -v %srclnkfile1% %srclnkfile2%
call :tooltest h5diff_450.txt --follow-symlinks -v %lnkfile1% %lnkfile2%
@@ -721,10 +729,66 @@ rem ############################################################################
call :testing %h5diff% --follow-symlinks -v --no-dangling-links %srcfile15% %srcfile15% /ext_link_noexist1 /ext_link_noexist2
call :tooltest h5diff_459.txt --follow-symlinks -v --no-dangling-links %file15% %file15% /ext_link_noexist1 /ext_link_noexist2
+ rem ########################################################################
+ rem # test for group diff recursivly
+ rem ########################################################################
+ rem root
+ call :testing %h5diff% -v %src_grp_recurse1% %src_grp_recurse2% / /
+ call :tooltest h5diff_500.txt -v %grp_recurse1% %grp_recurse2% / /
+
+ call :testing %h5diff% -v --follow-symlinks %src_grp_recurse1% %src_grp_recurse2% / /
+ call :tooltest h5diff_501.txt -v --follow-symlinks %grp_recurse1% %grp_recurse2% / /
+
+ rem root vs group
+ call :testing %h5diff% -v %src_grp_recurse1% %src_grp_recurse2% / /grp1/grp2/grp3
+ call :tooltest h5diff_502.txt -v %grp_recurse1% %grp_recurse2% / /grp1/grp2/grp3
+
+ rem group vs group (same name and structure)
+ call :testing %h5diff% -v %src_grp_recurse1% %src_grp_recurse2% /grp1 /grp1
+ call :tooltest h5diff_503.txt -v %grp_recurse1% %grp_recurse2% /grp1 /grp1
+
+ rem group vs group (different name and structure)
+ call :testing %h5diff% -v %src_grp_recurse1% %src_grp_recurse2% /grp1/grp2 /grp1/grp2/grp3
+ call :tooltest h5diff_504.txt -v %grp_recurse1% %grp_recurse2% /grp1/grp2 /grp1/grp2/grp3
+
+ rem groups vs soft-link
+ call :testing %h5diff%
+ call :tooltest h5diff_505.txt -v %grp_recurse1% %grp_recurse2% /grp1 /slink_grp1
+
+ call :testing %h5diff% -v --follow-symlinks %src_grp_recurse1% %src_grp_recurse2% /grp1/grp2 /slink_grp2
+ call :tooltest h5diff_506.txt -v --follow-symlinks %grp_recurse1% %grp_recurse2% /grp1/grp2 /slink_grp2
+
+ rem groups vs ext-link
+ call :testing %h5diff% -v %src_grp_recurse1% %src_grp_recurse2% /grp1 /elink_grp1
+ call :tooltest h5diff_507.txt -v %grp_recurse1% %grp_recurse2% /grp1 /elink_grp1
+
+ call :testing %h5diff% -v --follow-symlinks %src_grp_recurse1% %src_grp_recurse2% /grp1 /elink_grp1
+ call :tooltest h5diff_508.txt -v --follow-symlinks %grp_recurse1% %grp_recurse2% /grp1 /elink_grp1
+
+ rem soft-link vs ext-link
+ call :testing %h5diff% -v %src_grp_recurse1% %src_grp_recurse2% /slink_grp1 /elink_grp1
+ call :tooltest h5diff_509.txt -v %grp_recurse1% %grp_recurse2% /slink_grp1 /elink_grp1
+
+ call :testing %h5diff% -v --follow-symlinks %src_grp_recurse1% %src_grp_recurse2% /slink_grp1 /elink_grp1
+ call :tooltest h5diff_510.txt -v --follow-symlinks %grp_recurse1% %grp_recurse2% /slink_grp1 /elink_grp1
+
+ rem circled ext links
+ call :testing %h5diff% -v %src_grp_recurse1% %src_grp_recurse2% /grp10 /grp11
+ call :tooltest h5diff_511.txt -v %grp_recurse1% %grp_recurse2% /grp10 /grp11
+
+ call :testing %h5diff% -v --follow-symlinks %src_grp_recurse1% %src_grp_recurse2% /grp10 /grp11
+ call :tooltest h5diff_512.txt -v --follow-symlinks %grp_recurse1% %grp_recurse2% /grp10 /grp11
+
+ rem circled soft2ext-link vs soft2ext-link
+ call :testing %h5diff% -v %src_grp_recurse1% %src_grp_recurse2% /slink_grp10 /slink_grp11
+ call :tooltest h5diff_513.txt -v %grp_recurse1% %grp_recurse2% /slink_grp10 /slink_grp11
+
+ call :testing %h5diff% -v --follow-symlinks %src_grp_recurse1% %src_grp_recurse2% /slink_grp10 /slink_grp11
+ call :tooltest h5diff_514.txt -v --follow-symlinks %grp_recurse1% %grp_recurse2% /slink_grp10 /slink_grp11
- rem ##############################################################################
+ rem #######################################################################
rem # END
- rem ##############################################################################
+ rem #######################################################################
if %nerrors% equ 0 (
echo.All %h5diff% tests passed.