Skip to content

Commit

Permalink
test: bring a little colour to Bash tests on GHA
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Michalski <jan.michalski@intel.com>
  • Loading branch information
janekmi committed Aug 22, 2023
1 parent 1f5b9e1 commit 3cd7441
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/unittest/unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ function interactive_color() {
fd=$2
shift 2

if is_terminal ${fd} && command -v tput >/dev/null; then
if (is_terminal ${fd} || [ "$GITHUB_ACTIONS" == "true" ] ) && \
command -v tput >/dev/null; then
echo "$(tput setaf $color || :)$*$(tput sgr0 || :)"
else
echo "$*"
Expand Down

0 comments on commit 3cd7441

Please sign in to comment.