4 # Copyright (C) 2012 Toni Gundogdu <legatvs@gmail.com>
6 # This file part of libquvi-scripts <http://quvi.sourceforge.net/>.
8 # This program is free software: you can redistribute it and/or
9 # modify it under the terms of the GNU Affero General Public
10 # License as published by the Free Software Foundation, either
11 # version 3 of the License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU Affero General Public License for more details.
18 # You should have received a copy of the GNU Affero General
19 # Public License along with this program. If not, see
20 # <http://www.gnu.org/licenses/>.
31 f
="`dirname $0`/find_tests.sh"
32 T
=`$f | sort -hr` ||
{
37 echo "error: tests not found"
42 enter_custom_test_skip
()
44 T
=`$Z --entry --text="Enter:" \
45 --entry-text="(comma-separated, patterns OK)" \
46 --width=320 --height=180 \
47 --title="Enter a custom value for TEST_SKIP"`
49 echo "TEST_SKIP=$TEST_SKIP"
53 choose_skipped_tests
()
58 o
='--list --width 320 --height 480 --separator=,'
59 o
="$o --column Skip --column Test"
60 T
=`$Z $o --checklist false enter_custom $a`
61 expr "$T" : ".*enter_custom.*" >/dev
/null
&& enter_custom_test_skip
63 # echo "TEST_SKIP=$TEST_SKIP"
69 o
='--list --radiolist --width 320 --height 240'
70 o
="$o --column Enable --column Level true basic false complete"
72 export TEST_LEVEL
="$T"
73 # echo "TEST_LEVEL=$TEST_LEVEL"
79 c
='--column Enable --column Test'
80 a
='false TEST_GEOBLOCKED false TEST_VERBOSE false TEST_NSFW false TEST_FIXME'
81 r
=`$Z --width 320 --height 240 --list --checklist $c $a`
82 expr "$r" : ".*GEOBLOCKED.*" >/dev
/null
&& export TEST_GEOBLOCKED
=1
83 expr "$r" : ".*VERBOSE.*" >/dev
/null
&& export TEST_VERBOSE
=1
84 expr "$r" : ".*FIXME.*" >/dev
/null
&& export TEST_FIXME
=1
85 expr "$r" : ".*NSFW.*" >/dev
/null
&& export TEST_NSFW
=1
91 echo "TEST_GEOBLOCKED=$TEST_GEOBLOCKED"
92 echo "TEST_VERBOSE=$TEST_VERBOSE"
93 echo "TEST_FIXME=$TEST_FIXME"
94 echo "TEST_NSFW=$TEST_NSFW"
101 echo "Usage: $0 [OPTIONS]
103 $0 is a convenience script for running the tests.
106 -h Show this help and exit
108 NOTE: Run 'configure' script first
111 cd \$top_srcdir ; mkdir tmp ; cd tmp
112 ../configure && make && ../$0
114 $0 sets the following environment variables before
122 NOTE: You must set any HTTP proxy environment variables (e.g.
123 http_proxy) manually. Refer to curl(1) manual page for a list
124 of the supported variables."
137 [ -f "config.log" ] ||
{
138 echo "error: config.log not found: have you run configure?"
148 # vim: set ts=2 sw=2 tw=72 expandtab: