2a566042160dc8d46a031f95f8ecabadfa68266a
[profile/ivi/ico-uxf-weston-plugin.git] / tests / weston-plugin-test.input
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 rm -fr ../tests/testlog
9 mkdir ../tests/testlog
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_inputtest.dat 2> ../tests/testlog/test-homescreen.log
29
30 # 7 End of Test
31 sleep 1
32 /usr/bin/killall weston
33 /usr/bin/killall test-send_event
34 sleep 1
35
36 # 8 Check Error
37 FOUND_ERR=0
38 /bin/grep "ERR>" testlog/*
39 if [ "$?" != "1" ] ; then
40         FOUND_ERR=1
41 fi
42 /bin/grep "WRN>" testlog/*
43 if [ "$?" != "1" ] ; then
44         FOUND_ERR=1
45 fi
46 /bin/grep "Error" testlog/*
47 if [ "$?" != "1" ] ; then
48         FOUND_ERR=1
49 fi
50 /bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
51 if [ "$?" != "1" ] ; then
52         FOUND_ERR=1
53 fi
54 /bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
55 if [ "$?" != "1" ] ; then
56         FOUND_ERR=1
57 fi
58
59 if [ $FOUND_ERR = 0 ] ; then
60         echo "Weston IVI Plugin Test: OK"
61 else
62         echo "Weston IVI Plugin Test: ERROR"
63 fi
64