diff options
author | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-03-27 18:24:07 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2022-04-21 19:20:05 +0200 |
commit | 51d6c9e91c7f8a927f678a3227e75deb5d9aebea (patch) | |
tree | a30290a3a1a6a55f60b6263ed119477a54bc69cd | |
parent | 029704b14a46645bb4d8ba6056d83f5f08ea0af8 (diff) |
integration: add nicer colors and date format
-rwxr-xr-x | integration/test.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/integration/test.sh b/integration/test.sh index 9ca8df5..5305f20 100755 --- a/integration/test.sh +++ b/integration/test.sh @@ -160,25 +160,24 @@ function test_alive() { } function die() { - echo -e "\e[90m$(date +"%Y-%m-%d %H:%M:%S")\e[0m [\e[1;31mFATA\e[0m] $@" >&2 + echo -e "\e[37m$(date +"%y-%m-%d %H:%M:%S %Z")\e[0m [\e[31mFATA\e[0m] $@" >&2 exit 1 } function info() { - echo -e "\e[90m$(date +"%Y-%m-%d %H:%M:%S")\e[0m [\e[94mINFO\e[0m] $@" >&2 + echo -e "\e[37m$(date +"%y-%m-%d %H:%M:%S %Z")\e[0m [\e[94mINFO\e[0m] $@" >&2 } function warn() { - echo -e "\e[90m$(date +"%Y-%m-%d %H:%M:%S")\e[0m [\e[33mWARN\e[0m] $@" >&2 + echo -e "\e[37m$(date +"%y-%m-%d %H:%M:%S %Z")\e[0m [\e[93mWARN\e[0m] $@" >&2 } function pass() { - echo -e "\e[90m$(date +"%Y-%m-%d %H:%M:%S")\e[0m [\e[32mPASS\e[0m] $@" >&2 + echo -e "\e[37m$(date +"%y-%m-%d %H:%M:%S %Z")\e[0m [\e[32mPASS\e[0m] $@" >&2 } function fail() { - echo -e "\e[90m$(date +"%Y-%m-%d %H:%M:%S")\e[0m [\e[1;31mFAIL\e[0m] $@" >&2 - die "abort due to failed tests" + echo -e "\e[37m$(date +"%y-%m-%d %H:%M:%S %Z")\e[0m [\e[91mFAIL\e[0m] $@" >&2 } main |