Skip to content

Commit 52c149c

Browse files
committed
Fix remaining test failures, remove "all results" from the report at the end.
1 parent 502ea32 commit 52c149c

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ if ($Output.Split("*").Length -ne 4) {
2323
if (-not ($ErrorOutput.Contains("REGRESSION: not-sup-host-b:${Triplet} is marked as fail but not supported for ${Triplet}."))) {
2424
throw "feature-not-sup's baseline fail entry should result in a regression because the port is not supported"
2525
}
26-
# FIXME
27-
# if (-not ($ErrorOutput.Contains("REGRESSION: dep-on-feature-not-sup:${Triplet} is marked as fail but one dependency is not supported for ${Triplet}."))) {
28-
# throw "feature-not-sup's baseline fail entry should result in a regression because the port is cascade for this triplet"
29-
# }
26+
if (-not ($ErrorOutput.Contains("REGRESSION: dep-on-feature-not-sup:${Triplet} is marked as fail but one dependency is not supported for ${Triplet}."))) {
27+
throw "feature-not-sup's baseline fail entry should result in a regression because the port is cascade for this triplet"
28+
}
3029

3130
# pass means pass
3231
$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"
@@ -36,10 +35,9 @@ Throw-IfNotFailed
3635
if (-not ($ErrorOutput.Contains("REGRESSION: not-sup-host-b:${Triplet} is marked as pass but not supported for ${Triplet}."))) {
3736
throw "feature-not-sup's baseline pass entry should result in a regression because the port is not supported"
3837
}
39-
# FIXME
40-
# if (-not ($ErrorOutput.Contains("REGRESSION: dep-on-feature-not-sup:${Triplet} is marked as pass but one dependency is not supported for ${Triplet}."))) {
41-
# throw "feature-not-sup's baseline pass entry should result in a regression because the port is cascade for this triplet"
42-
# }
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+
}
4341

4442
# any invalid manifest must raise an error
4543
$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"

src/vcpkg/ci-baseline.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ namespace vcpkg
192192
const std::string* cifile,
193193
bool allow_unexpected_passing)
194194
{
195-
// FIXME how to report msgCiBaselineUnexpectedFailCascade?
196195
switch (result)
197196
{
198197
case BuildResult::Succeeded:
@@ -221,9 +220,15 @@ namespace vcpkg
221220
}
222221
break;
223222
case BuildResult::CascadedDueToMissingDependencies:
224-
if (cidata.required_success.contains(spec))
223+
if (cidata.expected_failures.contains(spec))
224+
{
225+
return msg::format(
226+
msgCiBaselineUnexpectedFailCascade, msg::spec = spec, msg::triplet = spec.triplet());
227+
}
228+
else if (cidata.required_success.contains(spec))
225229
{
226-
return msg::format(msgCiBaselineDisallowedCascade, msg::spec = spec, msg::path = *cifile);
230+
return msg::format(
231+
msgCiBaselineUnexpectedPassCascade, msg::spec = spec, msg::triplet = spec.triplet());
227232
}
228233
break;
229234
case BuildResult::Unsupported:
@@ -238,12 +243,6 @@ namespace vcpkg
238243
}
239244
break;
240245
case BuildResult::Excluded:
241-
if (cidata.required_success.contains(spec))
242-
{
243-
return msg::format(
244-
msgCiBaselineUnexpectedPassCascade, msg::spec = spec, msg::triplet = spec.triplet());
245-
}
246-
break;
247246
case BuildResult::ExcludedByParent:
248247
case BuildResult::ExcludedByDryRun: break;
249248
case BuildResult::CacheMissing:

src/vcpkg/commands.ci.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ namespace vcpkg
521521
prune_entirely_known_action_branches(action_plan, pre_build_status.known);
522522

523523
msg::println(msgElapsedTimeForChecks, msg::elapsed = timer.elapsed());
524-
std::map<PackageSpec, CiResult> ci_results;
524+
std::map<PackageSpec, CiResult> ci_plan_results;
525525
std::map<PackageSpec, CiResult> ci_full_results;
526526
for (auto&& pre_known_outcome : pre_build_status.known)
527527
{
@@ -565,7 +565,7 @@ namespace vcpkg
565565
ipa->feature_list,
566566
result.start_time,
567567
result.timing}};
568-
ci_results.insert_or_assign(result.get_spec(), ci_result);
568+
ci_plan_results.insert_or_assign(result.get_spec(), ci_result);
569569
ci_full_results.insert_or_assign(result.get_spec(), std::move(ci_result));
570570
}
571571
}
@@ -579,21 +579,24 @@ namespace vcpkg
579579
summary_report.push_back(' ');
580580
target_triplet.to_string(summary_report);
581581
summary_report.push_back('\n');
582-
for (auto&& ci_result : ci_full_results)
582+
for (auto&& ci_result : ci_plan_results)
583583
{
584-
summary_counts[ci_result.first.triplet()].increment(ci_result.second.code);
585-
586584
summary_report.append(2, ' ');
587585
ci_result.first.to_string(summary_report);
588586
summary_report.append(": ");
589587
ci_result.second.to_string(summary_report);
590588
summary_report.push_back('\n');
591589
}
592590

593-
for (auto&& entry : summary_counts)
591+
for (auto&& ci_result : ci_full_results)
592+
{
593+
summary_counts[ci_result.first.triplet()].increment(ci_result.second.code);
594+
}
595+
596+
for (auto&& summary_count : summary_counts)
594597
{
595598
summary_report.push_back('\n');
596-
summary_report.append(entry.second.format(entry.first).data());
599+
summary_report.append(summary_count.second.format(summary_count.first).data());
597600
}
598601

599602
summary_report.push_back('\n');
@@ -608,7 +611,7 @@ namespace vcpkg
608611
{
609612
XunitWriter xunitTestResults;
610613
const auto& xunit_results =
611-
Util::Sets::contains(options.switches, SwitchXXUnitAll) ? ci_full_results : ci_results;
614+
Util::Sets::contains(options.switches, SwitchXXUnitAll) ? ci_full_results : ci_plan_results;
612615
for (auto&& xunit_result : xunit_results)
613616
{
614617
xunitTestResults.add_test_results(xunit_result.first, xunit_result.second);

0 commit comments

Comments
 (0)