azure: Install python3 for vs2015 image
We can't run the standard python installer on the vs2015 image, so we
use an installation of chocolately python3 instead
steps:
- powershell: |
- # test_find_program exercises some behaviour which relies on .py being in PATHEXT
- $env:PATHEXT += ';.py'
-
- where.exe python
-
python ./skip_ci.py --base-branch-env=SYSTEM_PULLREQUEST_TARGETBRANCH --is-pull-env=SYSTEM_PULLREQUEST_PULLREQUESTID --base-branch-origin
if ($LastExitCode -ne 0) {
throw ('error in skip_ci.py')
@@ -45,6 +40,17 @@ steps:
Set-Content "env:$p" "$v"
}
+ # download and install python3 and add to path (since it's not installed in vs2015 image!)
+ if ($env:compiler -eq 'msvc2015') {
+ Set-ExecutionPolicy Bypass -Scope Process -Force
+ iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
+ choco install python3 -y --no-progress --params "/InstallDir:C:\Python3"
+ $env:Path = "C:\Python3;$env:Path"
+ }
+
+ # test_find_program exercises some behaviour which relies on .py being in PATHEXT
+ $env:PATHEXT += ';.py'
+
# add downloads to PATH
$env:Path = "$env:SYSTEM_WORKFOLDER;$env:Path"
@@ -97,6 +103,9 @@ steps:
MSBuild /version
}
+ where.exe python
+ python --version
+
python run_tests.py --backend $(backend)
echo "##vso[task.setvariable variable=test_status]$LastExitCode"
