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