aboutsummaryrefslogtreecommitdiff
path: root/scripts/azure-pipelines
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
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')
-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
-rw-r--r--scripts/azure-pipelines/end-to-end-tests.ps15
-rw-r--r--scripts/azure-pipelines/linux/azure-pipelines.yml7
-rw-r--r--scripts/azure-pipelines/osx/azure-pipelines.yml2
6 files changed, 44 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
+}
diff --git a/scripts/azure-pipelines/end-to-end-tests.ps1 b/scripts/azure-pipelines/end-to-end-tests.ps1
index 3c9dd067f..8858b362e 100644
--- a/scripts/azure-pipelines/end-to-end-tests.ps1
+++ b/scripts/azure-pipelines/end-to-end-tests.ps1
@@ -32,6 +32,10 @@ Param(
$ErrorActionPreference = "Stop"
+if (-Not (Test-Path $WorkingRoot)) {
+ New-Item -Path $WorkingRoot -ItemType Directory
+}
+
$WorkingRoot = (Get-Item $WorkingRoot).FullName
$AllTests = Get-ChildItem $PSScriptRoot/end-to-end-tests-dir/*.ps1
@@ -47,4 +51,5 @@ $AllTests | % {
$n += 1
}
+Write-Host "[end-to-end-tests.ps1] All tests passed."
$LASTEXITCODE = 0
diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml
index 018203a6a..40089bc24 100644
--- a/scripts/azure-pipelines/linux/azure-pipelines.yml
+++ b/scripts/azure-pipelines/linux/azure-pipelines.yml
@@ -37,11 +37,18 @@ jobs:
- bash: toolsrc/build.rel/vcpkg-test
displayName: 'Run vcpkg tests'
- task: PowerShell@2
+ displayName: 'Run vcpkg end-to-end tests'
+ inputs:
+ filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1'
+ arguments: '-Triplet x64-linux -WorkingRoot ${{ variables.WORKING_ROOT }}'
+ pwsh: true
+ - task: PowerShell@2
displayName: '*** Test Modified Ports and Prepare Test Logs ***'
inputs:
failOnStderr: true
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
arguments: '-Triplet x64-linux -BuildReason $(Build.Reason) -UseEnvironmentSasToken -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)'
+ pwsh: true
- bash: |
df -h
displayName: 'Report on Disk Space After Build'
diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml
index c0e1c3a26..fa0d0e056 100644
--- a/scripts/azure-pipelines/osx/azure-pipelines.yml
+++ b/scripts/azure-pipelines/osx/azure-pipelines.yml
@@ -38,12 +38,14 @@ jobs:
inputs:
filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1'
arguments: '-Triplet x64-osx -WorkingRoot ${{ variables.WORKING_ROOT }}'
+ pwsh: true
- task: PowerShell@2
displayName: '*** Test Modified Ports and Prepare Test Logs ***'
inputs:
failOnStderr: true
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
arguments: '-Triplet x64-osx -BuildReason $(Build.Reason) -BinarySourceStub "$(BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)'
+ pwsh: true
- bash: |
df -h
displayName: 'Report on Disk Space After Build'