diff options
author | Rod Smith <rod.smith@canonical.com> | 2015-07-16 09:20:11 -0400 |
---|---|---|
committer | Rod Smith <rod.smith@canonical.com> | 2015-07-16 09:20:11 -0400 |
commit | 4bc47f5fa549a77b7557dd97379f3cae5c8929d9 (patch) | |
tree | 93166b1d3e10bb492e82b4741d51a29086dceab9 | |
parent | e20293c99159980d899fa823d58c4cb1795db88c (diff) |
Modified network script to support multiple tests per run (the default remains one test), and server's multi_nic test to run four tests.
-rwxr-xr-x | bin/network | 9 | ||||
-rw-r--r-- | jobs/ethernet.txt.in | 2 |
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 |