8000 Update Windows Release scripts to run correct tkinter tests (#32) · python/release-tools@a8894a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit a8894a3

Browse files
authored
Update Windows Release scripts to run correct tkinter tests (#32)
Automatically select correct ttk tests. Output SHA256 hashes as well as MD5
1 parent e7e59f3 commit a8894a3

File tree

2 files changed

+27
-19
lines changed

2 files changed

+27
-19
lines changed

windows-release/stage-publish-pythonorg.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
parameters:
22
BuildToPublish: ''
3+
HashAlgorithms: ['SHA256', 'MD5']
34

45
jobs:
56
- job: Publish_Python
@@ -154,23 +155,24 @@ jobs:
154155
workingDirectory: $(Build.BinariesDirectory)
155156
displayName: 'Test layouts'
156157
157-
- powershell: |
158-
$files = gci -File "msi\*\*.exe", "embed\*.zip"
159-
8000 if ("$(DoCHM)" -ieq "true") {
160-
$files = $files + (gci -File "doc\htmlhelp\python*.chm")
161-
}
162-
$hashes = $files | `
163-
Sort-Object Name | `
164-
Format-Table Name, @{
165-
Label="MD5";
166-
Expression={(Get-FileHash $_ -Algorithm MD5).Hash}
167-
}, Length -AutoSize | `
168-
Out-String -Width 4096
169-
$d = mkdir "$(Build.ArtifactStagingDirectory)\hashes" -Force
170-
$hashes | Out-File "$d\hashes.txt" -Encoding ascii
171-
$hashes
172-
workingDirectory: $(Build.BinariesDirectory)
173-
displayName: 'Generate hashes'
158+
- ${{ each alg in parameters.HashAlgorithms }}:
159+
- powershell: |
160+
$files = gci -File "msi\*\*.exe", "embed\*.zip"
161+
if ("$(DoCHM)" -ieq "true") {
162+
$files = $files + (gci -File "doc\htmlhelp\python*.chm")
163+
}
164+
$hashes = $files | `
165+
Sort-Object Name | `
166+
Format-Table Name, @{
167+
Label="${{ alg }}";
168+
Expression={(Get-FileHash $_ -Algorithm ${{ alg }}).Hash}
169+
}, Length -AutoSize | `
170+
Out-String -Width 4096
171+
$d = mkdir "$(Build.ArtifactStagingDirectory)\hashes" -Force
172+
$hashes | Out-File "$d\hashes.txt" -Encoding ascii -Append
173+
$hashes
174+
workingDirectory: $(Build.BinariesDirectory)
175+
displayName: 'Generate hashes (${{ alg }})'
174176
175177
- powershell: |
176178
"Copying:"

windows-release/stage-test-msi.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,14 @@ jobs:
9191
displayName: 'Test (un)install package'
9292
condition: and(succeeded(), not(variables['SkipTests']))
9393
94-
- script: |
95-
python -m test -uall -v test_ttk_guionly test_tk test_idle
94+
- powershell: |
95+
if (Test-Path -Type Container "$(Build.BinariesDirectory)\Python\Lib\test\test_ttk") {
96+
# New set of tests (3.12 and later)
97+
python -m test -uall -v test_ttk test_tkinter test_idle
98+
} else {
99+
# Old set of tests
100+
python -m test -uall -v test_ttk_guionly test_tk test_idle
101+
}
96102
displayName: 'Test Tkinter and Idle'
97103
condition: and(succeeded(), not(variables['SkipTests']), not(variables['SkipTkTests']))
98104

0 commit comments

Comments
 (0)
0