Skip to content

Commit

Permalink
[CI] Only upload test results if buildkite-agent is present (llvm#119954
Browse files Browse the repository at this point in the history
)

This patch modifies the monolithic shell scrips to only run if the
buildkite-agent application is present. This allows for running the
scripts to completion outside of buildkite (eg inside of a GHA
pipeline).
  • Loading branch information
boomanaiden154 authored Dec 16, 2024
1 parent a35db28 commit a246454
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .ci/monolithic-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ function at-exit {

# If building fails there will be no results files.
shopt -s nullglob
python3 "${MONOREPO_ROOT}"/.ci/generate_test_report.py ":linux: Linux x64 Test Results" \
"linux-x64-test-results" "${BUILD_DIR}"/test-results.*.xml
if command -v buildkite-agent 2>&1 >/dev/null
then
python3 "${MONOREPO_ROOT}"/.ci/generate_test_report.py ":linux: Linux x64 Test Results" \
"linux-x64-test-results" "${BUILD_DIR}"/test-results.*.xml
fi
}
trap at-exit EXIT

Expand Down
7 changes: 5 additions & 2 deletions .ci/monolithic-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ function at-exit {

# If building fails there will be no results files.
shopt -s nullglob
python "${MONOREPO_ROOT}"/.ci/generate_test_report.py ":windows: Windows x64 Test Results" \
"windows-x64-test-results" "${BUILD_DIR}"/test-results.*.xml
if command -v buildkite-agent 2>&1 >/dev/null
then
python "${MONOREPO_ROOT}"/.ci/generate_test_report.py ":windows: Windows x64 Test Results" \
"windows-x64-test-results" "${BUILD_DIR}"/test-results.*.xml
fi
}
trap at-exit EXIT

Expand Down

0 comments on commit a246454

Please sign in to comment.