Support Tizen 3.0
[profile/ivi/ico-uxf-weston-plugin.git] / tests / weston-plugin-test.resize_smoke
1 #!/bin/sh
2 #
3 #       Weston IVI Plugin Test (Resize Buf 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 Weston/Wayland Envionment
16 export XDG_RUNTIME_DIR=/tmp/run-root
17 export QT_QPA_PLATFORM=wayland
18 export ELM_ENGINE=wayland_egl
19 export ECORE_EVAS_ENGINE=wayland_egl
20 #export ELM_ENGINE=wayland_shm
21 #export ECORE_EVAS_ENGINE=wayland_shm
22 export EVAS_FONT_DPI=72
23 export ECORE_IMF_MODULE=isf
24 export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
25 export ELM_SCALE="0.7"
26 export ELM_PROFILE=mobile
27
28 # 4 Set Environment for Test
29 export WESTON_IVI_PLUGIN_DIR="../src/.libs"
30
31 # 5 Start Weston
32 export XDG_CONFIG_HOME="../tests"
33 MOD_DIR="$PWD/../src/.libs"
34 /usr/bin/weston --backend=drm-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
35 sleep 1
36
37 # 6 Set library path
38 export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
39
40 # 7 Start test-homescreen
41 if [ $# != 0 ] ; then
42         ../tests/test-homescreen < ../tests/testdata/$1 2> ../tests/testlog/test-homescreen.log
43 else
44         ../tests/test-homescreen < ../tests/testdata/hs_resize_smoke.dat 2> ../tests/testlog/test-homescreen.log
45 fi
46
47 # 8 End of Test
48 sleep 1
49 /usr/bin/killall weston
50 /usr/bin/killall test-send_event
51 sleep 1
52
53 # 9 Check Error
54 FOUND_ERR=0
55 /bin/grep "ERR>" testlog/*
56 if [ "$?" != "1" ] ; then
57         FOUND_ERR=1
58 fi
59 /bin/grep "WRN>" testlog/*
60 if [ "$?" != "1" ] ; then
61         FOUND_ERR=1
62 fi
63 /bin/grep "Error" testlog/*
64 if [ "$?" != "1" ] ; then
65         FOUND_ERR=1
66 fi
67 /bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
68 if [ "$?" != "1" ] ; then
69         FOUND_ERR=1
70 fi
71 /bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
72 if [ "$?" != "1" ] ; then
73         FOUND_ERR=1
74 fi
75
76 if [ $FOUND_ERR = 0 ] ; then
77         echo "Weston IVI Plugin Test: OK"
78 else
79         echo "Weston IVI Plugin Test: ERROR"
80 fi
81