4 # Copyright (C) 2012 Toni Gundogdu <legatvs@gmail.com>
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
30 f
="`dirname $0`/find_tests.sh"
31 T
=`$f | sort -hr` ||
{
36 echo "error: tests not found"
41 enter_custom_test_skip
()
43 T
=`$Z --entry --text="Enter:" \
44 --entry-text="(comma-separated, patterns OK)" \
45 --width=320 --height=180 \
46 --title="Enter a custom value for TEST_SKIP"`
48 echo "TEST_SKIP=$TEST_SKIP"
52 choose_skipped_tests
()
57 o
='--list --width 320 --height 480 --separator=,'
58 o
="$o --column Skip --column Test"
59 T
=`$Z $o --checklist false enter_custom $a`
60 expr "$T" : ".*enter_custom.*" >/dev
/null
&& enter_custom_test_skip
62 # echo "TEST_SKIP=$TEST_SKIP"
68 o
='--list --radiolist --width 320 --height 240'
69 o
="$o --column Enable --column Level true basic false complete"
71 export TEST_LEVEL
="$T"
72 # echo "TEST_LEVEL=$TEST_LEVEL"
78 c
='--column Enable --column Test'
79 a
='false TEST_GEOBLOCKED false TEST_VERBOSE false TEST_NSFW false TEST_FIXME'
80 r
=`$Z --width 320 --height 240 --list --checklist $c $a`
81 expr "$r" : ".*GEOBLOCKED.*" >/dev
/null
&& export TEST_GEOBLOCKED
=1
82 expr "$r" : ".*VERBOSE.*" >/dev
/null
&& export TEST_VERBOSE
=1
83 expr "$r" : ".*FIXME.*" >/dev
/null
&& export TEST_FIXME
=1
84 expr "$r" : ".*NSFW.*" >/dev
/null
&& export TEST_NSFW
=1
90 echo "TEST_GEOBLOCKED=$TEST_GEOBLOCKED"
91 echo "TEST_VERBOSE=$TEST_VERBOSE"
92 echo "TEST_FIXME=$TEST_FIXME"
93 echo "TEST_NSFW=$TEST_NSFW"
100 echo "Usage: $0 [OPTIONS]
102 $0 is a convenience script for running the tests.
105 -h Show this help and exit
107 NOTE: Run 'configure' script first
110 cd \$top_srcdir ; mkdir tmp ; cd tmp
111 ../configure && make && ../$0
113 $0 sets the following environment variables before
121 NOTE: You must set any HTTP proxy environment variables (e.g.
122 http_proxy) manually. Refer to curl(1) manual page for a list
123 of the supported variables."
136 [ -f "config.log" ] ||
{
137 echo "error: config.log not found: have you run configure?"
147 # vim: set ts=2 sw=2 tw=72 expandtab: