aboutsummaryrefslogtreecommitdiff
path: root/scripts/azure-pipelines/end-to-end-tests-dir
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2021-01-20 12:07:41 -0800
committerGitHub <noreply@github.com>2021-01-20 12:07:41 -0800
commit4d136ef25f4fab5b744c7ae6acfa04d44f254f2b (patch)
treec6d0b0920106f03390e8d89c11bdf631cf1f28c7 /scripts/azure-pipelines/end-to-end-tests-dir
parent45fc55825db2a5bcaffccff1e6afadc519d164ea (diff)
downloadvcpkg-4d136ef25f4fab5b744c7ae6acfa04d44f254f2b.tar.gz
vcpkg-4d136ef25f4fab5b744c7ae6acfa04d44f254f2b.zip
[vcpkg] Add vcpkg_minimum_required as a replacement for VERSION.txt. (#15638)
Diffstat (limited to 'scripts/azure-pipelines/end-to-end-tests-dir')
-rw-r--r--scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps18
-rw-r--r--scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps15
-rw-r--r--scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps122
3 files changed, 30 insertions, 5 deletions
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1
index 5b6b1c10f..704b52752 100644
--- a/scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1
+++ b/scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1
@@ -6,18 +6,16 @@ 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
+ Run-Vcpkg @failArgs
if ($LastExitCode -ne 0) {
- Write-Host "... failed (this is good!)"
+ 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
+ Run-Vcpkg @succeedArgs
if ($LastExitCode -ne 0) {
throw $CurrentTest
} else {
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1
index 2b7e84fbd..e4ee6e698 100644
--- a/scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1
+++ b/scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1
@@ -1,3 +1,8 @@
+if ($IsLinux) {
+ # The tests below need a mono installation not currently available on the Linux agents.
+ return
+}
+
. $PSScriptRoot/../end-to-end-tests-prelude.ps1
# Test simple installation
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps1
new file mode 100644
index 000000000..8f512ae7a
--- /dev/null
+++ b/scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps1
@@ -0,0 +1,22 @@
+. $PSScriptRoot/../end-to-end-tests-prelude.ps1
+
+$successCases = @('vcpkg-requires-current-date', 'vcpkg-requires-old-date')
+foreach ($successCase in $successCases) {
+ $CurrentTest = "Should succeeed: ./vcpkg install $successCase"
+ Write-Host $CurrentTest
+ Run-Vcpkg install $successCase @commonArgs
+ if ($LastExitCode -ne 0) {
+ throw $CurrentTest
+ } else {
+ Write-Host "... succeeded."
+ }
+}
+
+$CurrentTest = "Should fail: ./vcpkg install vcpkg-requires-future-date"
+Write-Host $CurrentTest
+Run-Vcpkg install vcpkg-requires-future-date @commonArgs
+if ($LastExitCode -ne 0) {
+ Write-Host "... failed (this is good!)."
+} else {
+ throw $CurrentTest
+}