summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2008-05-30 19:15:08 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2008-05-30 19:15:08 (GMT)
commit454b061aa69c11ccb9f2bc890a5c9e8de6daeba5 (patch)
tree83f4fc40ef74a86e40dc056a02da740b06117260
parent3605a2dc2de66dc28dcab4a248dede40111666f4 (diff)
downloadhdf5-454b061aa69c11ccb9f2bc890a5c9e8de6daeba5.zip
hdf5-454b061aa69c11ccb9f2bc890a5c9e8de6daeba5.tar.gz
hdf5-454b061aa69c11ccb9f2bc890a5c9e8de6daeba5.tar.bz2
[svn-r15107] Purpose: Provide better fix for h5dump xml test failure on Windows
Description: Shortly before the release, we noticed that one of our h5dump xml Windows tests failed when used with a release tarball. This is because of the Unix-style EOL characters in the expected output. For the release, we simply skipped the test. However, we can instead convert the expected output to Windows EOL format, and run the test. This is a backport from the HDF5 trunk. Tested: VS2005 on WinXP
-rw-r--r--windows/tools/h5dump/testh5dumpxml.bat24
1 files changed, 15 insertions, 9 deletions
diff --git a/windows/tools/h5dump/testh5dumpxml.bat b/windows/tools/h5dump/testh5dumpxml.bat
index 7938527..63356aa 100644
--- a/windows/tools/h5dump/testh5dumpxml.bat
+++ b/windows/tools/h5dump/testh5dumpxml.bat
@@ -63,6 +63,7 @@ rem non-zero value.
rem
:tooltest
set expect=%CD%\..\testfiles\%1
+ set expect_eol=%CD%\..\testfiles\%~n1.eol
set actual=%CD%\..\testfiles\%~n1.out
set actual_err=%CD%\..\testfiles\%~n1.err
@@ -93,15 +94,23 @@ rem
if !errorlevel! equ 0 (
call :testing PASSED %params%
) else (
- call :testing *FAILED* %params%
- echo. Expected results ^(*.ddl^) differs from actual results ^(*.out^)
- set /a nerrors=!nerrors!+1
- if "yes"=="%verbose%" fc /w %expect% %actual%
+ rem First, check if the error is caused by Unix-style EOL, because
+ rem FC can fail incorrectly when comparing them. --SJW 5/30/08
+ more < %expect% > %expect_eol%
+ fc /w %expect_eol% %actual% > nul
+ if !errorlevel! equ 0 (
+ call :testing PASSED %params%
+ ) else (
+ call :testing *FAILED* %params%
+ echo. Expected results ^(*.ddl^) differs from actual results ^(*.out^)
+ set /a nerrors=!nerrors!+1
+ if "yes"=="%verbose%" fc /w %expect% %actual%
+ )
)
)
rem Clean up output file
- if not defined HDF5_NOCLEANUP del /f %actual% %actual_err%
+ if not defined HDF5_NOCLEANUP del /f %expect_eol% %actual% %actual_err%
exit /b
@@ -166,10 +175,7 @@ rem ############################################################################
call :tooltest tvldtypes4.h5.xml --xml tvldtypes4.h5
call :tooltest tvldtypes5.h5.xml --xml tvldtypes5.h5
call :tooltest tvlstr.h5.xml --xml tvlstr.h5
- rem Skip this test because it seems to fail when tsaf.h5.xml has unix-style
- rem EOL-characters. --SJW 5/27/08
- rem call :tooltest tsaf.h5.xml --xml tsaf.h5
- call :skip tsaf.h5.xml --xml tsaf.h5
+ call :tooltest tsaf.h5.xml --xml tsaf.h5
call :tooltest tempty.h5.xml --xml tempty.h5
call :tooltest tnamed_dtype_attr.h5.xml --xml tnamed_dtype_attr.h5
rem Test dataset and attribute of null space. Commented out: