summaryrefslogtreecommitdiffstats
path: root/windows/tools/h5copy/testh5copy.bat
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-02-23 21:06:35 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-02-23 21:06:35 (GMT)
commit525f639a91faef977450cf3a7bcfbfe41aa29dcb (patch)
treef2698b8b9760ba54b88d560ffb04fc3145930ece /windows/tools/h5copy/testh5copy.bat
parent47f98f2618a62fcdbab5541c5f85712b1c230a0a (diff)
downloadhdf5-525f639a91faef977450cf3a7bcfbfe41aa29dcb.zip
hdf5-525f639a91faef977450cf3a7bcfbfe41aa29dcb.tar.gz
hdf5-525f639a91faef977450cf3a7bcfbfe41aa29dcb.tar.bz2
[svn-r18322] Updated test script to match *nix shell script.
Tested: windows
Diffstat (limited to 'windows/tools/h5copy/testh5copy.bat')
-rw-r--r--windows/tools/h5copy/testh5copy.bat43
1 files changed, 38 insertions, 5 deletions
diff --git a/windows/tools/h5copy/testh5copy.bat b/windows/tools/h5copy/testh5copy.bat
index 6207521..a0e164a 100644
--- a/windows/tools/h5copy/testh5copy.bat
+++ b/windows/tools/h5copy/testh5copy.bat
@@ -26,6 +26,9 @@ rem setup to support it if we do in the future. --SJW 8/22/07
setlocal enabledelayedexpansion
pushd %~dp0
+set EXIT_SUCCESS=0
+set EXIT_FAILURE=1
+
rem The tool name
set h5copy=h5copy%2
rem The path of the tool binary
@@ -44,7 +47,8 @@ set h5ls_bin=%CD%\..\%h5ls%\%1\%h5ls%
set /a nerrors=0
set verbose=yes
-set srcfile=h5copytst.h5
+set srcfile1=h5copytst.h5
+set srcfile2=h5copy_ref.h5
set indir=%CD%\testfiles
set outdir=%CD%\..\testfiles
@@ -123,7 +127,7 @@ rem $* everything else arguments for h5copy.
if "%3"=="-o" (
set outputfile=%4
) else (
- set h5diff=no
+ set runh5diff=no
)
(
@@ -164,7 +168,7 @@ rem $* everything else arguments for h5copy.
if "%3"=="-o" (
set outputfile=%4
) else (
- set h5diff=no
+ set runh5diff=no
)
(
@@ -293,8 +297,8 @@ rem Assumed arguments:
rem <none>
:copyobjects
- set testfile=%indir%\%srcfile%
- set fileout=%outdir%\%srcfile:.h5=.out.h5%
+ set testfile=%indir%\%srcfile1%
+ set fileout=%outdir%\%srcfile1:.h5=.out.h5%
rem Remove any output file left over from previous test run
del /f %fileout% 2> nul
@@ -346,6 +350,34 @@ rem <none>
exit /b
+
+rem Copy references in various way.
+rem adding to the destination file each time compare the result
+rem
+rem Assumed arguments:
+rem <none>
+:copyreferences
+
+ set testfile=%indir%\%srcfile2%
+ set fileout=%outdir%\%srcfile2:.h5=.out.h5%
+
+ rem Remove any output file left over from previous test run
+ del /f %fileout% 2> nul
+
+ echo.Test copying object and region references
+ rem echo.TOOLTEST -f ref -i $TESTFILE -o $FILEOUT -v -s / -d /COPY
+ call :tooltest -f ref -i %testfile% -o %fileout% -v -s / -d /COPY
+
+ rem Verify that the file created above is correct
+ call :h5lstest %fileout%
+
+ rem Remove output file created, if the "no cleanup" environment variable is
+ rem not defined
+ if not defined HDF5_NOCLEANUP (
+ del /f %fileout%
+ )
+
+ exit /b
rem ##############################################################################
rem ### T H E T E S T S ###
@@ -353,6 +385,7 @@ rem ############################################################################
:main
call :copyobjects
+ call :copyreferences
if %nerrors% equ 0 (
echo.All h5copy tests passed.