diff options
Diffstat (limited to '.travis/test')
-rwxr-xr-x | .travis/test/mutual_friends.sh | 21 | ||||
-rwxr-xr-x | .travis/test/show_status.sh | 19 | ||||
-rwxr-xr-x | .travis/test/track_status.sh | 6 |
3 files changed, 42 insertions, 4 deletions
diff --git a/.travis/test/mutual_friends.sh b/.travis/test/mutual_friends.sh new file mode 100755 index 0000000..ebe0c17 --- /dev/null +++ b/.travis/test/mutual_friends.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Copyright (c) 2019 Egor Tensin <Egor.Tensin@gmail.com> +# This file is part of the "VK scripts" project. +# For details, see https://github.com/egor-tensin/vk-scripts. +# Distributed under the MIT License. + +set -o errexit -o nounset -o pipefail + +mutual_friends() { + echo 'Running mutual_friends.py --format csv...' + python3 -m bin.mutual_friends --format csv "$@" + echo 'Running mutual_friends.py --format json...' + python3 -m bin.mutual_friends --format json "$@" +} + +main() { + mutual_friends kreed58 maxkorzh_official +} + +main "$@" diff --git a/.travis/test/show_status.sh b/.travis/test/show_status.sh new file mode 100755 index 0000000..afba9aa --- /dev/null +++ b/.travis/test/show_status.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Copyright (c) 2019 Egor Tensin <Egor.Tensin@gmail.com> +# This file is part of the "VK scripts" project. +# For details, see https://github.com/egor-tensin/vk-scripts. +# Distributed under the MIT License. + +set -o errexit -o nounset -o pipefail + +show_status() { + echo 'Running show_status.py...' + python3 -m bin.show_status "$@" +} + +main() { + show_status egor.tensin +} + +main "$@" diff --git a/.travis/test/track_status.sh b/.travis/test/track_status.sh index 5102088..afdfea1 100755 --- a/.travis/test/track_status.sh +++ b/.travis/test/track_status.sh @@ -7,8 +7,6 @@ set -o errexit -o nounset -o pipefail -readonly uid='egor.tensin' - track_status() { local log_path log_path="$( mktemp )" @@ -24,7 +22,7 @@ track_status() { trap "$rm_aux_files" RETURN echo 'Running track_status.py...' - python3 -m bin.track_status "$uid" --log "$log_path" --format csv --output "$db_path" & + python3 -m bin.track_status "$@" --log "$log_path" --format csv --output "$db_path" & local pid="$!" echo "Its PID is $pid" @@ -44,7 +42,7 @@ track_status() { } main() { - track_status + track_status egor.tensin } main "$@" |