This commit is contained in:
Nick Banks 2020-03-26 12:19:08 -07:00 коммит произвёл GitHub
Родитель ddedd9b7de
Коммит b9485d91ba
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 379 добавлений и 214 удалений

Просмотреть файл

@ -211,3 +211,26 @@ stages:
platform: linux
arch: x64
tls: openssl
#
# QuicInterop
#
- stage: quicinterop
displayName: QuicInterop Tests
dependsOn:
- build_windows
- build_linux
jobs:
- template: ./templates/run-quicinterop.yml
parameters:
image: windows-latest
platform: windows
arch: x64
tls: mitls
- template: ./templates/run-quicinterop.yml
parameters:
image: ubuntu-latest
platform: linux
arch: x64
tls: openssl

Просмотреть файл

@ -0,0 +1,45 @@
# This template contains steps to run quicinterop for a single configuration.
parameters:
image: ''
platform: ''
config: 'Release'
arch: ''
tls: ''
jobs:
- job: interop_${{ parameters.platform }}_${{ parameters.arch }}_${{ parameters.tls }}
displayName: QuicInterop ${{ parameters.platform }} ${{ parameters.arch }} ${{ parameters.tls }}
pool:
vmImage: ${{ parameters.image }}
steps:
- checkout: self
- template: ./download-artifacts.yml
parameters:
platform: ${{ parameters.platform }}
arch: ${{ parameters.arch }}
tls: ${{ parameters.tls }}
- task: PowerShell@2
displayName: Prepare Test Machine
inputs:
pwsh: true
filePath: scripts/prepare-machine.ps1
arguments: -Configuration Test
- task: PowerShell@2
displayName: Run QuicInterop
timeoutInMinutes: 5
continueOnError: true
inputs:
pwsh: true
filePath: scripts/interop.ps1
arguments: -GenerateXmlResults -Config ${{ parameters.config }} -Arch ${{ parameters.arch }} -Tls ${{ parameters.tls }}
- template: ./upload-test-artifacts.yml
parameters:
platform: ${{ parameters.platform }}
config: ${{ parameters.config }}
arch: ${{ parameters.arch }}
tls: ${{ parameters.tls }}

Просмотреть файл

@ -14,7 +14,6 @@ jobs:
vmImage: ${{ parameters.image }}
steps:
- checkout: self
persistCredentials: true
- template: ./download-artifacts.yml
parameters:

98
scripts/interop.ps1 Normal file
Просмотреть файл

@ -0,0 +1,98 @@
<#
.SYNOPSIS
This script runs quicinterop locally.
.PARAMETER Config
Specifies the build configuration to use.
.PARAMETER Arch
The CPU architecture to use.
.PARAMETER Tls
The TLS library use.
.PARAMETER KeepOutputOnSuccess
Don't discard console output or logs on success.
.PARAMETER GenerateXmlResults
Generates an xml Test report for the run.
.PARAMETER Debugger
Attaches the debugger to the process.
.PARAMETER LogProfile
The name of the profile to use for log collection.
.PARAMETER ConvertLogs
Convert any collected logs to text. Only works when LogProfile is set.
#>
param (
[Parameter(Mandatory = $false)]
[ValidateSet("Debug", "Release")]
[string]$Config = "Debug",
[Parameter(Mandatory = $false)]
[ValidateSet("x86", "x64", "arm", "arm64")]
[string]$Arch = "x64",
[Parameter(Mandatory = $false)]
[ValidateSet("schannel", "openssl", "stub", "mitls")]
[string]$Tls = "schannel",
[Parameter(Mandatory = $false)]
[switch]$KeepOutputOnSuccess = $false,
[Parameter(Mandatory = $false)]
[switch]$GenerateXmlResults = $false,
[Parameter(Mandatory = $false)]
[switch]$Debugger = $false,
[Parameter(Mandatory = $false)]
[ValidateSet("None", "Basic.Light", "Basic.Verbose", "Full.Light", "Full.Verbose", "SpinQuic.Light")]
[string]$LogProfile = "None",
[Parameter(Mandatory = $false)]
[switch]$ConvertLogs = $false
)
Set-StrictMode -Version 'Latest'
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
# Root directory of the project.
$RootDir = Split-Path $PSScriptRoot -Parent
# Path to the run-executable Powershell script.
$RunExecutable = Join-Path $RootDir ".azure/scripts/run-executable.ps1"
# Path to the quicinterop exectuable.
$SpinQuic = $null
if ($IsWindows) {
$SpinQuic = Join-Path $RootDir "\artifacts\windows\$($Arch)_$($Config)_$($Tls)\quicinterop.exe"
} else {
$SpinQuic = Join-Path $RootDir "/artifacts/linux/$($Arch)_$($Config)_$($Tls)/quicinterop"
}
# Build up all the arguments to pass to the Powershell script.
$Arguments = "-Path $($SpinQuic) -ShowOutput"
if ($KeepOutputOnSuccess) {
$Arguments += " -KeepOutputOnSuccess"
}
if ($GenerateXmlResults) {
$Arguments += " -GenerateXmlResults"
}
if ($Debugger) {
$Arguments += " -Debugger"
}
if ("None" -ne $LogProfile) {
$Arguments += " -LogProfile $($LogProfile)"
}
if ($ConvertLogs) {
$Arguments += " -ConvertLogs"
}
# Run the script.
Invoke-Expression ($RunExecutable + " " + $Arguments)