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