test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH v1] framework/checkCase: add host driver check
@ 2018-03-08 22:35 Marvin Liu
  0 siblings, 0 replies; only message in thread
From: Marvin Liu @ 2018-03-08 22:35 UTC (permalink / raw)
  To: dts; +Cc: Marvin Liu

Some cases may have dependency on host driver. So add function which can
check host driver name.

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

diff --git a/framework/checkCase.py b/framework/checkCase.py
index 3debc18..62f2643 100644
--- a/framework/checkCase.py
+++ b/framework/checkCase.py
@@ -2,7 +2,7 @@ import xlrd
 import collections
 import json
 
-from settings import get_nic_name
+from settings import get_nic_name, load_global_setting, HOST_DRIVER_SETTING
 from utils import RED
 
 filter_json_file = './conf/test_case_checklist.json'
@@ -65,6 +65,15 @@ class CheckCase(object):
         else:
             return False
 
+    def _check_host_driver(self, drivers):
+        host_driver = load_global_setting(HOST_DRIVER_SETTING)
+        if 'all' == drivers[0].lower():
+            return True
+        if host_driver in drivers:
+            return True
+        else:
+            return False
+
     def case_skip(self, case_name):
         """
         Check whether test case and DUT match skip criteria
-- 
1.9.3

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

only message in thread, other threads:[~2018-03-08 14:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-08 22:35 [dts] [PATCH v1] framework/checkCase: add host driver check 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).