1f92157deSopenharmony_ci@echo off 2f92157deSopenharmony_ci@rem Copyright 2024 googletest authors. 3f92157deSopenharmony_ci@rem 4f92157deSopenharmony_ci@rem Licensed under the Apache License, Version 2.0 (the "License"); 5f92157deSopenharmony_ci@rem you may not use this file except in compliance with the License. 6f92157deSopenharmony_ci@rem You may obtain a copy of the License at 7f92157deSopenharmony_ci@rem 8f92157deSopenharmony_ci@rem http://www.apache.org/licenses/LICENSE-2.0 9f92157deSopenharmony_ci@rem 10f92157deSopenharmony_ci@rem Unless required by applicable law or agreed to in writing, software 11f92157deSopenharmony_ci@rem distributed under the License is distributed on an "AS IS" BASIS, 12f92157deSopenharmony_ci@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13f92157deSopenharmony_ci@rem See the License for the specific language governing permissions and 14f92157deSopenharmony_ci@rem limitations under the License. 15f92157deSopenharmony_ci 16f92157deSopenharmony_ciSETLOCAL ENABLEDELAYEDEXPANSION 17f92157deSopenharmony_ci 18f92157deSopenharmony_ciSET BAZEL_EXE=%KOKORO_GFILE_DIR%\bazel-5.1.1-windows-x86_64.exe 19f92157deSopenharmony_ci 20f92157deSopenharmony_ciSET PATH=C:\Python37;%PATH% 21f92157deSopenharmony_ciSET BAZEL_PYTHON=C:\python37\python.exe 22f92157deSopenharmony_ciSET BAZEL_SH=C:\tools\msys64\usr\bin\bash.exe 23f92157deSopenharmony_ciSET CMAKE_BIN="C:\Program Files\CMake\bin\cmake.exe" 24f92157deSopenharmony_ciSET CTEST_BIN="C:\Program Files\CMake\bin\ctest.exe" 25f92157deSopenharmony_ciSET CTEST_OUTPUT_ON_FAILURE=1 26f92157deSopenharmony_ci 27f92157deSopenharmony_ciIF EXIST git\googletest ( 28f92157deSopenharmony_ci CD git\googletest 29f92157deSopenharmony_ci) ELSE IF EXIST github\googletest ( 30f92157deSopenharmony_ci CD github\googletest 31f92157deSopenharmony_ci) 32f92157deSopenharmony_ci 33f92157deSopenharmony_ciIF %errorlevel% neq 0 EXIT /B 1 34f92157deSopenharmony_ci 35f92157deSopenharmony_ci:: ---------------------------------------------------------------------------- 36f92157deSopenharmony_ci:: CMake Visual Studio 15 2017 Win64 37f92157deSopenharmony_ciMKDIR cmake_msvc2017 38f92157deSopenharmony_ciCD cmake_msvc2017 39f92157deSopenharmony_ci 40f92157deSopenharmony_ci%CMAKE_BIN% .. ^ 41f92157deSopenharmony_ci -G "Visual Studio 15 2017 Win64" ^ 42f92157deSopenharmony_ci -DPYTHON_EXECUTABLE:FILEPATH=c:\python37\python.exe ^ 43f92157deSopenharmony_ci -DPYTHON_INCLUDE_DIR:PATH=c:\python37\include ^ 44f92157deSopenharmony_ci -DPYTHON_LIBRARY:FILEPATH=c:\python37\lib\site-packages\pip ^ 45f92157deSopenharmony_ci -Dgtest_build_samples=ON ^ 46f92157deSopenharmony_ci -Dgtest_build_tests=ON ^ 47f92157deSopenharmony_ci -Dgmock_build_tests=ON 48f92157deSopenharmony_ciIF %errorlevel% neq 0 EXIT /B 1 49f92157deSopenharmony_ci 50f92157deSopenharmony_ci%CMAKE_BIN% --build . --target ALL_BUILD --config Debug -- -maxcpucount 51f92157deSopenharmony_ciIF %errorlevel% neq 0 EXIT /B 1 52f92157deSopenharmony_ci 53f92157deSopenharmony_ci%CTEST_BIN% -C Debug --timeout 600 54f92157deSopenharmony_ciIF %errorlevel% neq 0 EXIT /B 1 55f92157deSopenharmony_ci 56f92157deSopenharmony_ciCD .. 57f92157deSopenharmony_ciRMDIR /S /Q cmake_msvc2017 58f92157deSopenharmony_ci 59f92157deSopenharmony_ci:: ---------------------------------------------------------------------------- 60f92157deSopenharmony_ci:: Bazel Visual Studio 15 2017 Win64 61f92157deSopenharmony_ci 62f92157deSopenharmony_ciSET BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC 63f92157deSopenharmony_ci%BAZEL_EXE% test ... ^ 64f92157deSopenharmony_ci --compilation_mode=dbg ^ 65f92157deSopenharmony_ci --copt=/std:c++14 ^ 66f92157deSopenharmony_ci --copt=/WX ^ 67f92157deSopenharmony_ci --features=external_include_paths ^ 68f92157deSopenharmony_ci --keep_going ^ 69f92157deSopenharmony_ci --test_output=errors ^ 70f92157deSopenharmony_ci --test_tag_filters=-no_test_msvc2017 71f92157deSopenharmony_ciIF %errorlevel% neq 0 EXIT /B 1 72