Skip to content

Commit e0f5cf6

Browse files
authored
Test parent hashes without actual build (#1870)
1 parent 181ca21 commit e0f5cf6

File tree

1 file changed

+10
-12
lines changed
  • azure-pipelines/end-to-end-tests-dir

1 file changed

+10
-12
lines changed

azure-pipelines/end-to-end-tests-dir/ci.ps1

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,17 @@ Restore-Problem-Matchers
7070
Throw-IfNotFailed
7171

7272
# test effect of parent hashes
73-
Remove-Item -Recurse -Force $installRoot -ErrorAction SilentlyContinue
74-
New-Item -ItemType Directory -Path $installRoot -Force | Out-Null
75-
Remove-Item -Recurse -Force $ArchiveRoot -ErrorAction SilentlyContinue
76-
New-Item -ItemType Directory -Path $ArchiveRoot -Force | Out-Null
77-
# Not a dry run in order to populate the artifact cache.
78-
$Output = Run-VcpkgAndCaptureOutput ci @commonArgs --x-builtin-ports-root="$PSScriptRoot/../e2e-ports/ci" --binarysource="clear;files,$ArchiveRoot" --output-hashes="$TestingRoot/parent-hashes.json"
73+
Refresh-TestRoot
74+
$Output = Run-VcpkgAndCaptureOutput ci --dry-run @commonArgs --x-builtin-ports-root="$PSScriptRoot/../e2e-ports/ci" --binarysource=clear --output-hashes="$TestingRoot/parent-hashes.json"
7975
Throw-IfFailed
80-
if (-not ($Output.Contains("base-port:${Triplet}: SUCCEEDED:"))) {
81-
throw 'base-port build must succeed'
82-
}
83-
Remove-Item -Recurse -Force $installRoot -ErrorAction SilentlyContinue
84-
New-Item -ItemType Directory -Path $installRoot -Force | Out-Null
85-
$Output = Run-VcpkgAndCaptureOutput ci @commonArgs --x-builtin-ports-root="$PSScriptRoot/../e2e-ports/ci" --binarysource="clear;files,$ArchiveRoot" --parent-hashes="$TestingRoot/parent-hashes.json"
76+
Throw-IfNonContains -Actual $Output -Expected "base-port:${Triplet}: *: "
77+
Throw-IfNonContains -Actual $Output -Expected @"
78+
The following packages will be built and installed:
79+
base-port:${Triplet}@1
80+
feature-dep-missing:${Triplet}@1
81+
feature-not-sup:${Triplet}@1
82+
"@
83+
$Output = Run-VcpkgAndCaptureOutput ci --dry-run @commonArgs --x-builtin-ports-root="$PSScriptRoot/../e2e-ports/ci" --binarysource=clear --parent-hashes="$TestingRoot/parent-hashes.json"
8684
Throw-IfFailed
8785
# base-port must not be rebuilt again
8886
Throw-IfNonContains -Actual $Output -Expected "base-port:${Triplet}: parent: "

0 commit comments

Comments
 (0)