test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tools: fix issues in dump_case and setup
@ 2016-07-15  6:52 Marvin Liu
  0 siblings, 0 replies; only message in thread
From: Marvin Liu @ 2016-07-15  6:52 UTC (permalink / raw)
  To: dts; +Cc: Marvin Liu

1. Parse domain id in setup tool
2. Add required python system path

Signed-off-by: Marvin Liu <yong.liu@intel.com>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-15  6:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-15  6:52 [dts] [PATCH] tools: fix issues in dump_case and setup Marvin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).