aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-09-30 04:14:09 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-09-30 04:14:09 +0300
commit09b4d1b0c98fd34a7af886c80c6e17cd42217500 (patch)
tree86c92d8b8b75ea021c141d01ca84179fd8672f1f
parentTravis: move test phases into separate scripts (diff)
downloadvk-scripts-09b4d1b0c98fd34a7af886c80c6e17cd42217500.tar.gz
vk-scripts-09b4d1b0c98fd34a7af886c80c6e17cd42217500.zip
Travis: online_sessions.sh: refactoring
-rwxr-xr-x.travis/test/online_sessions.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/.travis/test/online_sessions.sh b/.travis/test/online_sessions.sh
index 0bf578c..b8a56de 100755
--- a/.travis/test/online_sessions.sh
+++ b/.travis/test/online_sessions.sh
@@ -9,6 +9,13 @@ set -o errexit -o nounset -o pipefail
readonly db_path='.travis/test_db.csv'
+fix_matplotlib() {
+ # Get rid of:
+ # tkinter.TclError: no display name and no $DISPLAY environment variable
+ mkdir -p -- ~/.config/matplotlib
+ echo 'backend: Agg' > ~/.config/matplotlib/matplotlibrc
+}
+
_online_sessions() {
local output_path
output_path="$( mktemp --dry-run )"
@@ -31,11 +38,6 @@ _online_sessions() {
}
online_sessions() {
- # Get rid of:
- # tkinter.TclError: no display name and no $DISPLAY environment variable
- mkdir -p -- ~/.config/matplotlib
- echo 'backend: Agg' > ~/.config/matplotlib/matplotlibrc
-
_online_sessions --group-by user --output-format csv
_online_sessions --group-by user --output-format json
@@ -46,6 +48,7 @@ online_sessions() {
}
main() {
+ fix_matplotlib
online_sessions
}