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