[dts] [PATCH 3/6] framework test_case: add kernel driver variable

Yong Liu yong.liu at intel.com
Wed Feb 3 07:50:14 CET 2016

Add kernel module name in test case module, most times nics in same family
belong to same kernel driver. With this variable, test case can handle
difference between NICs more easily.

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

diff --git a/framework/test_case.py b/framework/test_case.py
index f601381..9ef1c32 100644
--- a/framework/test_case.py
+++ b/framework/test_case.py
@@ -53,6 +53,7 @@ class TestCase(object):
             self.nic = self.nics[0]
             self.nic = ''
+        self.kdriver = self.get_nic_driver(self.nic)
     def set_up_all(self):
@@ -74,7 +75,7 @@ class TestCase(object):
         if nic_name in DRIVERS.keys():
             return DRIVERS[nic_name]
-        raise ValueError(nic_name)
+        return "Unknown"
     def get_nic_name(self, pci_id):
         for nic_name, pci in NICS.items():

More information about the dts mailing list