cpython/.azure-pipelines/windows-release/stage-test-msi.yml

109 lines
3.2 KiB
YAML
Raw Normal View History

jobs:
- job: Test_MSI
displayName: Test MSI
pool:
vmName: win2016-vs2017
workspace:
clean: all
strategy:
matrix:
win32_User:
ExeMatch: 'python-[\dabrc.]+-webinstall\.exe'
Logs: $(Build.ArtifactStagingDirectory)\logs\win32_User
InstallAllUsers: 0
win32_Machine:
ExeMatch: 'python-[\dabrc.]+-webinstall\.exe'
Logs: $(Build.ArtifactStagingDirectory)\logs\win32_Machine
InstallAllUsers: 1
amd64_User:
ExeMatch: 'python-[\dabrc.]+-amd64-webinstall\.exe'
Logs: $(Build.ArtifactStagingDirectory)\logs\amd64_User
InstallAllUsers: 0
amd64_Machine:
ExeMatch: 'python-[\dabrc.]+-amd64-webinstall\.exe'
Logs: $(Build.ArtifactStagingDirectory)\logs\amd64_Machine
InstallAllUsers: 1
steps:
- checkout: none
- task: DownloadPipelineArtifact@1
displayName: 'Download artifact: msi'
inputs:
artifactName: msi
targetPath: $(Build.BinariesDirectory)\msi
- powershell: |
$p = (gci -r *.exe | ?{ $_.Name -match '$(ExeMatch)' } | select -First 1)
Write-Host "##vso[task.setvariable variable=SetupExe]$($p.FullName)"
Write-Host "##vso[task.setvariable variable=SetupExeName]$($p.Name)"
displayName: 'Find installer executable'
workingDirectory: $(Build.BinariesDirectory)\msi
- script: >
"$(SetupExe)"
/passive
/log "$(Logs)\install\log.txt"
TargetDir="$(Build.BinariesDirectory)\Python"
Include_debug=1
Include_symbols=1
InstallAllUsers=$(InstallAllUsers)
displayName: 'Install Python'
- powershell: |
$p = gi "$(Build.BinariesDirectory)\Python\python.exe"
Write-Host "##vso[task.prependpath]$(Split-Path -Parent $p)"
displayName: 'Add test Python to PATH'
- script: |
python -c "import sys; print(sys.version)"
displayName: 'Collect version number'
- script: |
python -m site
displayName: 'Collect site'
- powershell: |
gci -r "${env:PROGRAMDATA}\Microsoft\Windows\Start Menu\Programs\Python*"
displayName: 'Capture per-machine Start Menu items'
- powershell: |
gci -r "${env:APPDATA}\Microsoft\Windows\Start Menu\Programs\Python*"
displayName: 'Capture per-user Start Menu items'
- powershell: |
gci -r "HKLM:\Software\WOW6432Node\Python"
displayName: 'Capture per-machine 32-bit registry'
- powershell: |
gci -r "HKLM:\Software\Python"
displayName: 'Capture per-machine native registry'
- powershell: |
gci -r "HKCU:\Software\Python"
displayName: 'Capture current-user registry'
- script: |
python -m pip install "azure<0.10"
python -m pip uninstall -y azure python-dateutil six
displayName: 'Test (un)install package'
- script: |
python -m test -uall -v test_ttk_guionly test_tk test_idle
displayName: 'Test Tkinter and Idle'
- script: >
"$(SetupExe)"
/passive
/uninstall
/log "$(Logs)\uninstall\log.txt"
displayName: 'Uninstall Python'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: logs'
condition: true
continueOnError: true
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\logs'
ArtifactName: msi_testlogs