From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9FC132716 for ; Fri, 7 Aug 2015 08:52:47 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 06 Aug 2015 23:52:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,628,1432623600"; d="scan'208";a="778670491" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by fmsmga002.fm.intel.com with ESMTP; 06 Aug 2015 23:52:44 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 7 Aug 2015 14:52:42 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.38]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.143]) with mapi id 14.03.0224.002; Fri, 7 Aug 2015 14:52:41 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1 5/5] add check case function in run case module Thread-Index: AQHQ0NbXinYYiYVi/0GkG8Hz2sK+o54AEokQ Date: Fri, 7 Aug 2015 06:52:40 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10EB68E7@SHSMSX103.ccr.corp.intel.com> References: <1438927390-855-1-git-send-email-huilongx.xu@intel.com> <1438927390-855-6-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1438927390-855-6-git-send-email-huilongx.xu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1 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 06:52:48 -0000 One question about skip_case_mode.case_skip. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilong,xu > Sent: Friday, August 07, 2015 2:03 PM > To: dts@dpdk.org > Subject: [dts] [PATCH V1 5/5] add check case function in run case module >=20 > From: huilong xu >=20 >=20 > Signed-off-by: huilong xu > --- > framework/dts.py | 21 +++++++++++++++------ > 1 files changed, 15 insertions(+), 6 deletions(-) >=20 > 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 =3D check_case_skip(dut) > if scenario !=3D '': > scene =3D 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 =3D 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 =3D pkgName > Patches =3D patch > - > + check_case =3D parse_file() > + check_case.set_filter_case() > # prepare the output folder > if output_dir =3D=3D '': > output_dir =3D FOLDERS['Output'] > @@ -459,7 +462,6 @@ def run_all(config_file, pkgName, git, patch, > skip_setup, >=20 > # verify if the delimiter is good if the lists are vertical > dutIP, targets, test_suites, nics, scenario =3D > dts_parse_config(section) > - > log_handler.info("\nDUT " + dutIP) >=20 > # 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) >=20 > + skip_case_mode =3D 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) Why call this function here? In function execute_test_case also check wheth= er 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 =3D 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