Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "always-built",
"version": "1.0.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
message(FATAL_ERROR "This port should always cascade and should not be attempted.")
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "always-cascade",
"version": "1.0.0",
"dependencies": [
"always-skip"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
message(FATAL_ERROR "This port should always be skipped by baseline.txt and should not be attempted.")
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "always-skip",
"version": "1.0.0",
"dependencies": [
"always-built"
]
}
5 changes: 5 additions & 0 deletions azure-pipelines/e2e-assets/ci-skipped-ports/baseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
always-skip:arm64-osx=skip
always-skip:x64-linux=skip
always-skip:x64-osx=skip
always-skip:x64-windows=skip
always-skip:x86-windows=skip
21 changes: 21 additions & 0 deletions azure-pipelines/end-to-end-tests-dir/ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,27 @@ SUMMARY FOR $Triplet
UNSUPPORTED: 1
"@

# test that skipped ports aren't "put back" by downstream dependencies that aren't skipped
Refresh-TestRoot
$Output = Run-VcpkgAndCaptureOutput ci @commonArgs --x-builtin-ports-root="$PSScriptRoot/../e2e-assets/ci-skipped-ports" --binarysource=clear --ci-baseline="$PSScriptRoot/../e2e-assets/ci-skipped-ports/baseline.txt"
Throw-IfFailed
if (-not ($Output -match 'always-built:[^:]+: \*:' -and $Output -match 'Building always-built:[^@]+@1\.0\.0\.\.\.')) {
throw 'did not attempt to build always-built'
}
if (-not ($Output -match 'always-skip:[^:]+: skip\n')) {
throw 'tried to build skipped'
}
# This should be statically determinable but at the moment we do not
# if (-not ($Output -match 'always-cascade:[^:]+: cascade\n')) {
# throw 'tried to build cascaded'
# }
Throw-IfNonContains -Actual $Output -Expected @"
SUMMARY FOR $Triplet
SUCCEEDED: 1
CASCADED_DUE_TO_MISSING_DEPENDENCIES: 1
EXCLUDED: 1
"@

# test that features included only by skipped ports are not included
$xunitFile = Join-Path $TestingRoot 'xunit.xml'
Refresh-TestRoot
Expand Down
2 changes: 1 addition & 1 deletion src/vcpkg/commands.ci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ namespace
}

ret.report_lines.insert_or_assign(exclusion.first, fmt::format("{:>40}: {}", exclusion.first, *state));
ret.known.emplace(exclusion.first, known_result);
ret.known.insert_or_assign(exclusion.first, known_result);
}

return ret;
Expand Down
Loading