aboutsummaryrefslogtreecommitdiff
path: root/scripts/azure-pipelines
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-10-28 14:18:07 -0700
committerGitHub <noreply@github.com>2020-10-28 14:18:07 -0700
commit09a647a5261e981cbbc8219292c838490ed0b06f (patch)
tree9d18df2f364a3d2bbaa156d76f5d265fc442c2f3 /scripts/azure-pipelines
parentead8d6bad477f0b075f31097673c3e440356cd3b (diff)
downloadvcpkg-09a647a5261e981cbbc8219292c838490ed0b06f.tar.gz
vcpkg-09a647a5261e981cbbc8219292c838490ed0b06f.zip
Delete use of vcpkg_test_cmake and vcpkg_common_functions. (#13065)
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