summaryrefslogtreecommitdiffstats
path: root/windows/tools/h5copy/testh5copy.bat
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2008-11-17 19:12:14 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2008-11-17 19:12:14 (GMT)
commitb3b538cf581ecf0a5ce9fa883a16061fda84b881 (patch)
tree6e1d3e944094ef3a2c51dcde772b2a0ee8535c18 /windows/tools/h5copy/testh5copy.bat
parente86e9f49f65d15a120d5933b8be5c9fb118aa4ab (diff)
downloadhdf5-b3b538cf581ecf0a5ce9fa883a16061fda84b881.zip
hdf5-b3b538cf581ecf0a5ce9fa883a16061fda84b881.tar.gz
hdf5-b3b538cf581ecf0a5ce9fa883a16061fda84b881.tar.bz2
[svn-r16084] Purpose: Update Windows tool test scripts
Description: Bring changes from the various tool test scripts to Windows. testh5copy.bat: add syntax for tests which expect h5diff to fail, and apply them to existing tests testh5diff.bat: add a new test for "contents mode" testh5dump.bat: modify some tests to use the new "-b *" and "-b NATIVE" syntax h5repack.bat: call h5dump without the -c switch Tested: VS2005 on WinXP
Diffstat (limited to 'windows/tools/h5copy/testh5copy.bat')
-rw-r--r--windows/tools/h5copy/testh5copy.bat65
1 files changed, 60 insertions, 5 deletions
diff --git a/windows/tools/h5copy/testh5copy.bat b/windows/tools/h5copy/testh5copy.bat
index 120b03a..6207521 100644
--- a/windows/tools/h5copy/testh5copy.bat
+++ b/windows/tools/h5copy/testh5copy.bat
@@ -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 h5diff=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%