From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 62C7D5954 for ; Fri, 7 Aug 2015 09:45:16 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 07 Aug 2015 00:45:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,628,1432623600"; d="scan'208";a="537604982" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 07 Aug 2015 00:45:14 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t777jCpD032165; Fri, 7 Aug 2015 15:45:12 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t777jATs001844; Fri, 7 Aug 2015 15:45:12 +0800 Received: (from huilongx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t777jAoL001840; Fri, 7 Aug 2015 15:45:10 +0800 From: "huilong,xu" To: dts@dpdk.org Date: Fri, 7 Aug 2015 15:44:57 +0800 Message-Id: <1438933497-1741-6-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1438933497-1741-1-git-send-email-huilongx.xu@intel.com> References: <1438933497-1741-1-git-send-email-huilongx.xu@intel.com> Subject: [dts] [PATCH V2 5/5] add check case function in run case module X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2015 07:45:16 -0000 From: huilong xu Signed-off-by: huilong xu diff --git a/framework/dts.py b/framework/dts.py index e9513c6..613926c 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 check_case_inst # 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) + check_case_inst = check_case_skip(dut) # Run DUT prerequisites if dts_run_prerequisties(pkgName, patch) is False: dts_crbs_exit() @@ -591,8 +594,14 @@ 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 check_case_inst.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