e86c5d71a2bc1c3af4b63f7bc38675dc76b4cf39
[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 MOD_DIR="$PWD/../src/.libs"
21 /usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
22 sleep 1
23
24 # 5 Set library path
25 export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
26
27 # 6 Start test-homescreen
28 ../tests/test-homescreen < ../tests/testdata/hs_mapsurf.dat 2> ../tests/testlog/test-homescreen.log
29 ##echo "../tests/test-homescreen < ../tests/testdata/hs_mapsurf.dat 2> ../tests/testlog/test-homescreen.log"
30 ##gdb test-homescreen
31
32 # 7 End of Test
33 sleep 2
34 /usr/bin/killall weston
35 /usr/bin/killall test-send_event
36 sleep 1
37
38 # 8 Check Error
39 FOUND_ERR=0
40 /bin/grep "ERR>" testlog/*
41 if [ "$?" != "1" ] ; then
42         FOUND_ERR=1
43 fi
44 /bin/grep "WRN>" testlog/*
45 if [ "$?" != "1" ] ; then
46         FOUND_ERR=1
47 fi
48 /bin/grep "Error" testlog/*
49 if [ "$?" != "1" ] ; then
50         FOUND_ERR=1
51 fi
52 /bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
53 if [ "$?" != "1" ] ; then
54         FOUND_ERR=1
55 fi
56 /bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
57 if [ "$?" != "1" ] ; then
58         FOUND_ERR=1
59 fi
60
61 if [ $FOUND_ERR = 0 ] ; then
62         echo "Weston IVI Plugin Test: OK"
63 else
64         echo "Weston IVI Plugin Test: ERROR"
65 fi
66