A correction with version up of weston(1.2.0->1.2.1)
[profile/ivi/ico-uxf-weston-plugin.git] / tests / weston-plugin-vbox
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 Weston/Wayland Envionment
16 export QT_QPA_PLATFORM=wayland
17 #export ELM_ENGINE=wayland_egl
18 #export ECORE_EVAS_ENGINE=wayland_egl
19 export ELM_ENGINE=wayland_shm
20 export ECORE_EVAS_ENGINE=wayland_shm
21 export XDG_RUNTIME_DIR=/run/user/5000
22
23 # 4 Set Environment for Test
24 export WESTON_IVI_PLUGIN_DIR="../src/.libs"
25
26 # 5 Start Weston
27 export XDG_CONFIG_HOME="../tests"
28 MOD_DIR="$PWD/../src/.libs"
29 /usr/bin/weston --backend=fbdev-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
30 sleep 1
31
32 # 6 Set library path
33 export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
34
35 # 7 Start test-homescreen
36 ../tests/test-homescreen < ../tests/testdata/hs_alltest.dat 2> ../tests/testlog/test-homescreen.log
37
38 # 8 End of Test
39 sleep 2
40 /usr/bin/killall weston
41 /usr/bin/killall test-send_event
42 sleep 1
43
44 # 9 Check Error
45 FOUND_ERR=0
46 /bin/grep "ERR>" testlog/*
47 if [ "$?" != "1" ] ; then
48         FOUND_ERR=1
49 fi
50 /bin/grep "WRN>" testlog/*
51 if [ "$?" != "1" ] ; then
52         FOUND_ERR=1
53 fi
54 /bin/grep "Error" testlog/*
55 if [ "$?" != "1" ] ; then
56         FOUND_ERR=1
57 fi
58 /bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
59 if [ "$?" != "1" ] ; then
60         FOUND_ERR=1
61 fi
62 /bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
63 if [ "$?" != "1" ] ; then
64         FOUND_ERR=1
65 fi
66
67 if [ $FOUND_ERR = 0 ] ; then
68         echo "Weston IVI Plugin Test: OK"
69 else
70         echo "Weston IVI Plugin Test: ERROR"
71 fi
72