зеркало из https://github.com/microsoft/msquic.git
Add Helpers to PowerShell Scripts (#317)
This commit is contained in:
Родитель
3dd9a54757
Коммит
41cf853920
|
@ -77,7 +77,12 @@ function Log($msg) {
|
|||
|
||||
# Make sure the executable is present.
|
||||
if (!(Test-Path $Path)) {
|
||||
Write-Error "[$(Get-Date)] $($Path) does not exist!"
|
||||
Write-Error "$($Path) does not exist!"
|
||||
}
|
||||
|
||||
# Make sure procdump is installed on Windows.
|
||||
if ($IsWindows -and !(Test-Path ($RootDir + "\bld\tools\procdump64.exe"))) {
|
||||
Write-Error "Procdump not installed!`n `nRun the following to install it:`n `n $(Join-Path $RootDir ".azure" "scripts" "install-procdump.ps1")`n"
|
||||
}
|
||||
|
||||
# Root directory of the project.
|
||||
|
|
|
@ -105,7 +105,12 @@ function Log($msg) {
|
|||
|
||||
# Make sure the test executable is present.
|
||||
if (!(Test-Path $Path)) {
|
||||
Write-Error "[$(Get-Date)] $($Path) does not exist!"
|
||||
Write-Error "$($Path) does not exist!"
|
||||
}
|
||||
|
||||
# Make sure procdump is installed on Windows.
|
||||
if ($IsWindows -and !(Test-Path ($RootDir + "\bld\tools\procdump64.exe"))) {
|
||||
Write-Error "Procdump not installed!`n `nRun the following to install it:`n `n $(Join-Path $RootDir ".azure" "scripts" "install-procdump.ps1")`n"
|
||||
}
|
||||
|
||||
# Root directory of the project.
|
||||
|
|
|
@ -69,15 +69,20 @@ $RootDir = Split-Path $PSScriptRoot -Parent
|
|||
$RunExecutable = Join-Path $RootDir ".azure/scripts/run-executable.ps1"
|
||||
|
||||
# Path to the quicinterop exectuable.
|
||||
$SpinQuic = $null
|
||||
$QuicInterop = $null
|
||||
if ($IsWindows) {
|
||||
$SpinQuic = Join-Path $RootDir "\artifacts\windows\$($Arch)_$($Config)_$($Tls)\quicinterop.exe"
|
||||
$QuicInterop = Join-Path $RootDir "\artifacts\windows\$($Arch)_$($Config)_$($Tls)\quicinterop.exe"
|
||||
} else {
|
||||
$SpinQuic = Join-Path $RootDir "/artifacts/linux/$($Arch)_$($Config)_$($Tls)/quicinterop"
|
||||
$QuicInterop = Join-Path $RootDir "/artifacts/linux/$($Arch)_$($Config)_$($Tls)/quicinterop"
|
||||
}
|
||||
|
||||
# Make sure the build is present.
|
||||
if (!(Test-Path $QuicInterop)) {
|
||||
Write-Error "Build does not exist!`n `nRun the following to generate it:`n `n $(Join-Path $RootDir "scripts" "build.ps1") -Config $Config -Arch $Arch -Tls $Tls`n"
|
||||
}
|
||||
|
||||
# Build up all the arguments to pass to the Powershell script.
|
||||
$Arguments = "-Path $($SpinQuic) -ShowOutput"
|
||||
$Arguments = "-Path $($QuicInterop) -ShowOutput"
|
||||
if ($KeepOutputOnSuccess) {
|
||||
$Arguments += " -KeepOutputOnSuccess"
|
||||
}
|
||||
|
|
|
@ -21,6 +21,8 @@ param (
|
|||
[string]$Configuration
|
||||
)
|
||||
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
Set-StrictMode -Version 'Latest'
|
||||
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
|
||||
|
||||
|
|
|
@ -82,6 +82,11 @@ if ($IsWindows) {
|
|||
$SpinQuic = Join-Path $RootDir "/artifacts/linux/$($Arch)_$($Config)_$($Tls)/spinquic"
|
||||
}
|
||||
|
||||
# Make sure the build is present.
|
||||
if (!(Test-Path $SpinQuic)) {
|
||||
Write-Error "Build does not exist!`n `nRun the following to generate it:`n `n $(Join-Path $RootDir "scripts" "build.ps1") -Config $Config -Arch $Arch -Tls $Tls`n"
|
||||
}
|
||||
|
||||
# Build up all the arguments to pass to the Powershell script.
|
||||
$Arguments = "-Path $($SpinQuic) -Arguments 'both -timeout:$($Timeout)' -ShowOutput"
|
||||
if ($KeepOutputOnSuccess) {
|
||||
|
|
|
@ -151,6 +151,11 @@ if ($IsWindows) {
|
|||
$MsQuicPlatTest = Join-Path $RootDir "/artifacts/linux/$($Arch)_$($Config)_$($Tls)/msquicplatformtest"
|
||||
}
|
||||
|
||||
# Make sure the build is present.
|
||||
if (!(Test-Path $MsQuicTest)) {
|
||||
Write-Error "Build does not exist!`n `nRun the following to generate it:`n `n $(Join-Path $RootDir "scripts" "build.ps1") -Config $Config -Arch $Arch -Tls $Tls`n"
|
||||
}
|
||||
|
||||
# Build up all the arguments to pass to the Powershell script.
|
||||
$TestArguments = "-ExecutionMode $($ExecutionMode) -IsolationMode $($IsolationMode)"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче