summaryrefslogtreecommitdiff
diff options
-rwxr-xr-xbin/network9
-rw-r--r--jobs/ethernet.txt.in2
2 files changed, 9 insertions, 2 deletions
diff --git a/bin/network b/bin/network
index daef596..24dd3a5 100755
--- a/bin/network
+++ b/bin/network
@@ -393,7 +393,10 @@ def interface_test(args):
args.fail_threshold)
if args.datasize:
iperf_benchmark.data_size = args.datasize
- result = iperf_benchmark.run()
+ run_num = 0
+ while not result and run_num < args.num_runs:
+ result = iperf_benchmark.run()
+ run_num += 1
elif args.test_type.lower() == "stress":
stress_benchmark = StressPerformanceTest(args.interface,
@@ -517,6 +520,10 @@ TEST_TARGET_IPERF = iperf-server.example.com
"theoretical bandwidth) as a number like 80. (Default is "
"%(default)s)"))
test_parser.add_argument(
+ '--num_runs', type=int,
+ default=1,
+ help=("Number of times to run the test. (Default is %(default)s)"))
+ test_parser.add_argument(
'--debug', default=False, action="store_true",
help="Turn on verbose output")
diff --git a/jobs/ethernet.txt.in b/jobs/ethernet.txt.in
index eb857aa..9c0f8f7 100644
--- a/jobs/ethernet.txt.in
+++ b/jobs/ethernet.txt.in
@@ -47,7 +47,7 @@ command:
device.path == "$1"
user: root
environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS
- command: network test -i $2 -t iperf --fail-threshold 80 --datasize 200
+ command: network test -i $2 -t iperf --fail-threshold 80 --datasize 200 --num_runs 4
estimated_duration: 1850.0
description:
Testing for NIC $2