aboutsummaryrefslogtreecommitdiff
path: root/scripts/azure-pipelines
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/azure-pipelines')
-rw-r--r--scripts/azure-pipelines/end-to-end-tests.ps128
1 files changed, 27 insertions, 1 deletions
diff --git a/scripts/azure-pipelines/end-to-end-tests.ps1 b/scripts/azure-pipelines/end-to-end-tests.ps1
index 50e7f6afd..3b6fe5aaa 100644
--- a/scripts/azure-pipelines/end-to-end-tests.ps1
+++ b/scripts/azure-pipelines/end-to-end-tests.ps1
@@ -41,7 +41,8 @@ $commonArgs = @(
$Triplet,
"--x-buildtrees-root=$buildtreesRoot",
"--x-install-root=$installRoot",
- "--x-packages-root=$packagesRoot"
+ "--x-packages-root=$packagesRoot",
+ "--overlay-ports=scripts/e2e_ports"
)
$CurrentTest = 'unassigned'
@@ -190,6 +191,31 @@ if ((Get-ChildItem $NuGetRoot -Filter '*.nupkg' | Measure-Object).Count -ne 1) {
throw "In '$CurrentTest': did not create exactly 1 NuGet package"
}
+# Test that prohibiting backcompat features actually prohibits
+$backcompatFeaturePorts = @('vcpkg-uses-test-cmake', 'vcpkg-uses-vcpkg-common-functions')
+foreach ($backcompatFeaturePort in $backcompatFeaturePorts) {
+ $succeedArgs = $commonArgs + @('install',$backcompatFeaturePort,'--no-binarycaching')
+ $failArgs = $succeedArgs + @('--x-prohibit-backcompat-features')
+ $CurrentTest = "Should fail: ./vcpkg $($failArgs -join ' ')"
+ Write-Host $CurrentTest
+ ./vcpkg @failArgs
+ if ($LastExitCode -ne 0) {
+ Write-Host "... failed (this is good!)"
+ } else {
+ throw $CurrentTest
+ }
+
+ # Install failed when prohibiting backcompat features, so it should succeed if we allow them
+ $CurrentTest = "Should succeeed: ./vcpkg $($succeedArgs -join ' ')"
+ Write-Host $CurrentTest
+ ./vcpkg @succeedArgs
+ if ($LastExitCode -ne 0) {
+ throw $CurrentTest
+ } else {
+ Write-Host "... succeeded."
+ }
+}
+
# Test export
$CurrentTest = 'Prepare for export test'
Write-Host $CurrentTest