cyclictest: use raw strings to escape \[8 39/34239/1
authorRoss Brattain <ross.b.brattain@intel.com>
Tue, 4 Apr 2017 06:46:51 +0000 (23:46 -0700)
committerJing Lu <lvjing5@huawei.com>
Thu, 4 May 2017 12:33:13 +0000 (12:33 +0000)
Change-Id: I36d93eacab2470f90af5653104ad5c07853411bf
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
(cherry picked from commit 4a16c5c592f48953d0b6678376f540b54135d51c)

yardstick/benchmark/scenarios/networking/pktgen_dpdk.py

index 0b70629..7e3044d 100644 (file)
@@ -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: