From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4A084A034E; Fri, 15 Nov 2019 06:51:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 047C32C27; Fri, 15 Nov 2019 06:51:44 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id D76AA2B87 for ; Fri, 15 Nov 2019 06:51:41 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2019 21:51:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,307,1569308400"; d="scan'208";a="217005160" Received: from unknown (HELO dpdk-xiaoqimai-tester.sh.intel.com) ([10.239.250.12]) by orsmga002.jf.intel.com with ESMTP; 14 Nov 2019 21:51:39 -0800 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Fri, 15 Nov 2019 13:51:45 +0800 Message-Id: <1573797105-38656-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1]framework/pmd_output: fix regex to match file_prefix argument X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" testpmd can accept eal parameter file_prefix without equal mark Signed-off-by: Xiao Qimai --- framework/pmd_output.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/pmd_output.py b/framework/pmd_output.py index 03183ce..762f335 100644 --- a/framework/pmd_output.py +++ b/framework/pmd_output.py @@ -110,7 +110,7 @@ class PmdOutput(): :return: """ re_w_pci_str = '\s?-w\\s+.+?:.+?:.+?\\..+?[,.*=\d+]?\s|\s?-w\\s+.+?:.+?\\..+?[,.*=\d+]?\s' - re_file_prefix_str = '--file-prefix=.+?\s' + re_file_prefix_str = '--file-prefix[=\s+].+\s' re_b_pci_str = '\s?-b\\s+.+?:.+?:.+?\\..+?[,.*=\d+]?\s|\s?-b\\s+.+?:.+?\\..+?[,.*=\d+]?\s' eal_param = eal_param + ' ' # pci_str_list eg: ['-w 0000:1a:00.0 ', '-w 0000:1a:00.1,queue-num-per-vf=4 ', '-w 0000:aa:bb.1,queue-num-per-vf=4 '] @@ -139,8 +139,8 @@ class PmdOutput(): file_prefix = '' if file_prefix_str: - tmp = file_prefix_str[0].split('=') - file_prefix = tmp[1].strip() + tmp = re.split('(=|\s+)', file_prefix_str[-1].strip()) + file_prefix = tmp[-1].strip() other_eal_str = re.sub(re_w_pci_str, '', eal_param) other_eal_str = re.sub(re_b_pci_str, '', other_eal_str) -- 2.17.1