diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-11 17:49:06 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-11 17:51:32 +0300 |
commit | 07dd389c1467ef1a3e41e35b7d416e6847951d35 (patch) | |
tree | ec133279d0e27757dcca078df0258a5a4eff97c8 /.travis/bin/track_status.sh | |
parent | Travis: more tests (diff) | |
download | vk-scripts-07dd389c1467ef1a3e41e35b7d416e6847951d35.tar.gz vk-scripts-07dd389c1467ef1a3e41e35b7d416e6847951d35.zip |
Travis: even prettier output
Diffstat (limited to '.travis/bin/track_status.sh')
-rwxr-xr-x | .travis/bin/track_status.sh | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/.travis/bin/track_status.sh b/.travis/bin/track_status.sh index 9aedb6b..1a7a7dc 100755 --- a/.travis/bin/track_status.sh +++ b/.travis/bin/track_status.sh @@ -10,6 +10,15 @@ set -o errexit -o nounset -o pipefail script_dir="$( dirname -- "${BASH_SOURCE[0]}" )" script_dir="$( cd -- "$script_dir" && pwd )" readonly script_dir +script_name="$( basename -- "${BASH_SOURCE[0]}" )" +readonly script_name + +dump() { + local msg + for msg; do + echo "$script_name: $msg" + done +} test_users() { local log_path @@ -25,22 +34,22 @@ test_users() { local pid="$!" sleep 3 - echo "Log file path: $log_path" - echo "DB file path: $db_path" - echo "PID: $pid" + dump "Log file path: $log_path" + dump "DB file path: $db_path" + dump "PID: $pid" local timeout=10 - echo "Sleeping for $timeout seconds..." + dump "Sleeping for $timeout seconds..." sleep "$timeout" - echo 'Terminating track_status.py...' + dump 'Terminating track_status.py...' kill "$pid" - echo 'Waiting for track_status.py to terminate...' + dump 'Waiting for track_status.py to terminate...' wait "$pid" || true - echo "Log file:" + dump "Log file:" cat "$log_path" - echo "DB:" + dump "DB:" cat "$db_path" } |