-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_all
executable file
·37 lines (33 loc) · 1.31 KB
/
test_all
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
31
32
33
34
35
36
37
#!/bin/bash
#
# Copyright (C) 2014 SUSE LLC
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) version 3.0 of the License. This library
# is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details. You should have received a copy of the GNU
# Lesser General Public License along with this library; if not, write
# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301 USA
#
# Runs the given tests ("$@") with all the UIs
# (or only with some of them, if the env.var. TARGETS is set).
# Sets up a new X server or a new terminal.
# Redirects output to a log.
# Returns false if some of the tests failed.
set -x
set -u
TERM_FOR_ncurses=./virtual_terminal
TERM_FOR_qt=./virtual_x_server
TERM_FOR_gtk=./virtual_x_server
: ${TARGETS=ncurses qt gtk}
# test all UIs even if one of them fails
FAIL=false
for UI in $TARGETS; do
TERM_FOR_UI=TERM_FOR_$UI
${!TERM_FOR_UI} "./test_$UI $* 2> $UI.log" || { tail $UI.log; FAIL=true; }
done
! $FAIL