aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2018-11-28 10:12:56 +0000
committerLinaro Code Review <review@review.linaro.org>2018-11-28 10:12:56 +0000
commit05ce61162fbf2034cd258b9108004c349640bb8d (patch)
tree6e61c8d40f13a7471670c6b413743a9795289f04
parent973e70081cec17200fddc5284e9672de55cd8d12 (diff)
parent238b481997a895c188f44a1214c5363903c9caa9 (diff)
Merge "linux/ipref: add support for test run against remote server"
-rwxr-xr-xautomated/linux/iperf/iperf.sh4
-rw-r--r--automated/linux/iperf/iperf.yaml15
2 files changed, 16 insertions, 3 deletions
diff --git a/automated/linux/iperf/iperf.sh b/automated/linux/iperf/iperf.sh
index 525ff08e..80ca89ae 100755
--- a/automated/linux/iperf/iperf.sh
+++ b/automated/linux/iperf/iperf.sh
@@ -1,11 +1,11 @@
-#!/bin/sh -e
+#!/bin/sh -ex
# shellcheck disable=SC1091
. ../../lib/sh-test-lib
OUTPUT="$(pwd)/output"
RESULT_FILE="${OUTPUT}/result.txt"
LOGFILE="${OUTPUT}/iperf.txt"
-# Test locahost by defualt, which tests the effificency of TCP/IP stack.
+# Test localhost by default, which tests the efficiency of TCP/IP stack.
# To test physical network bandwidth, specify remote test server with '-c'.
# Execute 'iperf3 -s' on remote host to run iperf3 test server.
SERVER="127.0.0.1"
diff --git a/automated/linux/iperf/iperf.yaml b/automated/linux/iperf/iperf.yaml
index 2d636c68..a1dde418 100644
--- a/automated/linux/iperf/iperf.yaml
+++ b/automated/linux/iperf/iperf.yaml
@@ -29,9 +29,22 @@ params:
# Number of parallel client streams to run
THREADS: "1"
SKIP_INSTALL: "false"
+ # Specify iperf server
+ # Set the var to lava-host-role for test run with LAVA multinode job
+ SERVER: 127.0.0.1
+ # When running with LAVA multinode job, set the following vars to the values
+ # sent by lava-send from host role.
+ MSG_ID: server-ready
+ MSG_KEY: ipaddr
run:
steps:
+ - fixed_server="${SERVER}"
+ - if [ "${SERVER}" = "lava-host-role" ]; then
+ - lava-wait "${MSG_ID}"
+ - fixed_server=$(grep "${MSG_KEY}" /tmp/lava_multi_node_cache.txt | awk -F"=" '{print $NF}')
+ - fi
- cd ./automated/linux/iperf/
- - ./iperf.sh -t "${TIME}" -p "${THREADS}" -s "${SKIP_INSTALL}"
+ - ./iperf.sh -t "${TIME}" -p "${THREADS}" -s "${SKIP_INSTALL}" -c "${fixed_server}"
- ../../utils/send-to-lava.sh ./output/result.txt
+ - '[ "${SERVER}" = "lava-host-role" ] && lava-send client-done'