aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-03-11 17:44:10 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-03-11 17:44:10 +0300
commitd00d6df0904dea29c57183b80a5295480a3f3378 (patch)
treea5beb6f8e5ac26d9fce2dafd3a277653e9fe6b66
parentTravis: restructure .travis/ (diff)
downloadvk-scripts-d00d6df0904dea29c57183b80a5295480a3f3378.tar.gz
vk-scripts-d00d6df0904dea29c57183b80a5295480a3f3378.zip
Travis: more tests
-rwxr-xr-x.travis/bin/online_sessions.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/.travis/bin/online_sessions.sh b/.travis/bin/online_sessions.sh
index 2534735..d70f1ad 100755
--- a/.travis/bin/online_sessions.sh
+++ b/.travis/bin/online_sessions.sh
@@ -13,7 +13,7 @@ readonly script_dir
readonly db_path="$script_dir/../share/test_db.csv"
-try_output() {
+test_output() {
local output_path
output_path="$( mktemp --dry-run )"
@@ -29,18 +29,20 @@ try_output() {
return 0
fi
- echo "Output:"
cat "$output_path"
}
-online_sessions() {
- try_output --group-by user --output-format csv
- try_output --group-by user --output-format json
+group_by() {
+ test_output --output-format csv --group-by "$@"
+ test_output --output-format json --group-by "$@"
+ test_output --output-format plot --group-by "$@"
+}
- try_output --group-by user --output-format plot
- try_output --group-by hour --output-format plot
- try_output --group-by date --output-format plot
- try_output --group-by weekday --output-format plot
+online_sessions() {
+ group_by user
+ group_by hour
+ group_by date
+ group_by weekday
}
fix_matplotlib() {