summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-04-03 23:46:51 -0700
committerJing Lu <lvjing5@huawei.com>2017-05-04 12:33:13 +0000
commitf4f7104e942988e6cf294c3ad80d1a96dc051aaa (patch)
treecbcc984b9fef2a202382c343a107d98e5ba780dd
parentfa463f7e2afc9dba9d9af5ac6a5bd7dd2630d17c (diff)
cyclictest: use raw strings to escape \[8
Change-Id: I36d93eacab2470f90af5653104ad5c07853411bf Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> (cherry picked from commit 4a16c5c592f48953d0b6678376f540b54135d51c)
-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: