Skip to content

Commit d0f9f8a

Browse files
authored
ci: baseline pass means pass (#1827)
1 parent 1d7fdac commit d0f9f8a

File tree

5 files changed

+48
-0
lines changed

5 files changed

+48
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
not-sup-host-b:arm64-osx=pass
2+
not-sup-host-b:x64-osx=pass
3+
not-sup-host-b:x86-windows=pass
4+
not-sup-host-b:x64-windows=pass
5+
not-sup-host-b:arm64-windows=pass
6+
not-sup-host-b:x64-linux=pass
7+
not-sup-host-b:arm64-linux=pass
8+
9+
10+
dep-on-feature-not-sup:arm64-osx=pass
11+
dep-on-feature-not-sup:x64-osx=pass
12+
dep-on-feature-not-sup:x86-windows=pass
13+
dep-on-feature-not-sup:x64-windows=pass
14+
dep-on-feature-not-sup:arm64-windows=pass
15+
dep-on-feature-not-sup:x64-linux=pass
16+
dep-on-feature-not-sup:arm64-linux=pass

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ if (-not ($ErrorOutput.Contains("REGRESSION: dep-on-feature-not-sup:${Triplet} i
2727
throw "feature-not-sup's baseline fail entry should result in a regression because the port is cascade for this triplet"
2828
}
2929

30+
# pass means pass
31+
$Output = Run-VcpkgAndCaptureOutput ci --dry-run --triplet=$Triplet --x-builtin-ports-root="$PSScriptRoot/../e2e-ports/ci" --binarysource=clear --ci-baseline="$PSScriptRoot/../e2e-assets/ci/ci.baseline.txt"
32+
Throw-IfNotFailed
33+
$ErrorOutput = Run-VcpkgAndCaptureStdErr ci --dry-run --triplet=$Triplet --x-builtin-ports-root="$PSScriptRoot/../e2e-ports/ci" --binarysource=clear --ci-baseline="$PSScriptRoot/../e2e-assets/ci/ci.pass.baseline.txt"
34+
Throw-IfNotFailed
35+
if (-not ($ErrorOutput.Contains("REGRESSION: not-sup-host-b:${Triplet} is marked as pass but not supported for ${Triplet}."))) {
36+
throw "feature-not-sup's baseline pass entry should result in a regression because the port is not supported"
37+
}
38+
if (-not ($ErrorOutput.Contains("REGRESSION: dep-on-feature-not-sup:${Triplet} is marked as pass but one dependency is not supported for ${Triplet}."))) {
39+
throw "feature-not-sup's baseline pass entry should result in a regression because the port is cascade for this triplet"
40+
}
41+
3042
# any invalid manifest must raise an error
3143
$Output = Run-VcpkgAndCaptureOutput ci --dry-run --triplet=$Triplet --x-builtin-ports-root="$PSScriptRoot/../e2e-ports/broken-manifests" --binarysource=clear --ci-baseline="$PSScriptRoot/../e2e-assets/ci/ci.baseline.txt"
3244
Throw-IfNotFailed

include/vcpkg/base/message-data.inc.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,14 @@ DECLARE_MESSAGE(CiBaselineUnexpectedPass,
495495
(msg::spec, msg::path),
496496
"",
497497
"PASSING, REMOVE FROM FAIL LIST: {spec} ({path}).")
498+
DECLARE_MESSAGE(CiBaselineUnexpectedPassCascade,
499+
(msg::spec, msg::triplet),
500+
"",
501+
"REGRESSION: {spec} is marked as pass but one dependency is not supported for {triplet}.")
502+
DECLARE_MESSAGE(CiBaselineUnexpectedPassUnsupported,
503+
(msg::spec, msg::triplet),
504+
"",
505+
"REGRESSION: {spec} is marked as pass but not supported for {triplet}.")
498506
DECLARE_MESSAGE(CISettingsOptCIBase,
499507
(),
500508
"",

locales/messages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,10 @@
311311
"_CiBaselineUnexpectedFailCascade.comment": "An example of {spec} is zlib:x64-windows. An example of {triplet} is x64-windows.",
312312
"CiBaselineUnexpectedPass": "PASSING, REMOVE FROM FAIL LIST: {spec} ({path}).",
313313
"_CiBaselineUnexpectedPass.comment": "An example of {spec} is zlib:x64-windows. An example of {path} is /foo/bar.",
314+
"CiBaselineUnexpectedPassCascade": "REGRESSION: {spec} is marked as pass but one dependency is not supported for {triplet}.",
315+
"_CiBaselineUnexpectedPassCascade.comment": "An example of {spec} is zlib:x64-windows. An example of {triplet} is x64-windows.",
316+
"CiBaselineUnexpectedPassUnsupported": "REGRESSION: {spec} is marked as pass but not supported for {triplet}.",
317+
"_CiBaselineUnexpectedPassUnsupported.comment": "An example of {spec} is zlib:x64-windows. An example of {triplet} is x64-windows.",
314318
"ClearingContents": "Clearing contents of {path}",
315319
"_ClearingContents.comment": "An example of {path} is /foo/bar.",
316320
"CmakeTargetsExcluded": "{count} additional targets are not displayed.",

src/vcpkg/commands.ci.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,14 @@ namespace vcpkg
417417
msg::triplet = spec.package_spec.triplet())
418418
.append_raw('\n');
419419
}
420+
else if (cidata.required_success.contains(spec.package_spec))
421+
{
422+
not_supported_regressions
423+
.append(supp ? msgCiBaselineUnexpectedPassCascade : msgCiBaselineUnexpectedPassUnsupported,
424+
msg::spec = spec.package_spec,
425+
msg::triplet = spec.package_spec.triplet())
426+
.append_raw('\n');
427+
}
420428
msg += fmt::format("{:>40}: {:>8}\n", spec.package_spec, supp ? "cascade" : "skip");
421429
}
422430
}

0 commit comments

Comments
 (0)