Skip to content

Commit d5c3552

Browse files
authored
Test ci --parent-hashes (#1829)
* Test ci --parent-hashes * Remove future tests
1 parent 656f2ae commit d5c3552

File tree

1 file changed

+19
-0
lines changed
  • azure-pipelines/end-to-end-tests-dir

1 file changed

+19
-0
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,22 @@ New-Item -ItemType Directory -Path $emptyDir -Force | Out-Null
6868
$Output = Run-VcpkgAndCaptureOutput ci --triplet=$Triplet --x-builtin-ports-root="$emptyDir" --binarysource=clear --overlay-ports="$PSScriptRoot/../e2e-ports/duplicate-file-a" --overlay-ports="$PSScriptRoot/../e2e-ports/duplicate-file-b"
6969
Throw-IfNotFailed
7070
Restore-Problem-Matchers
71+
72+
# 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"
79+
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"
86+
Throw-IfFailed
87+
if ($Output.Contains("base-port:${Triplet}: SUCCEEDED:")) {
88+
throw 'base-port must not be rebuilt again'
89+
}

0 commit comments

Comments
 (0)