summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-11-16 19:21:44 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-11-16 21:29:08 +0000
commit6ea0a7ce5bca6d0b667cfcbe608a802001ab12b4 (patch)
treebee3170b11114fbb9e7ecdc088d45a4ee6989854
parent0373577ad4505af6be4ead42c39630f1a80393a8 (diff)
linux: network-basic: test the default interface by default
* Enabled verbose shell output. * Test the default interface when interface not specified. Change-Id: I6ca76c250a7560756a88e279f889c0ed69b6b43d Signed-off-by: Chase Qi <chase.qi@linaro.org>
-rwxr-xr-xautomated/linux/network-basic/network-basic.sh5
-rw-r--r--automated/linux/network-basic/network-basic.yaml2
2 files changed, 4 insertions, 3 deletions
diff --git a/automated/linux/network-basic/network-basic.sh b/automated/linux/network-basic/network-basic.sh
index b17a92c..0c5dd8c 100755
--- a/automated/linux/network-basic/network-basic.sh
+++ b/automated/linux/network-basic/network-basic.sh
@@ -1,11 +1,10 @@
-#!/bin/sh
+#!/bin/sh -x
# shellcheck disable=SC1091
. ../../lib/sh-test-lib
OUTPUT="$(pwd)/output"
RESULT_FILE="${OUTPUT}/result.txt"
export RESULT_FILE
-INTERFACE="eth0"
usage() {
echo "Usage: $0 [-s <true|false>] [-i <interface>]" 1>&2
@@ -40,6 +39,8 @@ create_out_dir "${OUTPUT}"
install
+# When not specified, test the default interface.
+test -z "${INTERFACE}" && INTERFACE=$(route | grep default | awk '{print $NF}')
# Get default Route Gateway IP address of a given interface
GATEWAY=$(ip route list | grep default | awk '{print $3}')
diff --git a/automated/linux/network-basic/network-basic.yaml b/automated/linux/network-basic/network-basic.yaml
index c0601d5..5f2da7d 100644
--- a/automated/linux/network-basic/network-basic.yaml
+++ b/automated/linux/network-basic/network-basic.yaml
@@ -27,7 +27,7 @@ metadata:
- apq8016-sbc
params:
- INTERFACE: eth0
+ INTERFACE: ""
SKIP_INSTALL: "False"
run: