Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / runall.sh
1 #!/bin/sh
2 #
3 #############################################################################
4 ##
5 ## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
6 ## All rights reserved.
7 ## Contact: Nokia Corporation (qt-info@nokia.com)
8 ##
9 ## This file is part of the test suite of the Qt Toolkit.
10 ##
11 ## $QT_BEGIN_LICENSE:LGPL$
12 ## No Commercial Usage
13 ## This file contains pre-release code and may not be distributed.
14 ## You may use this file in accordance with the terms and conditions
15 ## contained in the Technology Preview License Agreement accompanying
16 ## this package.
17 ##
18 ## GNU Lesser General Public License Usage
19 ## Alternatively, this file may be used under the terms of the GNU Lesser
20 ## General Public License version 2.1 as published by the Free Software
21 ## Foundation and appearing in the file LICENSE.LGPL included in the
22 ## packaging of this file.  Please review the following information to
23 ## ensure the GNU Lesser General Public License version 2.1 requirements
24 ## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ##
26 ## In addition, as a special exception, Nokia gives you certain additional
27 ## rights.  These rights are described in the Nokia Qt LGPL Exception
28 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ##
30 ## If you have questions regarding the use of this file, please contact
31 ## Nokia at qt-info@nokia.com.
32 ##
33 ##
34 ##
35 ##
36 ##
37 ##
38 ##
39 ##
40 ## $QT_END_LICENSE$
41 ##
42 ############################################################################/
43
44 if [ "$(uname)" = Linux ]
45 then
46     Xnest :7 2>/dev/null &
47     sleep 1
48     trap "kill $!" EXIT
49     export DISPLAY=:7
50     export LANG=en_US
51     kwin 2>/dev/null &
52     sleep 1
53 fi
54
55 function filter
56 {
57     exe=$1
58     skip=0
59     while read line
60     do
61         if [ $skip != 0 ]
62         then
63             let skip=skip-1
64         else
65             case "$line" in
66             make*Error) echo "$line";;
67             make*Stop) echo "$line";;
68             /*/bin/make*) ;;
69             make*) ;;
70             install*) ;;
71             QDeclarativeDebugServer:*Waiting*) ;;
72             QDeclarativeDebugServer:*Connection*) ;;
73             */qmake*) ;;
74             */bin/moc*) ;;
75             *targ.debug*) ;;
76             g++*) ;;
77             cd*) ;;
78             XFAIL*) skip=1;;
79             SKIP*) skip=1;;
80             PASS*) ;;
81             QDEBUG*) ;;
82             Makefile*) ;;
83             Config*) ;;
84             Totals*) ;;
85             \**) ;;
86             ./*) ;;
87             *tst_*) echo "$line" ;;
88             *) echo "$exe: $line"
89             esac
90         fi
91     done
92 }
93
94 make -k -j1 install 2>&1 | filter build
95 for exe in $(make install | sed -n 's/^install .* "\([^"]*qt4\/tst_[^"]*\)".*/\1/p')
96 do
97     echo $exe
98     $exe 2>&1 | filter $exe
99 done
100