3 # Device Input Controller Test for G25 steering switch
5 # Remark: This examination premises that Weston does not run.
8 mkdir ../tests/testlog 2> /dev/null
9 rm -fr ../tests/testlog/* 2> /dev/null
11 # 2 set weston environment
12 export XDG_RUNTIME_DIR=/run/user/5000
13 export XDG_CONFIG_HOME="../tests"
15 # 3 Start Device Input Controllers
16 export DIC_GTFORCE_CONF="./testdata/drivingforcegt.conf"
17 ../gtforce/ico_dic-gtforce -Dstdout -L > ../tests/testlog/gtforce.log 2>&1 &
21 /usr/bin/weston --tty=2 --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
26 /usr/bin/killall ico_dic-gtforce
28 /usr/bin/killall -9 ico_dic-gtforce > /dev/nul 2>&1
30 /usr/bin/killall weston
35 /bin/grep "ERR>" testlog/*
36 if [ "$?" != "1" ] ; then
39 /bin/grep "WRN>" testlog/*
40 if [ "$?" != "1" ] ; then
43 /bin/grep "Error" testlog/*
44 if [ "$?" != "1" ] ; then
47 /bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "failed to restore kb mode:" | /bin/grep -v "failed to set KD_TEXT mode on tty:"
48 if [ "$?" != "1" ] ; then
51 /bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight" | /bin/grep -v "disconnect"
52 if [ "$?" != "1" ] ; then
56 if [ $FOUND_ERR = 0 ] ; then
57 echo "Device Input Controller Test: OK"
59 echo "Device Input Controller Test: ERROR"