mirror of
git://code.qt.io/qt/qt5.git
synced 2026-06-22 03:17:31 +08:00
Add script to run all (provisioning) shell scripts in given directory
To build / test Qt on a fresh VM, all provisioning scripts have to be
run.
Provide a shell script to facilitate this on Windows.
Fixes: QTQAINFRA-7906
Pick-to: 6.11 6.8
Change-Id: Ib06f75d7402f72e0496bab35aeb2ac89d1064537
Reviewed-by: Simo Fält <simo.falt@qt.io>
(cherry picked from commit 4f97b4bea8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
committed by
Qt Cherry-pick Bot
parent
707c9b73d1
commit
21de9acbb0
37
coin/provisioning/utils/windows/qt_run_all.ps1
Normal file
37
coin/provisioning/utils/windows/qt_run_all.ps1
Normal file
@@ -0,0 +1,37 @@
|
||||
# Copyright (C) 2026 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#
|
||||
# Usage: .\qt_run_all.ps1 [directory]
|
||||
# Script to run all provisioning scripts in the current directory in alphabetical order
|
||||
# for the purpose of manually provisioning a freshly installed Windows system
|
||||
#
|
||||
# Caution:
|
||||
# - Don't copy this to or call it from a platform provisioning directory
|
||||
# - It's not guaranteed that scripts are run in the exact same order as during COIN provisioning
|
||||
|
||||
param(
|
||||
[string]$Dir = "."
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# Resolve to absolute path
|
||||
$Dir = Resolve-Path $Dir -ErrorAction SilentlyContinue
|
||||
if (-not $Dir) {
|
||||
Write-Error "Error: directory not found or not accessible."
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Running .ps1 files in: $Dir"
|
||||
|
||||
Get-ChildItem -Path $Dir -MaxDepth 0 -Filter "*.ps1" |
|
||||
Where-Object { $_.FullName -ne $PSCommandPath } |
|
||||
Sort-Object Name |
|
||||
ForEach-Object {
|
||||
Write-Host "--- Running: $($_.FullName)"
|
||||
& $_.FullName
|
||||
Write-Host "------ Done: $($_.FullName) (exit code: $LASTEXITCODE)"
|
||||
}
|
||||
|
||||
Write-Host "Provisioning done."
|
||||
Reference in New Issue
Block a user