diff options
author | Miikka Koistinen <miikka.koistinen@nokia.com> | 2018-06-12 16:19:16 +0300 |
---|---|---|
committer | Miikka Koistinen <miikka.koistinen@nokia.com> | 2018-06-19 09:32:22 +0300 |
commit | 66c5efdd1705281abb57dcb14fff502ad125c0c1 (patch) | |
tree | 0b2fe980db993b057c15f2ee522acc85d83afc0c /yardstick/benchmark/scenarios | |
parent | 724e49770c517782e269ccdb2320f4a7eb5d87d5 (diff) |
Refactor remote command execution in pktgen_dpdk
PktgenDPDKLatency.run will raise a RuntimeError if a remote command
fails. This commit makes it use the already existing exception raising
mechanism in yardstick's ssh client.
JIRA: YARDSTICK-1166
Change-Id: I3a3c7691399044b174f5d040c015c9b907b2fe5d
Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
Diffstat (limited to 'yardstick/benchmark/scenarios')
-rw-r--r-- | yardstick/benchmark/scenarios/networking/pktgen_dpdk.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py b/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py index 1b018f52a..efb7d8b5d 100644 --- a/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py +++ b/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py @@ -113,10 +113,7 @@ cat ~/result.log -vT \ {print substr($0,RSTART,RLENGTH)}' \ |grep -v ^$ |awk '{if ($2 != 0) print $2}'\ """ - client_status, client_stdout, client_stderr = self.client.execute(cmd) - - if client_status: - raise RuntimeError(client_stderr) + _, client_stdout, _ = self.client.execute(cmd, raise_on_error=True) avg_latency = 0 if client_stdout: |