blob: f2efb555d4b51c34e96f3598d5236626e33a0c51 [file] [log] [blame]
Arthur She01294662014-11-14 10:55:13 -08001#!/bin/sh
2
3#set -e
4#set -x
5
6LEN=${1}
7PACKET=${2}
8TIME=${3}
9TEST_CASE="Bandwidth"
10
11lava-wait server-ready
12server_ip=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2)
13opts="-c ${server_ip} -l ${LEN} -t ${TIME}"
14[ "${PACKET}" = "UDP" ] && opts="${opts} -u"
15echo "iperf client:"
16echo "Running iperf ${opts}"
17iperf ${opts} 2>&1 | tee result.log
18echo -n "${TEST_CASE}: "
19grep "^\[" result.log | tail -n 1 | awk '{print $7 " " $8 " pass"}'
20lava-test-case iperf-client --shell [ -z "`grep "Connection refused" result.log`" ] && true || false
21lava-test-case-attach iperf-client result.log
22lava-send client-done
23