12e5b6d6dSopenharmony_ci@echo off
22e5b6d6dSopenharmony_ciREM Copyright (C) 2016 and later: Unicode, Inc. and others.
32e5b6d6dSopenharmony_ciREM License & terms of use: http://www.unicode.org/copyright.html
42e5b6d6dSopenharmony_ciREM  ********************************************************************
52e5b6d6dSopenharmony_ciREM  * COPYRIGHT:
62e5b6d6dSopenharmony_ciREM  * Copyright (c) 2010-2014, International Business Machines Corporation
72e5b6d6dSopenharmony_ciREM  * and others. All Rights Reserved.
82e5b6d6dSopenharmony_ciREM  ********************************************************************
92e5b6d6dSopenharmony_ci
102e5b6d6dSopenharmony_ciset ICU_ARCH=%1
112e5b6d6dSopenharmony_ciset ICU_DBRL=%2
122e5b6d6dSopenharmony_ci
132e5b6d6dSopenharmony_ciif "%1" == "" (
142e5b6d6dSopenharmony_ciecho Usage: %0 "x86 or x64 or ARM or ARM64"  "Debug or Release"
152e5b6d6dSopenharmony_ciexit /b 1
162e5b6d6dSopenharmony_ci)
172e5b6d6dSopenharmony_ci
182e5b6d6dSopenharmony_ciif "%2" == "" (
192e5b6d6dSopenharmony_ciecho Usage: %0 %1 "Debug or Release"
202e5b6d6dSopenharmony_ciexit /b 1
212e5b6d6dSopenharmony_ci)
222e5b6d6dSopenharmony_ci
232e5b6d6dSopenharmony_ciset ICU_OPATH=%PATH%
242e5b6d6dSopenharmony_ci
252e5b6d6dSopenharmony_ciset ICU_ICUDIR="%~dp0"\..\..
262e5b6d6dSopenharmony_ci
272e5b6d6dSopenharmony_ciif "%ICU_ARCH%" == "x64" (
282e5b6d6dSopenharmony_ci    set ICU_BINDIR=%~dp0\..\..\bin64
292e5b6d6dSopenharmony_ci) else if "%ICU_ARCH%" == "ARM64" (
302e5b6d6dSopenharmony_ci    set ICU_BINDIR=%~dp0\..\..\binARM64
312e5b6d6dSopenharmony_ci) else if "%ICU_ARCH%" == "ARM" (
322e5b6d6dSopenharmony_ci    set ICU_BINDIR=%~dp0\..\..\binARM
332e5b6d6dSopenharmony_ci) else (
342e5b6d6dSopenharmony_ci    set ICU_BINDIR=%~dp0\..\..\bin
352e5b6d6dSopenharmony_ci)
362e5b6d6dSopenharmony_ci
372e5b6d6dSopenharmony_ciset PATH=%ICU_BINDIR%;%PATH%
382e5b6d6dSopenharmony_ci
392e5b6d6dSopenharmony_ciecho testing ICU in %ICU_ICUDIR%  arch=%ICU_ARCH% type=%ICU_DBRL%
402e5b6d6dSopenharmony_cipushd %ICU_ICUDIR%
412e5b6d6dSopenharmony_ci
422e5b6d6dSopenharmony_ci@rem factor these out
432e5b6d6dSopenharmony_ciset ICUINFO_CMD=%ICU_ICUDIR%\source\tools\icuinfo\%ICU_ARCH%\%ICU_DBRL%\icuinfo.exe
442e5b6d6dSopenharmony_ciset INTLTEST_CMD=%ICU_ICUDIR%\source\test\intltest\%ICU_ARCH%\%ICU_DBRL%\intltest.exe
452e5b6d6dSopenharmony_ciset IOTEST_CMD=%ICU_ICUDIR%\source\test\iotest\%ICU_ARCH%\%ICU_DBRL%\iotest.exe
462e5b6d6dSopenharmony_ciset CINTLTST_CMD=%ICU_ICUDIR%\source\test\cintltst\%ICU_ARCH%\%ICU_DBRL%\cintltst.exe
472e5b6d6dSopenharmony_ciset LETEST_CMD=%ICU_ICUDIR%\source\test\letest\%ICU_ARCH%\%ICU_DBRL%\letest.exe
482e5b6d6dSopenharmony_ci
492e5b6d6dSopenharmony_ciset ICUFAILED=
502e5b6d6dSopenharmony_ciset ICURUN=
512e5b6d6dSopenharmony_ciset ICUFAILCNT=0
522e5b6d6dSopenharmony_ci
532e5b6d6dSopenharmony_ci@echo on
542e5b6d6dSopenharmony_ci
552e5b6d6dSopenharmony_ci@set THT=icuinfo
562e5b6d6dSopenharmony_ci@echo ==== %THT% =========================================================================
572e5b6d6dSopenharmony_ci%ICUINFO_CMD% %ICUINFO_OPTS%
582e5b6d6dSopenharmony_ci
592e5b6d6dSopenharmony_ci@IF %ERRORLEVEL% EQU 0 GOTO OK_%THT%
602e5b6d6dSopenharmony_ci@set ICUFAILED=%ICUFAILED% %THT%
612e5b6d6dSopenharmony_ci@set ICUFAILCNT=1
622e5b6d6dSopenharmony_ci:OK_icuinfo
632e5b6d6dSopenharmony_ci@set ICURUN=%ICURUN% %THT%
642e5b6d6dSopenharmony_ci
652e5b6d6dSopenharmony_ci@set THT=intltest
662e5b6d6dSopenharmony_ci@echo ==== %THT% =========================================================================
672e5b6d6dSopenharmony_ci@cd %ICU_ICUDIR%\source\test\intltest
682e5b6d6dSopenharmony_ci%INTLTEST_CMD% %INTLTEST_OPTS%
692e5b6d6dSopenharmony_ci
702e5b6d6dSopenharmony_ci@IF %ERRORLEVEL% EQU 0 GOTO OK_%THT%
712e5b6d6dSopenharmony_ci@set ICUFAILED=%ICUFAILED% %THT%
722e5b6d6dSopenharmony_ci@set ICUFAILCNT=1
732e5b6d6dSopenharmony_ci:OK_intltest
742e5b6d6dSopenharmony_ci@set ICURUN=%ICURUN% %THT%
752e5b6d6dSopenharmony_ci
762e5b6d6dSopenharmony_ci@set THT=iotest
772e5b6d6dSopenharmony_ci@echo ==== %THT% =========================================================================
782e5b6d6dSopenharmony_ci@cd %ICU_ICUDIR%\source\test\iotest
792e5b6d6dSopenharmony_ci%IOTEST_CMD% %IOTEST_OPTS%
802e5b6d6dSopenharmony_ci
812e5b6d6dSopenharmony_ci@IF %ERRORLEVEL% EQU 0 GOTO OK_%THT%
822e5b6d6dSopenharmony_ci@set ICUFAILED=%ICUFAILED% %THT%
832e5b6d6dSopenharmony_ci@set ICUFAILCNT=1
842e5b6d6dSopenharmony_ci:OK_IOTEST
852e5b6d6dSopenharmony_ci@set ICURUN=%ICURUN% %THT%
862e5b6d6dSopenharmony_ci
872e5b6d6dSopenharmony_ci@set THT=cintltst
882e5b6d6dSopenharmony_ci@echo ==== %THT% =========================================================================
892e5b6d6dSopenharmony_ci@cd %ICU_ICUDIR%\source\test\cintltst
902e5b6d6dSopenharmony_ci%CINTLTST_CMD% %CINTLTST_OPTS%
912e5b6d6dSopenharmony_ci
922e5b6d6dSopenharmony_ci@IF %ERRORLEVEL% EQU 0 GOTO OK_%THT%
932e5b6d6dSopenharmony_ci@set ICUFAILED=%ICUFAILED% %THT%
942e5b6d6dSopenharmony_ci@set ICUFAILCNT=1
952e5b6d6dSopenharmony_ci:OK_cintltst
962e5b6d6dSopenharmony_ci@set ICURUN=%ICURUN% %THT%
972e5b6d6dSopenharmony_ci
982e5b6d6dSopenharmony_ci@REM  (Layout is deprecated - this would require HarfBuzz)
992e5b6d6dSopenharmony_ci@REM  @set THT=letest
1002e5b6d6dSopenharmony_ci@REM  @echo ==== %THT% =========================================================================
1012e5b6d6dSopenharmony_ci@REM  @cd %ICU_ICUDIR%\source\test\letest
1022e5b6d6dSopenharmony_ci@REM  %LETST_CMD% %LETEST_OPTS%
1032e5b6d6dSopenharmony_ci
1042e5b6d6dSopenharmony_ci@REM  @IF %ERRORLEVEL% EQU 0 GOTO OK_%THT%
1052e5b6d6dSopenharmony_ci@REM  @set ICUFAILED=%ICUFAILED% %THT%
1062e5b6d6dSopenharmony_ci@REM  @set ICUFAILCNT=1
1072e5b6d6dSopenharmony_ci@REM  :OK_letest
1082e5b6d6dSopenharmony_ci@REM  @set ICURUN=%ICURUN% %THT%
1092e5b6d6dSopenharmony_ci
1102e5b6d6dSopenharmony_ci@echo off
1112e5b6d6dSopenharmony_ci
1122e5b6d6dSopenharmony_ciREM clean up
1132e5b6d6dSopenharmony_ciset PATH=%ICU_OPATH%
1142e5b6d6dSopenharmony_ciREM unset ICU_OPATH
1152e5b6d6dSopenharmony_cipopd
1162e5b6d6dSopenharmony_ci
1172e5b6d6dSopenharmony_ci@REM done
1182e5b6d6dSopenharmony_ci
1192e5b6d6dSopenharmony_ciecho -
1202e5b6d6dSopenharmony_ciecho -
1212e5b6d6dSopenharmony_ciecho -
1222e5b6d6dSopenharmony_ciecho ============================================================
1232e5b6d6dSopenharmony_ciecho Summary: ICU in %ICU_ICUDIR%  arch=%ICU_ARCH% type=%ICU_DBRL%
1242e5b6d6dSopenharmony_ciecho -
1252e5b6d6dSopenharmony_ciecho Tests Run    : %ICURUN%
1262e5b6d6dSopenharmony_ci
1272e5b6d6dSopenharmony_ciif %ICUFAILCNT% == 0 (
1282e5b6d6dSopenharmony_ci	echo " - All Passed!"
1292e5b6d6dSopenharmony_ci	exit /b 0
1302e5b6d6dSopenharmony_ci)
1312e5b6d6dSopenharmony_ciecho Failing Tests: %ICUFAILED%
1322e5b6d6dSopenharmony_ciecho -
1332e5b6d6dSopenharmony_ciecho FAILED!
1342e5b6d6dSopenharmony_ci
1352e5b6d6dSopenharmony_ciexit /b 1
136