]> git.saurik.com Git - apple/icu.git/blob - icuSources/allinone/icucheck.bat
ICU-461.18.tar.gz
[apple/icu.git] / icuSources / allinone / icucheck.bat
1 @echo off
2 REM ********************************************************************
3 REM * COPYRIGHT:
4 REM * Copyright (c) 2010, International Business Machines Corporation
5 REM * and others. All Rights Reserved.
6 REM ********************************************************************
7
8 set ICU_ARCH=%1
9 set ICU_DBRL=%2
10
11 if "%1" == "" (
12 echo Usage: %0 "x86 or x64" "Debug or Release"
13 exit /b 1
14 )
15
16 if "%2" == "" (
17 echo Usage: %0 %1 "Debug or Release"
18 exit /b 1
19 )
20
21 set ICU_OPATH=%PATH%
22
23 set ICU_ICUDIR=%~f0\..\..\..
24 set ICU_BINDIR=%ICU_ICUDIR%\bin
25 set PATH=%ICU_BINDIR%;%PATH%
26
27 echo testing ICU in %ICU_ICUDIR% arch=%ICU_ARCH% type=%ICU_DBRL%
28 pushd %ICU_ICUDIR%
29
30 @rem factor these out
31 set ICUINFO_CMD=%ICU_ICUDIR%\source\tools\icuinfo\%ICU_ARCH%\%ICU_DBRL%\icuinfo.exe
32 set INTLTEST_CMD=%ICU_ICUDIR%\source\test\intltest\%ICU_ARCH%\%ICU_DBRL%\intltest.exe
33 set IOTEST_CMD=%ICU_ICUDIR%\source\test\iotest\%ICU_ARCH%\%ICU_DBRL%\iotest.exe
34 set CINTLTST_CMD=%ICU_ICUDIR%\source\test\cintltst\%ICU_ARCH%\%ICU_DBRL%\cintltst.exe
35 set LETEST_CMD=%ICU_ICUDIR%\source\test\letest\%ICU_ARCH%\%ICU_DBRL%\letest.exe
36
37 set ICUFAILED=
38 set ICURUN=
39 set ICUFAILCNT=0
40
41 @echo on
42
43 @set THT=icuinfo
44 @echo ==== %THT% =========================================================================
45 %ICUINFO_CMD% %ICUINFO_OPTS%
46
47 @IF NOT ERRORLEVEL 1 GOTO OK_%THT%
48 @set ICUFAILED=%ICUFAILED% %THT%
49 @set ICUFAILCNT=1
50 :OK_icuinfo
51 @set ICURUN=%ICURUN% %THT%
52
53 @set THT=intltest
54 @echo ==== %THT% =========================================================================
55 @cd %ICU_ICUDIR%\source\test\intltest
56 %INTLTEST_CMD% %INTLTEST_OPTS%
57
58 @IF NOT ERRORLEVEL 1 GOTO OK_%THT%
59 @set ICUFAILED=%ICUFAILED% %THT%
60 @set ICUFAILCNT=1
61 :OK_intltest
62 @set ICURUN=%ICURUN% %THT%
63
64 @set THT=iotest
65 @echo ==== %THT% =========================================================================
66 @cd %ICU_ICUDIR%\source\test\iotest
67 %IOTEST_CMD% %IOTEST_OPTS%
68
69 @IF NOT ERRORLEVEL 1 GOTO OK_%THT%
70 @set ICUFAILED=%ICUFAILED% %THT%
71 @set ICUFAILCNT=1
72 :OK_IOTEST
73 @set ICURUN=%ICURUN% %THT%
74
75 @set THT=cintltst
76 @echo ==== %THT% =========================================================================
77 @cd %ICU_ICUDIR%\source\test\cintltst
78 %CINTLTST_CMD% %CINTLTST_OPTS%
79
80 @IF NOT ERRORLEVEL 1 GOTO OK_%THT%
81 @set ICUFAILED=%ICUFAILED% %THT%
82 @set ICUFAILCNT=1
83 :OK_cintltst
84 @set ICURUN=%ICURUN% %THT%
85
86 @set THT=letest
87 @echo ==== %THT% =========================================================================
88 @cd %ICU_ICUDIR%\source\test\letest
89 %LETST_CMD% %LETEST_OPTS%
90
91 @IF NOT ERRORLEVEL 1 GOTO OK_%THT%
92 @set ICUFAILED=%ICUFAILED% %THT%
93 @set ICUFAILCNT=1
94 :OK_letest
95 @set ICURUN=%ICURUN% %THT%
96
97 @echo off
98
99 REM clean up
100 set PATH=%ICU_OPATH%
101 REM unset ICU_OPATH
102 popd
103
104 @REM done
105
106 echo -
107 echo -
108 echo -
109 echo ============================================================
110 echo Summary:
111 echo -
112 echo Tests Run : %ICURUN%
113
114 if %ICUFAILCNT% == 0 (
115 echo " - All Passed!"
116 exit /b 0
117 )
118 echo Failing Tests: %ICUFAILED%
119 echo -
120 echo FAILED!
121
122 exit /b 1