mirror of
git://code.qt.io/qt/qt5.git
synced 2026-04-19 03:26:15 +08:00
Provisioning: Retry python installation if failure occurs
Python installation is flaky and we haven't be able to determine the
root cause for it. Re-running the installation might help.
(Might) because we can't reproduce this manually.
Task-number: QTQAINFRA-3875
Change-Id: Id46d250a02e01007f03dfbb886d75b23c23a6216
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 6e3cb240df)
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
##
|
##
|
||||||
## Copyright (C) 2016 The Qt Company Ltd.
|
## Copyright (C) 2020 The Qt Company Ltd.
|
||||||
## Contact: http://www.qt.io/licensing/
|
## Contact: http://www.qt.io/licensing/
|
||||||
##
|
##
|
||||||
## This file is part of the provisioning scripts of the Qt Toolkit.
|
## This file is part of the provisioning scripts of the Qt Toolkit.
|
||||||
@@ -54,8 +54,30 @@ $internalUrl = "\\ci-files01-hki.intra.qt.io\provisioning\windows\python-$versio
|
|||||||
Write-Host "Fetching from URL..."
|
Write-Host "Fetching from URL..."
|
||||||
Download $externalUrl $internalUrl $package
|
Download $externalUrl $internalUrl $package
|
||||||
Verify-Checksum $package $sha1
|
Verify-Checksum $package $sha1
|
||||||
Write-Host "Installing $package..."
|
|
||||||
Run-Executable "msiexec" "/passive /i $package TARGETDIR=$targetDir ALLUSERS=1"
|
# Python installation is flaky, but seems to pass with second run if error occurs.
|
||||||
|
$stop = $false
|
||||||
|
[int]$retry = "0"
|
||||||
|
do {
|
||||||
|
try {
|
||||||
|
# /levx = e:'All error messages' v:'Verbose' x:'Extra debugging info'
|
||||||
|
Run-Executable "msiexec" "/passive /i $package /levx C:\Windows\Temp\Python_log.log TARGETDIR=$targetDir ALLUSERS=1"
|
||||||
|
$stop = $true
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Get-Content C:\Windows\Temp\Python_log.log -Tail 50
|
||||||
|
if ($retry -gt 2) {
|
||||||
|
Write-Host "Python installation failed!"
|
||||||
|
throw
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Couldn't install python, retrying in 30 seconds"
|
||||||
|
Start-Sleep -s 30
|
||||||
|
$retry = $retry + 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while ($stop -ne $true)
|
||||||
|
|
||||||
# We need to change allowZip64 from 'False' to 'True' to be able to create ZIP files that use the ZIP64 extensions when the zipfile is larger than 2 GB
|
# We need to change allowZip64 from 'False' to 'True' to be able to create ZIP files that use the ZIP64 extensions when the zipfile is larger than 2 GB
|
||||||
Write-Host "Changing allowZip64 value to 'True'..."
|
Write-Host "Changing allowZip64 value to 'True'..."
|
||||||
|
|||||||
Reference in New Issue
Block a user