Skip to content

Commit

Permalink
Change the exit code to nonzero when there are ci regressions. (#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyONeal committed Jul 31, 2024
1 parent 3bde9bd commit 2c086f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions azure-pipelines/end-to-end-tests-dir/ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

# test skipped ports
$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"
Throw-IfFailed
Throw-IfNotFailed
if (-not ($Output.Contains("dep-on-feature-not-sup:${Triplet}: cascade"))) {
throw 'dep-on-feature-not-sup must cascade because it depends on a features that is not supported'
}
if (-not ($Output.Contains("not-sup-host-b:${Triplet}: skip"))) {
throw 'not-sup-host-b must be skipped because it is not supported'
}
if (-not ($Output.Contains("feature-not-sup:${Triplet}: *"))) {
throw 'feature-not-sup must be build because the port that causes this port to skip should not be installed'
throw 'feature-not-sup must be built because the port that causes this port to skip should not be installed'
}
if (-not ($Output.Contains("feature-dep-missing:${Triplet}: *"))) {
throw 'feature-dep-missing must be build because the broken feature is not selected.'
throw 'feature-dep-missing must be built because the broken feature is not selected.'
}
if ($Output.Split("*").Length -ne 4) {
throw 'base-port should not be installed for the host'
Expand Down
9 changes: 8 additions & 1 deletion src/vcpkg/commands.ci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,13 @@ namespace vcpkg
}
}

Checks::exit_success(VCPKG_LINE_INFO);
if (regressions.empty())
{
Checks::exit_success(VCPKG_LINE_INFO);
}
else
{
Checks::exit_fail(VCPKG_LINE_INFO);
}
}
} // namespace vcpkg

0 comments on commit 2c086f9

Please sign in to comment.