-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: silence ci test output while recording in full (#30654)
* ci: silence ci test output while recording in full * shellcheck * Adjust --color handling place * Dump to stderr... * Reduce too spammy solana_metrics logs * Clean up * Tweak * Stash actual command's exit_code, not echo's
- Loading branch information
Showing
6 changed files
with
46 additions
and
12 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,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
if [[ -n $CI && -z $NO_INTERCEPT ]]; then | ||
console_log="./intercepted-console-$(date '+%Yy%mm%dd%Hh%Mm%Ss%Nns').log" | ||
echo "$0: Intercepting stderr into $console_log, along side tee-d stdout." | ||
|
||
# we don't care about being racy here as was before; so disable shellcheck | ||
# shellcheck disable=SC2094 | ||
if "$@" 2>> "$console_log" 1>> >(tee -a "$console_log"); then | ||
exit_code=0 | ||
else | ||
exit_code=$? | ||
echo "$0: command failed; please see $console_log in artifacts" | ||
fi | ||
exit "$exit_code" | ||
else | ||
# revert to noop so that this wrapper isn't so inconvenient to be used deep | ||
# outside CI=1 land (i.e. on laptops) | ||
"$@" | ||
fi |
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