summaryrefslogtreecommitdiffstats
path: root/windows
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2008-10-20 16:06:48 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2008-10-20 16:06:48 (GMT)
commit7f758bceb0c57871f14eb11e47106a365699aa97 (patch)
tree8f08e9c9da1e3fb9ce25d343293190d363c0b7b2 /windows
parent3a6ad029167de727ed9d1879d45eba319a91e375 (diff)
downloadhdf5-7f758bceb0c57871f14eb11e47106a365699aa97.zip
hdf5-7f758bceb0c57871f14eb11e47106a365699aa97.tar.gz
hdf5-7f758bceb0c57871f14eb11e47106a365699aa97.tar.bz2
[svn-r15909] Purpose: Various Windows test script updates
Description: This checkin includes updates to Windows test scripts for h5copy, h5diff, and h5dump tools. Each represents minor changes to syntax which emulates the updates made to the general-platform test scripts. Tested: VS2005 on WinXP
Diffstat (limited to 'windows')
-rw-r--r--windows/tools/h5copy/testh5copy.bat67
-rw-r--r--windows/tools/h5diff/testh5diff.bat4
-rw-r--r--windows/tools/h5dump/testh5dump.bat5
3 files changed, 65 insertions, 11 deletions
diff --git a/windows/tools/h5copy/testh5copy.bat b/windows/tools/h5copy/testh5copy.bat
index 120b03a..dc665b2 100644
--- a/windows/tools/h5copy/testh5copy.bat
+++ b/windows/tools/h5copy/testh5copy.bat
@@ -123,7 +123,7 @@ rem $* everything else arguments for h5copy.
if "%3"=="-o" (
set outputfile=%4
) else (
- set h5diff=no
+ set runh5diff=no
)
(
@@ -148,7 +148,48 @@ rem $* everything else arguments for h5copy.
)
if %runh5diff% neq no (
- call :h5difftest %inputfile% %outputfile%
+ call :h5difftest %inputfile% %outputfile% %7 %9
+ )
+
+ exit /b
+
+
+:tooltest_fail
+ set runh5diff=yes
+ if "%1"=="-i" (
+ set inputfile=%2
+ ) else (
+ set runh5diff=no
+ )
+ if "%3"=="-o" (
+ set outputfile=%4
+ ) else (
+ set runh5diff=no
+ )
+
+ (
+ echo.#############################
+ echo. output for %h5copy% %*
+ echo.#############################
+ %h5copy_bin% %*
+ ) > output.out
+
+ if %errorlevel% neq 0 (
+ call :testing *FAILED* %h5copy% %*
+ echo.failed result is:
+ type output.out
+ set /a nerrors=!nerrors!+1
+ ) else (
+ call :testing PASSED %h5copy% %*
+
+ rem Clean up output file
+ if not defined HDF5_NOCLEANUP (
+ del /f output.out
+ )
+ )
+
+ if %runh5diff% neq no (
+ call :h5difftest_fail %inputfile% %outputfile% %7 %9
)
exit /b
@@ -168,6 +209,20 @@ rem
exit /b
+rem Call the h5diff tool with a call that is expected to fail
+rem
+:h5difftest_fail
+ %h5diff_bin% -q %*
+ if %errorlevel% neq 1 (
+ call :verify *FAILED* %*
+ set /a nerrors=!nerrors!+1
+ ) else (
+ call :verify PASSED %*
+ )
+
+ exit /b
+
+
rem Call the h5ls tool to verify the correct output data in the destination file
rem
:h5lstest
@@ -268,17 +323,17 @@ rem <none>
call :tooltest -i %testfile% -o %fileout% -v -s /grp_dsets/simple -d /grp_dsets/simple_group
echo.Test copying ^& renaming group
- call :tooltest -i %testfile% -o %fileout% -v -s grp_dsets -d grp_rename
+ call :tooltest_fail -i %testfile% -o %fileout% -v -s grp_dsets -d grp_rename
echo.Test copying 'full' group hierarchy into group in destination file
- call :tooltest -i %testfile% -o %fileout% -v -s grp_dsets -d /grp_rename/grp_dsets
+ call :tooltest_fail -i %testfile% -o %fileout% -v -s grp_dsets -d /grp_rename/grp_dsets
echo.Test copying objects into group hier. that doesn't exist yet in destination file
call :tooltest -i %testfile% -o %fileout% -vp -s simple -d /A/B1/simple
call :tooltest -i %testfile% -o %fileout% -vp -s simple -d /A/B2/simple2
call :tooltest -i %testfile% -o %fileout% -vp -s /grp_dsets/simple -d /C/D/simple
- call :tooltest -i %testfile% -o %fileout% -vp -s /grp_dsets -d /E/F/grp_dsets
- call :tooltest -i %testfile% -o %fileout% -vp -s /grp_nested -d /G/H/grp_nested
+ call :tooltest_fail -i %testfile% -o %fileout% -vp -s /grp_dsets -d /E/F/grp_dsets
+ call :tooltest_fail -i %testfile% -o %fileout% -vp -s /grp_nested -d /G/H/grp_nested
rem Verify that the file created above is correct
call :h5lstest %fileout%
diff --git a/windows/tools/h5diff/testh5diff.bat b/windows/tools/h5diff/testh5diff.bat
index 7056f02..06369ad 100644
--- a/windows/tools/h5diff/testh5diff.bat
+++ b/windows/tools/h5diff/testh5diff.bat
@@ -237,10 +237,6 @@ rem ############################################################################
call :testing %h5diff% -q %srcfile1% %srcfile2%
call :tooltest h5diff_18.txt -q %file1% %file2%
- rem 1.9 contents mode
- call :testing %h5diff% -v -c %srcfile1% %srcfile11%
- call :tooltest h5diff_19.txt -v -c %file1% %file11%
-
rem ##############################################################################
rem # not comparable types
diff --git a/windows/tools/h5dump/testh5dump.bat b/windows/tools/h5dump/testh5dump.bat
index 2a686f5..7c62f65 100644
--- a/windows/tools/h5dump/testh5dump.bat
+++ b/windows/tools/h5dump/testh5dump.bat
@@ -600,7 +600,10 @@ rem ############################################################################
call :tooltest textlinksrc.ddl textlinksrc.h5
call :tooltest textlinkfar.ddl textlinkfar.h5
-
+ rem tests for traversal of external links
+ call :tooltest textlinksrc.ddl textlinksrc.h5
+ call :tooltest textlinkfar.ddl textlinkfar.h5
+
if %nerrors% equ 0 (
echo.All %dumper% tests passed.