summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-04-03 23:46:51 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-04-06 00:15:22 -0700
commit4a16c5c592f48953d0b6678376f540b54135d51c (patch)
treefc8f086011adfcb7a294d118dcd34e151dc17bac
parentd2cb7ce7331d8da4c3b5b70b09dac49cf65d1710 (diff)
cyclictest: use raw strings to escape \[8
Change-Id: I36d93eacab2470f90af5653104ad5c07853411bf Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
-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: