From f4f7104e942988e6cf294c3ad80d1a96dc051aaa Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Mon, 3 Apr 2017 23:46:51 -0700 Subject: cyclictest: use raw strings to escape \[8 Change-Id: I36d93eacab2470f90af5653104ad5c07853411bf Signed-off-by: Ross Brattain (cherry picked from commit 4a16c5c592f48953d0b6678376f540b54135d51c) --- yardstick/benchmark/scenarios/networking/pktgen_dpdk.py | 10 ++++++---- 1 file 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: -- cgit 1.2.3-korg