forked from stb-tester/stb-tester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstbt-batch
executable file
·30 lines (26 loc) · 863 Bytes
/
stbt-batch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# Copyright 2013 YouView TV Ltd.
# License: LGPL v2.1 or (at your option) any later version (see
# https://github.com/stb-tester/stb-tester/blob/master/LICENSE for details).
#/ usage: stbt batch <subcommand> [args]
#/
#/ Available subcommands are:
#/ run Run the specified stbt script[s], create report
#/ report Re-generate the report for previous test runs
#/ instaweb Start a web server to view & edit the report
#/
#/ For help on a specific subcommand do 'stbt batch <subcommand> -h'.
usage() { grep '^#/' "$0" | cut -c4-; }
[ $# -ge 1 ] || { usage >&2; exit 1; }
cmd="$1"
shift
case "$cmd" in
-h|--help)
usage; exit 0;;
run)
exec "$(dirname "$0")"/stbt-batch.d/run.py "$@";;
report|instaweb)
exec "$(dirname "$0")"/stbt-batch.d/$cmd "$@";;
*)
usage >&2; exit 1;;
esac