• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@echo off
2REM Copyright (C) 2016 and later: Unicode, Inc. and others.
3REM License & terms of use: http://www.unicode.org/copyright.html
4REM  ********************************************************************
5REM  * COPYRIGHT:
6REM  * Copyright (c) 2010-2014, International Business Machines Corporation
7REM  * and others. All Rights Reserved.
8REM  ********************************************************************
9
10set ICU_ARCH=%1
11set ICU_DBRL=%2
12
13if "%1" == "" (
14echo Usage: %0 "x86 or x64 or ARM or ARM64"  "Debug or Release"
15exit /b 1
16)
17
18if "%2" == "" (
19echo Usage: %0 %1 "Debug or Release"
20exit /b 1
21)
22
23set ICU_OPATH=%PATH%
24
25set ICU_ICUDIR="%~dp0"\..\..
26
27if "%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
37set PATH=%ICU_BINDIR%;%PATH%
38
39echo testing ICU in %ICU_ICUDIR%  arch=%ICU_ARCH% type=%ICU_DBRL%
40pushd %ICU_ICUDIR%
41
42@rem factor these out
43set ICUINFO_CMD=%ICU_ICUDIR%\source\tools\icuinfo\%ICU_ARCH%\%ICU_DBRL%\icuinfo.exe
44set INTLTEST_CMD=%ICU_ICUDIR%\source\test\intltest\%ICU_ARCH%\%ICU_DBRL%\intltest.exe
45set IOTEST_CMD=%ICU_ICUDIR%\source\test\iotest\%ICU_ARCH%\%ICU_DBRL%\iotest.exe
46set CINTLTST_CMD=%ICU_ICUDIR%\source\test\cintltst\%ICU_ARCH%\%ICU_DBRL%\cintltst.exe
47set LETEST_CMD=%ICU_ICUDIR%\source\test\letest\%ICU_ARCH%\%ICU_DBRL%\letest.exe
48
49set ICUFAILED=
50set ICURUN=
51set 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
112REM clean up
113set PATH=%ICU_OPATH%
114REM unset ICU_OPATH
115popd
116
117@REM done
118
119echo -
120echo -
121echo -
122echo ============================================================
123echo Summary: ICU in %ICU_ICUDIR%  arch=%ICU_ARCH% type=%ICU_DBRL%
124echo -
125echo Tests Run    : %ICURUN%
126
127if %ICUFAILCNT% == 0 (
128	echo " - All Passed!"
129	exit /b 0
130)
131echo Failing Tests: %ICUFAILED%
132echo -
133echo FAILED!
134
135exit /b 1
136