vcpkg/scripts/azure-pipelines/end-to-end-tests.ps1
nicole mazzuca c898283a41
[vcpkg registries] support versions (#15114)
* [vcpkg registries] support versions

This PR merges the Registries changes and the versioning changes, so that one can use both at the same time.

There is one major difference between this PR and the RFC (#13590), which is that instead of version files looking like:

```json
[
  ...
]
```

version files look like:

```
{
  "versions": [
    ...
  ]
}
```

this is to support interop between this PR and existing demos and the like;
fixing this, along with perhaps renaming `port_versions` to `port-versions` should be done after this is merged,
should be a trivial change.
2020-12-21 15:40:21 -08:00

49 lines
1.1 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"
$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