summaryrefslogtreecommitdiffstats
path: root/common/scripts/test_can_loopback_mode.sh
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2019-11-28 10:05:10 +0100
committerCorentin LABBE <clabbe@baylibre.com>2019-11-28 10:07:44 +0100
commitf820cb32ee5d7edb1f3c0ad8198805ba79e63b7b (patch)
treeb38d89ebadb9af442ecfa097bb789fd613c7938d /common/scripts/test_can_loopback_mode.sh
parentbf2a5d6e8537c5e8d6203232cc0037d57d503e4e (diff)
SPEC-2996: Fix ip check
BusyBox ip print its version stderr, so we need to redirect it to stdin. Furthermore, using set -x reset the error code, we need to store it before. Bug-AGL: SPEC-2996 Change-Id: I4b80475b0f9291fc55e661362a981ac14dbdb9b0 Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
Diffstat (limited to 'common/scripts/test_can_loopback_mode.sh')
-rwxr-xr-xcommon/scripts/test_can_loopback_mode.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/scripts/test_can_loopback_mode.sh b/common/scripts/test_can_loopback_mode.sh
index 4f4ae76..96b1091 100755
--- a/common/scripts/test_can_loopback_mode.sh
+++ b/common/scripts/test_can_loopback_mode.sh
@@ -15,9 +15,10 @@ fi
sleep 2
set -x
-ip -V | grep -q -i BusyBox
+ip -V 2>&1 | grep -q -i BusyBox
+RET=$?
set +x
-if [ $? -eq 0 ];then
+if [ $RET -eq 0 ];then
echo "WARN: busybox ip is not handled"
# busybox ip does not handle bitrate option
skip_tests