X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fscripts%2Ftest_can_modules.sh;h=1a46034f9a4f0b26be82386493520a161d712eab;hb=225cd026b8baea8e38b29187309e734ea373288f;hp=9a5a6bd2a0e8fd6feaba63bf81cc8cf3d4e6ee92;hpb=bf2a5d6e8537c5e8d6203232cc0037d57d503e4e;p=src%2Fqa-testdefinitions.git diff --git a/common/scripts/test_can_modules.sh b/common/scripts/test_can_modules.sh index 9a5a6bd..1a46034 100755 --- a/common/scripts/test_can_modules.sh +++ b/common/scripts/test_can_modules.sh @@ -1,5 +1,7 @@ #!/bin/sh +RCAR_CAN=0 + if [ ! -e /sys/class/net/can1 ];then lava-test-case show_can_modules --result skip lava-test-case unload_can_raw_module --result skip @@ -48,9 +50,15 @@ remove_module c_can_platform remove_module c_can -remove_module can_dev unload_can_dev_module +lsmod | grep -q rcar_can +if [ $? -eq 0 ];then + RCAR_CAN=1 + remove_module rcar_can +fi + +remove_module can_dev -ip -V | grep -q -i BusyBox +ip -V 2>&1 | grep -q -i BusyBox if [ $? -eq 0 ];then lava-test-case canconfig_can0 --result skip else @@ -72,11 +80,15 @@ modprobe_module c_can_platform modprobe_module can_dev +if [ $RCAR_CAN -eq 1 ];then + modprobe_module rcar_can +fi + #Make sure always that the can interface is down before #starting the config step. ip link set can0 down -ip -V | grep -q -i BusyBox +ip -V 2>&1 | grep -q -i BusyBox if [ $? -eq 0 ];then lava-test-case canconfig_can0 --result skip else