Remove failing tests SceneTest.getSurfaceAt
[profile/ivi/layer-management.git] / GeniviDemo.sh
1 #!/bin/sh
2 ############################################################################
3
4 # Copyright 2010, 2011 BMW Car IT GmbH
5
6
7 # Licensed under the Apache License, Version 2.0 (the "License"); 
8 # you may not use this file except in compliance with the License. 
9 # You may obtain a copy of the License at 
10 #
11 #       http://www.apache.org/licenses/LICENSE-2.0 
12 #
13 # Unless required by applicable law or agreed to in writing, software 
14 # distributed under the License is distributed on an "AS IS" BASIS, 
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
16 # See the License for the specific language governing permissions and 
17 # limitations under the License.
18 #
19 ############################################################################
20
21 export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
22 export DISPLAY=:0.0
23 PIDSURFACE1=/tmp/surface1.pid
24 PIDSURFACE2=/tmp/surface2.pid
25
26 start_egl_example_application()
27 {
28     EGLX11ApplicationExample &
29     pidofdlt=`ps aux | grep EGLX11ApplicationExample | grep -v grep | awk '{print $2}'`
30     echo $pidofdlt > $PIDSURFACE1
31 }
32
33 start_mock_example_application()
34 {
35     EGLX11MockNavigation -layer 3000 -surface 20 &
36     pidofdlt=`ps aux | grep EGLX11MockNavigation  | grep -v grep | awk '{print $2}'`
37     echo $pidofdlt > $PIDSURFACE2
38 }
39
40
41 killprocess()
42 {
43     if [ -f $1 ]; then
44         kill -9 `cat $1`
45         rm -f $1
46     fi
47 }
48 stop() 
49 {
50     killprocess $PIDSURFACE1
51     killprocess $PIDSURFACE2
52 }
53
54 start()
55 {
56     start_egl_example_application
57     start_mock_example_application
58 }
59
60 case "$1" in
61     start)
62         start
63         ;;
64     start_example_application)
65         start_example_application
66         ;;
67     stop)
68         stop
69         ;;
70
71     *)
72         echo "Usage: $0 {start|start_example_application|stop}"
73         ;;
74 esac
75 exit 0