Skip to content

Commit f3befa5

Browse files
committed
Test fixes. Note that CiBaselineUnexpectedPassCascade is deleted and we consider "real" cascades equivalent to statically known cascades in reporting.
1 parent 52c149c commit f3befa5

File tree

5 files changed

+8
-12
lines changed

5 files changed

+8
-12
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Throw-IfNotFailed
3535
if (-not ($ErrorOutput.Contains("REGRESSION: not-sup-host-b:${Triplet} is marked as pass but not supported for ${Triplet}."))) {
3636
throw "feature-not-sup's baseline pass entry should result in a regression because the port is not supported"
3737
}
38-
if (-not ($ErrorOutput.Contains("REGRESSION: dep-on-feature-not-sup:${Triplet} is marked as pass but one dependency is not supported for ${Triplet}."))) {
38+
if (-not ($ErrorOutput.Contains("REGRESSION: dep-on-feature-not-sup:${Triplet} cascaded, but it is required to pass. ("))) {
3939
throw "feature-not-sup's baseline pass entry should result in a regression because the port is cascade for this triplet"
4040
}
4141

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,10 +515,6 @@ DECLARE_MESSAGE(CiBaselineUnexpectedPass,
515515
(msg::spec, msg::path),
516516
"",
517517
"PASSING, REMOVE FROM FAIL LIST: {spec} ({path}).")
518-
DECLARE_MESSAGE(CiBaselineUnexpectedPassCascade,
519-
(msg::spec, msg::triplet),
520-
"",
521-
"REGRESSION: {spec} is marked as pass but one dependency is not supported for {triplet}.")
522518
DECLARE_MESSAGE(CiBaselineUnexpectedPassUnsupported,
523519
(msg::spec, msg::triplet),
524520
"",

locales/messages.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,6 @@
317317
"_CiBaselineUnexpectedFailCascade.comment": "An example of {spec} is zlib:x64-windows. An example of {triplet} is x64-windows.",
318318
"CiBaselineUnexpectedPass": "PASSING, REMOVE FROM FAIL LIST: {spec} ({path}).",
319319
"_CiBaselineUnexpectedPass.comment": "An example of {spec} is zlib:x64-windows. An example of {path} is /foo/bar.",
320-
"CiBaselineUnexpectedPassCascade": "REGRESSION: {spec} is marked as pass but one dependency is not supported for {triplet}.",
321-
"_CiBaselineUnexpectedPassCascade.comment": "An example of {spec} is zlib:x64-windows. An example of {triplet} is x64-windows.",
322320
"CiBaselineUnexpectedPassUnsupported": "REGRESSION: {spec} is marked as pass but not supported for {triplet}.",
323321
"_CiBaselineUnexpectedPassUnsupported.comment": "An example of {spec} is zlib:x64-windows. An example of {triplet} is x64-windows.",
324322
"ClearingContents": "Clearing contents of {path}",

src/vcpkg-test/ci-baseline.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ TEST_CASE ("format_ci_result 1", "[ci-baseline]")
360360
return format_ci_result(s, BuildResult::CascadedDueToMissingDependencies, cidata, &cifile, false);
361361
};
362362
CHECK(test({"pass", Test::X64_UWP}) == fmt::format(cascademsg, "pass:x64-uwp"));
363-
CHECK(test({"fail", Test::X64_UWP}) == "");
363+
CHECK(test({"fail", Test::X64_UWP}) ==
364+
"REGRESSION: fail:x64-uwp is marked as fail but one dependency is not supported for x64-uwp.");
364365
CHECK(test({"neither", Test::X64_UWP}) == "");
365366
}
366367
}

src/vcpkg/ci-baseline.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,19 @@ namespace vcpkg
225225
return msg::format(
226226
msgCiBaselineUnexpectedFailCascade, msg::spec = spec, msg::triplet = spec.triplet());
227227
}
228-
else if (cidata.required_success.contains(spec))
228+
229+
if (cidata.required_success.contains(spec))
229230
{
230-
return msg::format(
231-
msgCiBaselineUnexpectedPassCascade, msg::spec = spec, msg::triplet = spec.triplet());
231+
return msg::format(msgCiBaselineDisallowedCascade, msg::spec = spec, msg::path = *cifile);
232232
}
233233
break;
234234
case BuildResult::Unsupported:
235235
if (cidata.expected_failures.contains(spec))
236236
{
237237
return msg::format(msgCiBaselineUnexpectedFail, msg::spec = spec, msg::triplet = spec.triplet());
238238
}
239-
else if (cidata.required_success.contains(spec))
239+
240+
if (cidata.required_success.contains(spec))
240241
{
241242
return msg::format(
242243
msgCiBaselineUnexpectedPassUnsupported, msg::spec = spec, msg::triplet = spec.triplet());

0 commit comments

Comments
 (0)