From 79e97a0e9e51cff09a6ad30b8880220ac71ad357 Mon Sep 17 00:00:00 2001 From: Scott Wegner Date: Mon, 14 Apr 2008 10:03:26 -0500 Subject: [PATCH] [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 --- 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 | 2 +- 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, 19 insertions(+), 18 deletions(-) diff --git a/windows/hdf5bt.BAT b/windows/hdf5bt.BAT index ea8f6d5d7c..192940e490 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 3dad50b4b4..7204d99f5d 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 8fc9f67f5d..7b3d03446f 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 fba7ef0888..d3c407af24 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 9f202c5fa8..5de0dfe579 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 7fd04f3114..1b7893e7e6 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 03738cc304..ed9c63a439 100644 --- a/windows/tools/h5import/h5importtestutil.bat +++ b/windows/tools/h5import/h5importtestutil.bat @@ -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" ( diff --git a/windows/tools/h5jam/testh5jam.bat b/windows/tools/h5jam/testh5jam.bat index d3522f1c50..9a9c5d409f 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 032944774f..3baeda87b9 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 112c106df3..15de2cd1d8 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 3bc6ab0c93..06ab4ba6c6 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 +