test suite reviews and discussions
 help / color / mirror / Atom feed
From: "huilong,xu" <huilongx.xu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH V1 5/5] add check case function in run case module
Date: Fri,  7 Aug 2015 14:03:10 +0800	[thread overview]
Message-ID: <1438927390-855-6-git-send-email-huilongx.xu@intel.com> (raw)
In-Reply-To: <1438927390-855-1-git-send-email-huilongx.xu@intel.com>

From: huilong xu <huilongx.xu@intel.com>


Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
 framework/dts.py |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/framework/dts.py b/framework/dts.py
index e9513c6..cb8f26e 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -57,7 +57,7 @@ from logger import getLogger
 import logger
 import debugger
 from virt_scene import VirtScene
-
+from checkCase import *
 import sys
 reload(sys)
 sys.setdefaultencoding('UTF8')
@@ -291,6 +291,8 @@ def dts_run_target(crbInst, targets, test_suites, nic, scenario):
     """
     Run each target in execution targets.
     """
+    global skip_case_mode
+    skip_case_mode = check_case_skip(dut)
     if scenario != '':
         scene = VirtScene(dut, tester, scenario)
     else:
@@ -299,7 +301,7 @@ def dts_run_target(crbInst, targets, test_suites, nic, scenario):
     if scene:
         scene.load_config()
         scene.create_scene()
-
+    
     for target in targets:
         log_handler.info("\nTARGET " + target)
         result.target = target
@@ -402,11 +404,12 @@ def run_all(config_file, pkgName, git, patch, skip_setup,
     global Package
     global Patches
     global scenario
-
+    global skip_case_mode
     # save global variable
     Package = pkgName
     Patches = patch
-
+    check_case = parse_file()
+    check_case.set_filter_case()
     # prepare the output folder
     if output_dir == '':
         output_dir = FOLDERS['Output']
@@ -459,7 +462,6 @@ def run_all(config_file, pkgName, git, patch, skip_setup,
 
         # verify if the delimiter is good if the lists are vertical
         dutIP, targets, test_suites, nics, scenario = dts_parse_config(section)
-
         log_handler.info("\nDUT " + dutIP)
 
         # look up in crbs - to find the matching IP
@@ -479,6 +481,7 @@ def run_all(config_file, pkgName, git, patch, skip_setup,
         # init dut, tester crb
         dts_crbs_init(crbInst, skip_setup, read_cache, project, base_dir, nics, virttype)
 
+        skip_case_mode = check_case_skip(dut)
         # Run DUT prerequisites
         if dts_run_prerequisties(pkgName, patch) is False:
             dts_crbs_exit()
@@ -576,6 +579,7 @@ def execute_all_test_cases(test_suite):
     """
     if functional_only:
         for test_case in get_functional_test_cases(test_suite):
+            skip_case_mode.case_skip(test_case)
             execute_test_case(test_suite, test_case)
     if performance_only:
         for test_case in get_performance_test_cases(test_suite):
@@ -591,8 +595,13 @@ def execute_test_case(test_suite, test_case):
     global debug_case
     global module
     result.test_case = test_case.__name__
-
     rst.write_title("Test Case: " + test_case.__name__)
+    if skip_case_mode.case_skip(test_case.__name__[len("test_"):]):
+       log_handler.info('Test Case %s Result SKIPED:' % test_case.__name__)
+       rst.write_result("N/A")
+       result.test_case_skip(skip_case_mode.comments)
+       save_all_results()
+       return
     if performance_only:
         rst.write_annex_title("Annex: " + test_case.__name__)
     try:
-- 
1.7.4.4

  parent reply	other threads:[~2015-08-07  6:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07  6:03 [dts] [PATCH V1 0/5] add check case list for skip the case, when the case can't test huilong,xu
2015-08-07  6:03 ` [dts] [PATCH V1 1/5] add check case list huilong,xu
2015-08-07  6:03 ` [dts] [PATCH V1 2/5] add N/A result in test report huilong,xu
2015-08-07  6:03 ` [dts] [PATCH V1 3/5] add case skip result when case running huilong,xu
2015-08-07  6:05   ` Liu, Yong
2015-08-07  6:29     ` Xu, HuilongX
2015-08-07  6:03 ` [dts] [PATCH V1 4/5] add checkCase module huilong,xu
2015-08-07  6:03 ` huilong,xu [this message]
2015-08-07  6:52   ` [dts] [PATCH V1 5/5] add check case function in run case module Liu, Yong
2015-08-07  6:06 ` [dts] [PATCH V1 0/5] add check case list for skip the case, when the case can't test Liu, Yong

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=1438927390-855-6-git-send-email-huilongx.xu@intel.com \
    --to=huilongx.xu@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).