1:: Copyright 2022 The Chromium OS Authors. All rights reserved. 2:: Use of this source code is governed by a BSD-style license that can be 3:: found in the LICENSE file. 4 5:: Make environment changes (cd, env vars, etc.) local, so they don't affect the calling batch file 6setlocal 7 8:: Code under repo is checked out to %KOKORO_ARTIFACTS_DIR%\git. 9:: The final directory name in this path is determined by the scm name specified 10:: in the job configuration 11cd %KOKORO_ARTIFACTS_DIR%\git\crosvm 12 13:: Pin rustup to a known/tested version. 14set rustup_version=1.24.3 15 16:: Install rust toolchain through rustup. 17echo [%TIME%] installing rustup %rustup_version% 18choco install -y rustup.install --version=%rustup_version% 19 20:: Reload path for installed rustup binary 21call RefreshEnv.cmd 22 23:: Toolchain version and necessary components will be automatically picked 24:: up from rust-toolchain 25cargo install bindgen 26 27:: Install python. The default kokoro intalled version is 3.7 but linux tests 28:: seem to run on 3.9+. 29choco install -y python 30choco install python --version=3.9.0 31 32:: Reload path for installed rust toolchain. 33call RefreshEnv.cmd 34 35:: Log the version of the Rust toolchain 36echo [%TIME%] Using Rust toolchain version: 37cargo --version 38rustc --version 39 40:: Log python version 41echo [%TIME%] Python version: 42py --version 43 44py -m pip install argh --user 45 46echo [%TIME%] Calling crosvm\tools\clippy 47py .\tools\clippy 48if %ERRORLEVEL% neq 0 ( exit /b %ERRORLEVEL% ) 49 50echo [%TIME%] Calling crosvm\build_test.py 51py ./tools\impl/test_runner.py --arch win64 -v 52if %ERRORLEVEL% neq 0 ( exit /b %ERRORLEVEL% ) 53 54exit /b %ERRORLEVEL% 55