From: Michal Sojka Date: Thu, 11 Jun 2009 16:24:07 +0000 (+0200) Subject: Added simple test to check the infrastructure X-Git-Tag: fix-allnoconfig~388 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/2725fec83bbe28c02ba5921f6d31432d3c3d867f Added simple test to check the infrastructure --- diff --git a/.gitignore b/.gitignore index 34de623..b045105 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /_compiled/ /socketcan/ /config.omk-default +*~ +/cscope.* diff --git a/canping b/canping index 3285bf9..c2d88b9 160000 --- a/canping +++ b/canping @@ -1 +1 @@ -Subproject commit 3285bf97a73fe54806e97cc320a61673f8395df2 +Subproject commit c2d88b9017e8a92eb34a3b6ceeccf66c9091c2e9 diff --git a/config.target b/config.target index e4fb44a..04e1c05 100644 --- a/config.target +++ b/config.target @@ -2,3 +2,5 @@ CONFIG_OC_CANVCA_IFC=multi CONFIG_OC_CANVCA_IFC_lincan=y CONFIG_OC_CANVCA_IFC_socketcan=y CONFIG_OC_CANVCA_IFC_multi=y + +CFLAGS += -g diff --git a/tests/lib.sh b/tests/lib.sh new file mode 100644 index 0000000..4fc9fc2 --- /dev/null +++ b/tests/lib.sh @@ -0,0 +1,24 @@ +set -x +set -e + +PATH=$PWD/../_compiled/bin/:$PATH + +rmmod_can() { + modprobe -r lincan +} + +load_lincan_hw() { + rmmod_can + modprobe -C /dev/null lincan hw=pcican-q io=1 baudrate=1000,1000,1000,1000 processlocal=0 + sleep 0.1 +} + +load_lincan_virtual() { + rmmod_can + modprobe -C /dev/null lincan hw=virtual io=0 baudrate=0 + sleep 0.1 +} + +load_socketcan() { + rmmod_can +} diff --git a/tests/t01-simple.sh b/tests/t01-simple.sh new file mode 100755 index 0000000..103630d --- /dev/null +++ b/tests/t01-simple.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +. lib.sh + +load_lincan_hw + +PID_S=`vca_canping -s 1 -b -r -d /dev/can1` + +vca_canping -m 1 -r -v -t 1 -d /dev/can0 -w 5 -c 1000 + +kill $PID_S +#killall -9 vca_canping