This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print complement failure results last (#13639)
Since github always scrolls to the bottom of any test output, let's put the failed tests last and hide any successful packages.
- Loading branch information
Showing
6 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# | ||
# wraps `gotestfmt`, hiding output from successful packages unless | ||
# all tests passed. | ||
|
||
set -o pipefail | ||
set -e | ||
|
||
# tee the test results to a log, whilst also piping them into gotestfmt, | ||
# telling it to hide successful results, so that we can clearly see | ||
# unsuccessful results. | ||
tee complement.log | gotestfmt -hide successful-packages | ||
|
||
# gotestfmt will exit non-zero if there were any failures, so if we got to this | ||
# point, we must have had a successful result. | ||
echo "All tests successful; showing all test results" | ||
|
||
# Pipe the test results back through gotestfmt, showing all results. | ||
# The log file consists of JSON lines giving the test results, interspersed | ||
# with regular stdout lines (including reports of downloaded packages). | ||
grep '^{"Time":' complement.log | gotestfmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve readability of Complement CI logs by printing failure results last. |