vcpkg/scripts/azure-pipelines/end-to-end-tests.ps1
nicole mazzuca a597134450
[vcpkg registries] Add git registries (#15054)
* [vcpkg registries] Add git registries support

* Add git registries support to the registries module of vcpkg.
* add e2e tests for git registries
* fix vcpkg.cmake for registries

* fix CRs, remove a thing

* better error messages

* Billy CRs

* fix Robert's CR comment

* I learned about `-c` today

* format

* fix baseline.json

* failing to find baseline is technically not a bug
2021-01-14 19:50:31 -08:00

51 lines
1.2 KiB
PowerShell

# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT
#
<#
.SYNOPSIS
End-to-End tests for the vcpkg executable.
.DESCRIPTION
These tests cover the command line interface and broad functions of vcpkg, including `install`, `remove` and certain
binary caching scenarios. They use the vcpkg executable in the current directory.
.PARAMETER Triplet
The triplet to use for testing purposes.
.PARAMETER WorkingRoot
The location used as scratch space for testing.
#>
[CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$Triplet,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$WorkingRoot,
[Parameter(Mandatory = $false)]
[ValidateNotNullOrEmpty()]
[string]$Filter
)
$ErrorActionPreference = "Stop"
$WorkingRoot = (Get-Item $WorkingRoot).FullName
$AllTests = Get-ChildItem $PSScriptRoot/end-to-end-tests-dir/*.ps1
if ($Filter -ne $Null) {
$AllTests = $AllTests | ? { $_.Name -match $Filter }
}
$n = 1
$m = $AllTests.Count
$AllTests | % {
Write-Host "[end-to-end-tests.ps1] [$n/$m] Running suite $_"
& $_
$n += 1
}
$LASTEXITCODE = 0