From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 605098DB5 for ; Wed, 23 Sep 2015 08:40:48 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 22 Sep 2015 23:40:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,577,1437462000"; d="scan'208";a="811112682" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 22 Sep 2015 23:40:46 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t8N6eiJ3020860; Wed, 23 Sep 2015 14:40:44 +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 t8N6eg6W017345; Wed, 23 Sep 2015 14:40:44 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t8N6efm2017341; Wed, 23 Sep 2015 14:40:41 +0800 From: Yong Liu To: dts@dpdk.org Date: Wed, 23 Sep 2015 14:40:34 +0800 Message-Id: <1442990434-17295-3-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1442990434-17295-1-git-send-email-yong.liu@intel.com> References: <1442990434-17295-1-git-send-email-yong.liu@intel.com> Subject: [dts] [PATCH 3/3] Framework: enable test case support check 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: Wed, 23 Sep 2015 06:40:48 -0000 From: Marvin Liu Before running each case, need to check whether this case should be skippped. Then check whether testing enviornment support this case. Otherwise should be skipped. Signed-off-by: Marvin Liu diff --git a/framework/dts.py b/framework/dts.py index d2ee015..30c39ab 100644 --- a/framework/dts.py +++ b/framework/dts.py @@ -291,8 +291,6 @@ 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: @@ -405,11 +403,13 @@ def run_all(config_file, pkgName, git, patch, skip_setup, global Patches global scenario global check_case_inst + global support_case_inst # save global variable Package = pkgName Patches = patch check_case = parse_file() check_case.set_filter_case() + check_case.set_support_case() # prepare the output folder if output_dir == '': output_dir = FOLDERS['Output'] @@ -487,6 +487,8 @@ def run_all(config_file, pkgName, git, patch, skip_setup, dts_crbs_init(crbInst, skip_setup, read_cache, project, base_dir, nics, virttype) check_case_inst = check_case_skip(dut) + support_case_inst = check_case_support(dut) + # Run DUT prerequisites if dts_run_prerequisties(pkgName, patch) is False: dts_crbs_exit() @@ -601,11 +603,18 @@ def execute_test_case(test_suite, test_case): 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 + log_handler.info('Test Case %s Result SKIPED:' % test_case.__name__) + rst.write_result("N/A") + result.test_case_skip(check_case_inst.comments) + save_all_results() + return + + if not support_case_inst.case_support(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(support_case_inst.comments) + save_all_results() + return if performance_only: rst.write_annex_title("Annex: " + test_case.__name__) -- 1.9.3