michael@0: @echo off michael@0: REM ******************************************************************** michael@0: REM * COPYRIGHT: michael@0: REM * Copyright (c) 2010-2012, International Business Machines Corporation michael@0: REM * and others. All Rights Reserved. michael@0: REM ******************************************************************** michael@0: michael@0: set ICU_ARCH=%1 michael@0: set ICU_DBRL=%2 michael@0: michael@0: if "%1" == "" ( michael@0: echo Usage: %0 "x86 or x64" "Debug or Release" michael@0: exit /b 1 michael@0: ) michael@0: michael@0: if "%2" == "" ( michael@0: echo Usage: %0 %1 "Debug or Release" michael@0: exit /b 1 michael@0: ) michael@0: michael@0: set ICU_OPATH=%PATH% michael@0: michael@0: set ICU_ICUDIR="%~dp0"\..\.. michael@0: michael@0: if "%ICU_ARCH%" == "x64" ( michael@0: set ICU_BINDIR=%~dp0\..\..\bin64 michael@0: ) else ( michael@0: set ICU_BINDIR=%~dp0\..\..\bin michael@0: ) michael@0: michael@0: set PATH=%ICU_BINDIR%;%PATH% michael@0: michael@0: echo testing ICU in %ICU_ICUDIR% arch=%ICU_ARCH% type=%ICU_DBRL% michael@0: pushd %ICU_ICUDIR% michael@0: michael@0: @rem factor these out michael@0: set ICUINFO_CMD=%ICU_ICUDIR%\source\tools\icuinfo\%ICU_ARCH%\%ICU_DBRL%\icuinfo.exe michael@0: set INTLTEST_CMD=%ICU_ICUDIR%\source\test\intltest\%ICU_ARCH%\%ICU_DBRL%\intltest.exe michael@0: set IOTEST_CMD=%ICU_ICUDIR%\source\test\iotest\%ICU_ARCH%\%ICU_DBRL%\iotest.exe michael@0: set CINTLTST_CMD=%ICU_ICUDIR%\source\test\cintltst\%ICU_ARCH%\%ICU_DBRL%\cintltst.exe michael@0: set LETEST_CMD=%ICU_ICUDIR%\source\test\letest\%ICU_ARCH%\%ICU_DBRL%\letest.exe michael@0: michael@0: set ICUFAILED= michael@0: set ICURUN= michael@0: set ICUFAILCNT=0 michael@0: michael@0: @echo on michael@0: michael@0: @set THT=icuinfo michael@0: @echo ==== %THT% ========================================================================= michael@0: %ICUINFO_CMD% %ICUINFO_OPTS% michael@0: michael@0: @IF NOT ERRORLEVEL 1 GOTO OK_%THT% michael@0: @set ICUFAILED=%ICUFAILED% %THT% michael@0: @set ICUFAILCNT=1 michael@0: :OK_icuinfo michael@0: @set ICURUN=%ICURUN% %THT% michael@0: michael@0: @set THT=intltest michael@0: @echo ==== %THT% ========================================================================= michael@0: @cd %ICU_ICUDIR%\source\test\intltest michael@0: %INTLTEST_CMD% %INTLTEST_OPTS% michael@0: michael@0: @IF NOT ERRORLEVEL 1 GOTO OK_%THT% michael@0: @set ICUFAILED=%ICUFAILED% %THT% michael@0: @set ICUFAILCNT=1 michael@0: :OK_intltest michael@0: @set ICURUN=%ICURUN% %THT% michael@0: michael@0: @set THT=iotest michael@0: @echo ==== %THT% ========================================================================= michael@0: @cd %ICU_ICUDIR%\source\test\iotest michael@0: %IOTEST_CMD% %IOTEST_OPTS% michael@0: michael@0: @IF NOT ERRORLEVEL 1 GOTO OK_%THT% michael@0: @set ICUFAILED=%ICUFAILED% %THT% michael@0: @set ICUFAILCNT=1 michael@0: :OK_IOTEST michael@0: @set ICURUN=%ICURUN% %THT% michael@0: michael@0: @set THT=cintltst michael@0: @echo ==== %THT% ========================================================================= michael@0: @cd %ICU_ICUDIR%\source\test\cintltst michael@0: %CINTLTST_CMD% %CINTLTST_OPTS% michael@0: michael@0: @IF NOT ERRORLEVEL 1 GOTO OK_%THT% michael@0: @set ICUFAILED=%ICUFAILED% %THT% michael@0: @set ICUFAILCNT=1 michael@0: :OK_cintltst michael@0: @set ICURUN=%ICURUN% %THT% michael@0: michael@0: @set THT=letest michael@0: @echo ==== %THT% ========================================================================= michael@0: @cd %ICU_ICUDIR%\source\test\letest michael@0: %LETST_CMD% %LETEST_OPTS% michael@0: michael@0: @IF NOT ERRORLEVEL 1 GOTO OK_%THT% michael@0: @set ICUFAILED=%ICUFAILED% %THT% michael@0: @set ICUFAILCNT=1 michael@0: :OK_letest michael@0: @set ICURUN=%ICURUN% %THT% michael@0: michael@0: @echo off michael@0: michael@0: REM clean up michael@0: set PATH=%ICU_OPATH% michael@0: REM unset ICU_OPATH michael@0: popd michael@0: michael@0: @REM done michael@0: michael@0: echo - michael@0: echo - michael@0: echo - michael@0: echo ============================================================ michael@0: echo Summary: ICU in %ICU_ICUDIR% arch=%ICU_ARCH% type=%ICU_DBRL% michael@0: echo - michael@0: echo Tests Run : %ICURUN% michael@0: michael@0: if %ICUFAILCNT% == 0 ( michael@0: echo " - All Passed!" michael@0: exit /b 0 michael@0: ) michael@0: echo Failing Tests: %ICUFAILED% michael@0: echo - michael@0: echo FAILED! michael@0: michael@0: exit /b 1