blob: 4bd2ed78b8f1e4d7031a1901a72a05e7e78c70f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#!/bin/sh
#
# Device Input Controller Test for G25 steering switch
#
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
mkdir ../tests/testlog 2> /dev/null
rm -fr ../tests/testlog/* 2> /dev/null
# 2 set weston environment
export XDG_RUNTIME_DIR=/run/user/5000
# 3 Start Device Input Controllers
export DIC_GTFORCE_CONF="./testdata/drivingforcegt.conf"
../gtforce/ico_dic-gtforce -Dstdout -L > ../tests/testlog/gtforce.log 2>&1 &
sleep 0.5
# 4 Start Weston
/usr/bin/weston --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
sleep 180
# 5 End of Test
sleep 1
/usr/bin/killall ico_dic-gtforce
sleep 0.2
/usr/bin/killall weston
sleep 1
# 9 Check Error
FOUND_ERR=0
/bin/grep "ERR>" testlog/*
if [ "$?" != "1" ] ; then
FOUND_ERR=1
fi
/bin/grep "WRN>" testlog/*
if [ "$?" != "1" ] ; then
FOUND_ERR=1
fi
/bin/grep "Error" testlog/*
if [ "$?" != "1" ] ; then
FOUND_ERR=1
fi
/bin/grep "error" testlog/*
if [ "$?" != "1" ] ; then
FOUND_ERR=1
fi
/bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
if [ "$?" != "1" ] ; then
FOUND_ERR=1
fi
if [ $FOUND_ERR = 0 ] ; then
echo "Device Input Controller Test: OK"
else
echo "Device Input Controller Test: ERROR"
fi
|