From e622c634d5fe078c69e02c91d1054529eaa55b05 Mon Sep 17 00:00:00 2001 From: Scott Wegner Date: Mon, 14 Apr 2008 09:59:52 -0500 Subject: [svn-r14835] 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 --- windows/hdf5bt.BAT | 1 + windows/test/testerror.bat | 6 +++--- windows/tools/h5copy/testh5copy.bat | 4 ++-- windows/tools/h5diff/testh5diff.bat | 2 +- windows/tools/h5dump/testh5dump.bat | 4 ++-- windows/tools/h5dump/testh5dumpxml.bat | 4 ++-- windows/tools/h5import/h5importtestutil.bat | 4 ++-- windows/tools/h5jam/testh5jam.bat | 4 ++-- windows/tools/h5ls/testh5ls.bat | 2 +- windows/tools/h5mkgrp/testh5mkgrp.bat | 4 ++-- windows/tools/h5stat/testh5stat.bat | 4 ++-- 11 files changed, 20 insertions(+), 19 deletions(-) diff --git a/windows/hdf5bt.BAT b/windows/hdf5bt.BAT index 08f48c4..c03027a 100755 --- a/windows/hdf5bt.BAT +++ b/windows/hdf5bt.BAT @@ -45,6 +45,7 @@ setlocal enabledelayedexpansion pushd %~dp0 set nerrors=0 +if "%1"=="/?" goto help goto main rem Print a help message diff --git a/windows/test/testerror.bat b/windows/test/testerror.bat index 3dad50b..7204d99 100644 --- a/windows/test/testerror.bat +++ b/windows/test/testerror.bat @@ -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% - \ No newline at end of file + diff --git a/windows/tools/h5copy/testh5copy.bat b/windows/tools/h5copy/testh5copy.bat index 8fc9f67..7b3d034 100644 --- a/windows/tools/h5copy/testh5copy.bat +++ b/windows/tools/h5copy/testh5copy.bat @@ -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% - \ No newline at end of file + diff --git a/windows/tools/h5diff/testh5diff.bat b/windows/tools/h5diff/testh5diff.bat index fba7ef0..d3c407a 100644 --- a/windows/tools/h5diff/testh5diff.bat +++ b/windows/tools/h5diff/testh5diff.bat @@ -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 ( diff --git a/windows/tools/h5dump/testh5dump.bat b/windows/tools/h5dump/testh5dump.bat index f26a5d9..b8e8210 100644 --- a/windows/tools/h5dump/testh5dump.bat +++ b/windows/tools/h5dump/testh5dump.bat @@ -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 ( diff --git a/windows/tools/h5dump/testh5dumpxml.bat b/windows/tools/h5dump/testh5dumpxml.bat index 7fd04f3..1b7893e 100644 --- a/windows/tools/h5dump/testh5dumpxml.bat +++ b/windows/tools/h5dump/testh5dumpxml.bat @@ -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% - \ No newline at end of file + diff --git a/windows/tools/h5import/h5importtestutil.bat b/windows/tools/h5import/h5importtestutil.bat index c2efe87..e330c41 100644 --- a/windows/tools/h5import/h5importtestutil.bat +++ b/windows/tools/h5import/h5importtestutil.bat @@ -67,7 +67,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" ( @@ -169,4 +169,4 @@ goto main popd endlocal & exit /b %errors% - \ No newline at end of file + diff --git a/windows/tools/h5jam/testh5jam.bat b/windows/tools/h5jam/testh5jam.bat index d3522f1..9a9c5d4 100644 --- a/windows/tools/h5jam/testh5jam.bat +++ b/windows/tools/h5jam/testh5jam.bat @@ -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% - \ No newline at end of file + diff --git a/windows/tools/h5ls/testh5ls.bat b/windows/tools/h5ls/testh5ls.bat index 0329447..3baeda8 100644 --- a/windows/tools/h5ls/testh5ls.bat +++ b/windows/tools/h5ls/testh5ls.bat @@ -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 ( diff --git a/windows/tools/h5mkgrp/testh5mkgrp.bat b/windows/tools/h5mkgrp/testh5mkgrp.bat index 112c106..15de2cd 100644 --- a/windows/tools/h5mkgrp/testh5mkgrp.bat +++ b/windows/tools/h5mkgrp/testh5mkgrp.bat @@ -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% - \ No newline at end of file + diff --git a/windows/tools/h5stat/testh5stat.bat b/windows/tools/h5stat/testh5stat.bat index 3bc6ab0..06ab4ba 100644 --- a/windows/tools/h5stat/testh5stat.bat +++ b/windows/tools/h5stat/testh5stat.bat @@ -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% - \ No newline at end of file + -- cgit v0.12