Update package changelog.
[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
10 # 2 Start Pseudo event device (for Touch Panel)
11 ../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
12 sleep 1
13
14 # 3 Weston/Wayland Envionment
15 export XDG_RUNTIME_DIR=/tmp/run-root
16 export QT_QPA_PLATFORM=wayland
17 export ELM_ENGINE=wayland_egl
18 export ECORE_EVAS_ENGINE=wayland_egl
19 export EVAS_FONT_DPI=72
20 export ECORE_IMF_MODULE=isf
21 export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
22 export ELM_SCALE="0.7"
23 export ELM_PROFILE=mobile
24 #export WAYLAND_DEBUG="1"
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 ../tests/test-homescreen < ../tests/testdata/hs_inputtest.dat 2> ../tests/testlog/test-homescreen.log
40
41 # 8 End of Test
42 sleep 1
43 /usr/bin/killall weston
44 /usr/bin/killall test-send_event
45 sleep 1
46
47 # 9 Check Error
48 FOUND_ERR=0
49 /bin/grep "ERR>" testlog/*
50 if [ "$?" != "1" ] ; then
51         FOUND_ERR=1
52 fi
53 /bin/grep "WRN>" testlog/*
54 if [ "$?" != "1" ] ; then
55         FOUND_ERR=1
56 fi
57 /bin/grep "Error" testlog/*
58 if [ "$?" != "1" ] ; then
59         FOUND_ERR=1
60 fi
61 /bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
62 if [ "$?" != "1" ] ; then
63         FOUND_ERR=1
64 fi
65 /bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
66 if [ "$?" != "1" ] ; then
67         FOUND_ERR=1
68 fi
69
70 if [ $FOUND_ERR = 0 ] ; then
71         echo "Weston IVI Plugin Test: OK"
72 else
73         echo "Weston IVI Plugin Test: ERROR"
74 fi
75