test suite reviews and discussions
 help / color / mirror / Atom feed
From: Marvin Liu <yong.liu@intel.com>
To: dts@dpdk.org
Cc: Marvin Liu <yong.liu@intel.com>
Subject: [dts] [PATCH v1] framework/checkCase: add host driver check
Date: Fri,  9 Mar 2018 06:35:55 +0800	[thread overview]
Message-ID: <1520548555-112814-1-git-send-email-yong.liu@intel.com> (raw)

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

                 reply	other threads:[~2018-03-08 14:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1520548555-112814-1-git-send-email-yong.liu@intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).