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