aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-04-10 00:53:12 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-04-10 00:53:12 +0000
commit49844d2d7bf43eda8adda6fc6dd48357b736aa39 (patch)
tree6795e1ccd84be3eb030da01581b2847028c2c56f
parentce4b5b36ffaae02f23b4c560a0b6bf8d7f2dbae0 (diff)
parent4a16c5c592f48953d0b6678376f540b54135d51c (diff)
Merge "cyclictest: use raw strings to escape \[8"
-rw-r--r--yardstick/benchmark/scenarios/networking/pktgen_dpdk.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py b/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py
index 0b70629f8..7e3044dbb 100644
--- a/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py
+++ b/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py
@@ -137,10 +137,12 @@ class PktgenDPDKLatency(base.Scenario):
# wait for finishing test
time.sleep(1)
- cmd = "cat ~/result.log -vT \
- |awk '{match($0,/\[8;40H +[0-9]+/)} \
- {print substr($0,RSTART,RLENGTH)}' \
- |grep -v ^$ |awk '{if ($2 != 0) print $2}'"
+ cmd = r"""\
+cat ~/result.log -vT \
+|awk '{match($0,/\[8;40H +[0-9]+/)} \
+{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: