3 # Device Input Controller Test for G27 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
14 # 3 Start Device Input Controllers
15 export DIC_GTFORCE_CONF="./testdata/g27racingwheel.conf"
16 ../gtforce/ico_dic-gtforce -Dstdout -L > ../tests/testlog/gtforce.log 2>&1 &
20 /usr/bin/weston --tty=1 --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
25 /usr/bin/killall ico_dic-gtforce
27 /usr/bin/killall -9 ico_dic-gtforce > /dev/nul 2>&1
29 /usr/bin/killall weston
34 /bin/grep "ERR>" testlog/*
35 if [ "$?" != "1" ] ; then
38 /bin/grep "WRN>" testlog/*
39 if [ "$?" != "1" ] ; then
42 /bin/grep "Error" testlog/*
43 if [ "$?" != "1" ] ; then
46 /bin/grep "error" testlog/*
47 if [ "$?" != "1" ] ; then
50 /bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight" | /bin/grep -v "disconnect"
51 if [ "$?" != "1" ] ; then
55 if [ $FOUND_ERR = 0 ] ; then
56 echo "Device Input Controller Test: OK"
58 echo "Device Input Controller Test: ERROR"