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