78139422d363139e94ac5347f4cbabf9423f56fc
[profile/ivi/ico-uxf-homescreen.git] / test / homescreen-test.sh
1 #!/bin/sh
2
3 ## log file
4 export HOMESCREEN_LOG=/tmp/log/org.tizen.ico.homescreen.log
5 export ONSCREEN_LOG=/tmp/log/org.tizen.ico.onscreen.log
6
7 ## make dat
8 ./homescreen-test-makedat.sh
9
10 ## GUI test
11 ./ico_send_inputevent -m < testdata/gui-test.dat
12
13 ## CUI test
14 #Hide tile screen
15 ./ico_send_hscommand json/hide-tile.json
16 sleep 3
17 #Show tile screen
18 ./ico_send_hscommand json/show-tile.json
19 sleep 3
20 #Show application
21 ./ico_send_hscommand json/hide-tile.json
22 sleep 3
23 ./ico_send_hscommand json/show-app1.json
24 sleep 3
25 #Move and resize application
26 ./ico_send_hscommand json/geom-app1-1.json
27 sleep 3
28 ./ico_send_hscommand json/geom-app1-2.json
29 sleep 3
30 ./ico_send_hscommand json/geom-app1-3.json
31 sleep 3
32 #Terminate application
33 ./ico_send_hscommand json/term-app1.json
34 sleep 3
35 ./ico_send_hscommand json/show-tile.json
36 sleep 3
37 #Terminate application
38 ./ico_send_hscommand json/hide-tile.json
39 sleep 3
40 ./ico_send_hscommand json/exec-app1.json
41 sleep 3
42 #Application on tile screen
43 ./ico_send_hscommand json/show-tile.json
44 sleep 3
45
46 ## Check Error
47 FOUND_ERR=0
48 /bin/grep -i "err" $HOMESCREEN_LOG
49 if [ "$?" != "1" ] ; then
50     FOUND_ERR=1
51 fi
52 /bin/grep -i "err" $ONSCREEN_LOG
53 if [ "$?" != "1" ] ; then
54     FOUND_ERR=1
55 fi
56 /bin/grep -i "fail" $HOMESCREEN_LOG
57 if [ "$?" != "1" ] ; then
58     FOUND_ERR=1
59 fi
60 /bin/grep -i "fail" $ONSCREEN_LOG
61 if [ "$?" != "1" ] ; then
62     FOUND_ERR=1
63 fi
64
65 ## delete dat file
66 rm -f testdata/gui-test.dat
67
68 if [ $FOUND_ERR = 0 ] ; then
69         echo "org.tizen.ico.homescreen Test: OK"
70 else
71     echo "org.tizen.ico.homescreen Test: ERROR"
72 fi
73