[svn-r14836] Purpose: Remove English-specific code from Windows test scripts

Description:
In previous versions of Windows, the builtin 'FC' command (diff equivalent) didn't return proper exit status.  As a work-around, we parsed the message returned to check status.  This relies on English return messages.

In current Windows XP and Windows Vista, FC will return exit status as expected, so we can remove this workaround.  Older platforms where we would need this workaround are no longer supported.

Tested:
VS2005 on Windows XP
Small test on Windows Vista
This commit is contained in:
Scott Wegner 2008-04-14 10:03:26 -05:00
parent 0d68a748cc
commit 79e97a0e9e
11 changed files with 19 additions and 18 deletions

View File

@ -45,6 +45,7 @@ setlocal enabledelayedexpansion
pushd %~dp0
set nerrors=0
if "%1"=="/?" goto help
goto main
rem Print a help message

View File

@ -141,11 +141,11 @@ rem
)
)
fc /w %expect1_parsed% %actual% | find "FC: no diff" > nul
fc /w %expect1_parsed% %actual% > nul
if %errorlevel% equ 0 (
call :testing PASSED %test_err%
) else (
fc /w %expect2_parsed% %actual% | find "FC: no diff" > nul
fc /w %expect2_parsed% %actual% > nul
if !errorlevel! equ 0 (
call :testing PASSED %test_err%
) else (
@ -195,4 +195,4 @@ rem ############################################################################
popd
endlocal & exit /b %nerrors%

View File

@ -211,7 +211,7 @@ rem rem Create the expect file if it doesn't yet exist
rem call :verify_h5ls CREATED %*
rem copy %actual% %expect%
rem ) else (
fc %expect_parsed% %actual_parsed% | find "FC: no diff" > nul
fc %expect_parsed% %actual_parsed% > nul
if %errorlevel% equ 0 (
call :verify_h5ls PASSED %*
) else (
@ -305,4 +305,4 @@ rem ############################################################################
popd
endlocal & exit /b %nerrors%

View File

@ -141,7 +141,7 @@ rem
call :testing CREATED %h5diff% %params%
copy /y %actual% %expect% > nul
) else (
fc /w %expect% %actual% | find "FC: no diff" > nul
fc /w %expect% %actual% > nul
if !errorlevel! equ 0 (
call :testing PASSED %h5diff% %params%
) else (

View File

@ -124,7 +124,7 @@ rem
call :testing CREATED %params%
copy /y %actual% %expect% > nul
) else (
fc /w %expect% %actual% | find "FC: no diff" > nul
fc /w %expect% %actual% > nul
if !errorlevel! equ 0 (
call :testing PASSED %params%
) else (
@ -176,7 +176,7 @@ rem use for the binary tests that expect a full path in -o
call :testing CREATED %params%
copy /y %actual% %expect% > nul
) else (
fc /w %expect% %actual% | find "FC: no diff" > nul
fc /w %expect% %actual% > nul
if !errorlevel! equ 0 (
call :testing PASSED %params%
) else (

View File

@ -89,7 +89,7 @@ rem
call :testing CREATED %params%
copy %actual% %expect% > nul
) else (
fc /w %expect% %actual% | find "FC: no diff" > nul
fc /w %expect% %actual% > nul
if !errorlevel! equ 0 (
call :testing PASSED %params%
) else (
@ -212,4 +212,4 @@ rem ############################################################################
popd
endlocal & exit /b %nerrors%

View File

@ -70,7 +70,7 @@ goto main
%h5dump_bin% %5 > log1
popd
fc /w tmp_testfiles\log1 log2 | find "FC: no diff" > nul
fc /w tmp_testfiles\log1 log2 > nul
if %errorlevel% neq 0 set err=1
del /f log2 tmp_testfiles\log1
if "%err%"=="1" (

View File

@ -249,7 +249,7 @@ rem
rem Compare to 'cmpfile', result is set in result1
set tfile=tt1
%getub_bin% -c %size% %hfile% > %tfile%
fc /w %cmpfile% %tfile% | find "FC: no diff" > nul
fc /w %cmpfile% %tfile% > nul
if %errorlevel% neq 0 (
fc /w %cmpfile% %file%
set result1=1
@ -595,4 +595,4 @@ rem ############################################################################
popd
endlocal & exit /b %nerrors%

View File

@ -124,7 +124,7 @@ rem %2 and on -- argument for the h5ls tool
rem call :testing CREATED %params%
rem copy %actual% %expect% > nul
) else (
fc /w %expect% %actual% | find "FC: no diff" > nul
fc /w %expect% %actual% > nul
if !errorlevel! equ 0 (
call :testing PASSED %params%
) else (

View File

@ -148,7 +148,7 @@ rem
rem copy %actual% %expect%
rem )
fc /w %expect_parsed% %expect_parsed% | find "FC: no diff" > nul
fc /w %expect_parsed% %expect_parsed% > nul
if %errorlevel% equ 0 (
call :verify_h5ls PASSED %*
) else (
@ -251,4 +251,4 @@ rem ############################################################################
popd
endlocal & exit /b %nerrors%

View File

@ -99,7 +99,7 @@ rem
call :testing CREATED %stat% %params%
copy /y %actual% %expect%
) else (
fc /w %expect% %actual% | find "FC: no diff" > nul
fc /w %expect% %actual% > nul
if !errorlevel! equ 0 (
call :testing PASSED %stat% %params%
) else (
@ -173,4 +173,4 @@ rem ############################################################################
popd
endlocal & exit /b %nerrors%