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/online_sessions.sh | |
parent | Travis: more tests (diff) | |
download | vk-scripts-07dd389c1467ef1a3e41e35b7d416e6847951d35.tar.gz vk-scripts-07dd389c1467ef1a3e41e35b7d416e6847951d35.zip |
Travis: even prettier output
Diffstat (limited to '')
-rwxr-xr-x | .travis/bin/online_sessions.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/.travis/bin/online_sessions.sh b/.travis/bin/online_sessions.sh index d70f1ad..d64ef2f 100755 --- a/.travis/bin/online_sessions.sh +++ b/.travis/bin/online_sessions.sh @@ -10,9 +10,18 @@ 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 readonly db_path="$script_dir/../share/test_db.csv" +dump() { + local msg + for msg; do + echo "$script_name: $msg" + done +} + test_output() { local output_path output_path="$( mktemp --dry-run )" @@ -25,7 +34,7 @@ test_output() { "$script_dir/../lib/test.sh" bin.online_sessions "$@" "$db_path" "$output_path" if file --brief --dereference --mime -- "$output_path" | grep --quiet -- 'charset=binary$'; then - echo 'Output is a binary file, not going to show that' + dump 'Output is a binary file, not going to show that' return 0 fi |