Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generation of failures.csv when there are only non-outcome failures #154

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vars/analysis.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def process_outcomes() {
// as test description or test suite was "FAIL".
if (gen_jobs.failed_builds) {
sh '''\
LC_ALL=C grep ';FAIL;' outcomes.csv >"failures.csv"
LC_ALL=C grep ';FAIL;' outcomes.csv >"failures.csv" || [ $? -eq 1 ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nice. I'd have written || true but this is more precise, it only ignores the expected error where grep returns 1 for "no match". Learned something about robust sh scripting today :)

# Compress the failure list if it is large (for some value of large)
if [ "$(wc -c <failures.csv)" -gt 99999 ]; then
xz -0 -T0 failures.csv
Expand Down