37
37
InstallAllUsers : 1
38
38
39
39
steps :
40
- - checkout : none
40
+ - checkout : self
41
41
42
42
- task : DownloadPipelineArtifact@1
43
43
displayName : ' Download artifact: msi'
@@ -52,90 +52,19 @@ jobs:
52
52
displayName: 'Find installer executable'
53
53
workingDirectory: $(Build.BinariesDirectory)\msi
54
54
55
- - script : >
56
- "$(SetupExe)"
57
- /passive
58
- /log "$(Logs)\install\log.txt"
59
- TargetDir="$(Build.BinariesDirectory)\Python"
60
- Include_debug=1
61
- Include_symbols=1
62
- InstallAllUsers=$(InstallAllUsers)
63
- $(IncludeFreethreadedOpt)
64
- displayName: 'Install Python'
65
-
66
- - powershell : |
67
- gci "$(Build.BinariesDirectory)\python"
68
- displayName: 'List installed files'
69
-
70
- - powershell : |
71
- $p = gi "$(Build.BinariesDirectory)\Python\python.exe"
72
- Write-Host "##vso[task.prependpath]$(Split-Path -Parent $p)"
73
- displayName: 'Add test Python to PATH'
74
-
75
- - script : |
76
- python -c "import sys; print(sys.version)"
77
- displayName: 'Collect version number'
78
- condition: and(succeeded(), not(variables['SkipTests']))
79
-
80
- - script : |
81
- python -m site
82
- displayName: 'Collect site'
83
- condition: and(succeeded(), not(variables['SkipTests']))
84
-
85
- - ${{ if eq(parameters.DoFreethreaded, 'true') }} :
86
- - powershell : |
87
- $p = (gci "$(Build.BinariesDirectory)\Python\python3*t.exe" | select -First 1)
88
- Write-Host "Found $p"
89
- if (-not $p) {
90
- Write-Host "Did not find python3*t.exe in:"
91
- dir "$(Build.BinariesDirectory)\Python"
92
- throw "Free-threaded binaries were not installed"
93
- } else {
94
- & $p -c "import sys; print(sys.version)"
95
- }
96
- displayName: 'Collect free-threaded version number'
97
- condition: and(succeeded(), not(variables['SkipTests']))
98
-
99
- - powershell : |
100
- gci -r "${env:PROGRAMDATA}\Microsoft\Windows\Start Menu\Programs\Python*"
101
- displayName: 'Capture per-machine Start Menu items'
102
- - powershell : |
103
- gci -r "${env:APPDATA}\Microsoft\Windows\Start Menu\Programs\Python*"
104
- displayName: 'Capture per-user Start Menu items'
105
-
106
- - powershell : |
107
- gci -r "HKLM:\Software\WOW6432Node\Python"
108
- displayName: 'Capture per-machine 32-bit registry'
109
- - powershell : |
110
- gci -r "HKLM:\Software\Python"
111
- displayName: 'Capture per-machine native registry'
112
- - powershell : |
113
- gci -r "HKCU:\Software\Python"
114
- displayName: 'Capture current-user registry'
115
-
116
- - script : |
117
- python -m pip install "azure<0.10"
118
- python -m pip uninstall -y azure python-dateutil six
119
- displayName: 'Test (un)install package'
120
- condition: and(succeeded(), not(variables['SkipTests']))
121
-
122
- - powershell : |
123
- if (Test-Path -Type Container "$(Build.BinariesDirectory)\Python\Lib\test\test_ttk") {
124
- # New set of tests (3.12 and later)
125
- python -m test -uall -v test_ttk test_tkinter test_idle
126
- } else {
127
- # Old set of tests
128
- python -m test -uall -v test_ttk_guionly test_tk test_idle
129
- }
130
- displayName: 'Test Tkinter and Idle'
131
- condition: and(succeeded(), not(variables['SkipTests']), not(variables['SkipTkTests']))
132
-
133
- - script : >
134
- "$(SetupExe)"
135
- /passive
136
- /uninstall
137
- /log "$(Logs)\uninstall\log.txt"
138
- displayName: 'Uninstall Python'
55
+ - powershell : >
56
+ docker run --rm
57
+ -v "$(Build.BinariesDirectory)\msi:C:\msi"
58
+ -v "$(Build.SourcesDirectory)\windows-release:C:\scripts"
59
+ -v "$(Build.BinariesDirectory)\tmp:C:\Python"
60
+ -v ('{}:C:\logs' -f (mkdir "$(Build.ArtifactStagingDirectory)\logs"))
61
+ -e InstallAllUsers
62
+ -e IncludeFreethreadedOpt
63
+ -e SkipTests
64
+ -e SkipTkTests
65
+ mcr.microsoft.com/windows/servercore:ltsc2022
66
+ powershell C:\scripts\test-msi.ps1 "C:\msi\$(SetupExeName)"
67
+ displayName: 'Run installer tests'
139
68
140
69
- task : PublishBuildArtifacts@1
141
70
displayName : ' Publish Artifact: logs'
0 commit comments