From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D5918275D for ; Fri, 15 Jul 2016 08:52:46 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 14 Jul 2016 23:52:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,366,1464678000"; d="scan'208";a="1017333508" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 14 Jul 2016 23:52:45 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u6F6qhld009483; Fri, 15 Jul 2016 14:52:43 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u6F6qf3W005041; Fri, 15 Jul 2016 14:52:43 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u6F6qfeR005037; Fri, 15 Jul 2016 14:52:41 +0800 From: Marvin Liu To: dts@dpdk.org Cc: Marvin Liu Date: Fri, 15 Jul 2016 14:52:40 +0800 Message-Id: <1468565560-5005-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] tools: fix issues in dump_case and setup 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: , X-List-Received-Date: Fri, 15 Jul 2016 06:52:47 -0000 1. Parse domain id in setup tool 2. Add required python system path Signed-off-by: Marvin Liu diff --git a/tools/dump_case.py b/tools/dump_case.py index cb866fc..7c184a5 100755 --- a/tools/dump_case.py +++ b/tools/dump_case.py @@ -10,9 +10,13 @@ DTS_PATH = exec_file.replace('/tools/dump_case.py', '') DTS_SUITES = DTS_PATH + '/tests' DTS_FRAMEWORK = DTS_PATH + '/framework' +NICS_MODULE = DTS_PATH + '/nics' +DEP_FOLDER = DTS_PATH + '/dep' sys.path.append(DTS_SUITES) sys.path.append(DTS_FRAMEWORK) +sys.path.append(NICS_MODULE) +sys.path.append(DEP_FOLDER) import dts from test_case import TestCase @@ -82,7 +86,7 @@ def load_cases(): for suite in suites: test_module = __import__('TestSuite_' + suite) for classname, test_class in get_subclasses(test_module, TestCase): - test_suite = test_class(dut, None, None, suite) + test_suite = test_class([dut], None, None, suite) func_cases = get_functional_test_cases(test_suite) perf_cases = get_performance_test_cases(test_suite) suite_func_list[suite] = func_cases diff --git a/tools/setup.py b/tools/setup.py index 3d9d8ff..c6a812d 100755 --- a/tools/setup.py +++ b/tools/setup.py @@ -400,7 +400,7 @@ def config_ports(): global dut_ports dut_ports = [] add_more = True - pci_regex = "([\da-f]{2}:[\da-f]{2}.\d{1})$" + pci_regex = "([\da-f]{4}:[\da-f]{2}:[\da-f]{2}.\d{1})$" ixia_regex = r'(\d).(\d)' print ('============================================================') @@ -412,7 +412,7 @@ def config_ports(): while add_more: pci_option = {'prompt': 'DUT port pci address', 'type': 'string', - 'help': 'Please input DUT pci address xx:xx.x', + 'help': 'Please input DUT pci address 0000:xx:xx.x', 'default': ''} opt = Option(**pci_option) dut_addr = opt.parse_input() @@ -434,7 +434,7 @@ def config_ports(): else: pci_option = {'prompt': 'Tester port pci address', 'type': 'string', - 'help': 'Please input tester pci address xx:xx.x', + 'help': 'Please input tester pci address 0000:xx:xx.x', 'default': ''} opt = Option(**pci_option) test_addr = opt.parse_input() -- 1.9.3