Bugfix for TIVI-1997, TIVI-2244, TIVI-2256, A ivi cursor layer may pick up a touch...
[profile/ivi/ico-uxf-weston-plugin.git] / tests / weston-plugin-test.map
1 #!/bin/sh
2 #
3 #       Weston IVI Plugin Test
4 #
5 #         Remark: This examination premises that Weston does not run.
6
7 # 1 Delete log file
8 mkdir ../tests/testlog 2> /dev/null
9 rm -fr ../tests/testlog/* 2> /dev/null
10
11 # 2 Start Pseudo event device (for Touch Panel)
12 ../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
13 sleep 1
14
15 # 3 Set Environment for Test
16 export WESTON_IVI_PLUGIN_DIR="../src/.libs"
17
18 # 4 Start Weston
19 export XDG_CONFIG_HOME="../tests"
20 export XDG_RUNTIME_DIR="/run/user/5000"
21 MOD_DIR="$PWD/../src/.libs"
22 /usr/bin/weston --tty=2 --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
23 sleep 1
24
25 # 5 Set library path
26 export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
27
28 # 6 Start test-homescreen
29 ../tests/test-homescreen < ../tests/testdata/hs_mapsurf.dat 2> ../tests/testlog/test-homescreen.log
30 ##echo "../tests/test-homescreen < ../tests/testdata/hs_mapsurf.dat 2> ../tests/testlog/test-homescreen.log"
31 ##gdb test-homescreen
32
33 # 7 End of Test
34 sleep 2
35 /usr/bin/killall weston
36 /usr/bin/killall test-send_event
37 sleep 1
38
39 # 8 Check Error
40 FOUND_ERR=0
41 /bin/grep "ERR>" testlog/*
42 if [ "$?" != "1" ] ; then
43         FOUND_ERR=1
44 fi
45 /bin/grep "WRN>" testlog/*
46 if [ "$?" != "1" ] ; then
47         FOUND_ERR=1
48 fi
49 /bin/grep "Error" testlog/*
50 if [ "$?" != "1" ] ; then
51         FOUND_ERR=1
52 fi
53 /bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "failed to restore kb mode:" | /bin/grep -v "failed to set KD_TEXT mode on tty:"
54 if [ "$?" != "1" ] ; then
55         FOUND_ERR=1
56 fi
57 /bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
58 if [ "$?" != "1" ] ; then
59         FOUND_ERR=1
60 fi
61
62 if [ $FOUND_ERR = 0 ] ; then
63         echo "Weston IVI Plugin Test: OK"
64 else
65         echo "Weston IVI Plugin Test: ERROR"
66 fi
67