summaryrefslogtreecommitdiffstats
path: root/windows/tools/h5copy/testh5copy.bat
diff options
context:
space:
mode:
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%