From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 24BCC968 for ; Fri, 23 Jun 2017 18:42:29 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 23 Jun 2017 09:42:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,379,1493708400"; d="scan'208";a="871107151" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 23 Jun 2017 09:42:24 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 23 Jun 2017 09:42:24 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.56]) with mapi id 14.03.0319.002; Sat, 24 Jun 2017 00:42:20 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" CC: "Xu, HuilongX" Thread-Topic: [dts] [PATCH V1 1/3] add re_run parameter Thread-Index: AQHS6+VTJG1iUaoZDEaqUkgtzbq0OKIypuTg Date: Fri, 23 Jun 2017 16:42:20 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62E0D32B@SHSMSX103.ccr.corp.intel.com> References: <1498197394-16220-1-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1498197394-16220-1-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: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action 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 1/3] add re_run parameter 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, 23 Jun 2017 16:42:30 -0000 Huilong, Rerun is not supposed to be the default action for failed cases. The defaul= t value for rerun times should be zero,=20 > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong > Sent: Thursday, June 22, 2017 10:57 PM > To: dts@dpdk.org > Cc: Xu, HuilongX > Subject: [dts] [PATCH V1 1/3] add re_run parameter >=20 > add a new re_run parameter for failed case re run time. the default value > is 1. >=20 > Signed-off-by: xu,huilong > --- > framework/dts.py | 7 +++++-- > framework/main.py | 5 ++++- > 2 files changed, 9 insertions(+), 3 deletions(-) >=20 > diff --git a/framework/dts.py b/framework/dts.py > index 369599d..48be694 100644 > --- a/framework/dts.py > +++ b/framework/dts.py > @@ -424,7 +424,7 @@ def dts_run_suite(duts, tester, test_suites, target): > def run_all(config_file, pkgName, git, patch, skip_setup, > read_cache, project, suite_dir, test_cases, > base_dir, output_dir, verbose, virttype, debug, > - debugcase, commands): > + debugcase, re_run, commands): > """ > Main process of DTS, it will run all test suites in the config file. > """ > @@ -465,6 +465,9 @@ def run_all(config_file, pkgName, git, patch, > skip_setup, > if verbose is True: > logger.set_verbose() >=20 > + if re_run < 1: > + re_run =3D 1 > + > logger.log_dir =3D output_dir > log_handler =3D getLogger('dts') > log_handler.config_execution('dts') > @@ -520,7 +523,7 @@ def run_all(config_file, pkgName, git, patch, > skip_setup, >=20 > # init dut, tester crb > duts, tester =3D dts_crbs_init(crbInsts, skip_setup, read_cache, > project, base_dir, serializer, virttype) > - > + tester.set_re_run(re_run) > # register exit action > atexit.register(quit_execution, duts, tester) >=20 > diff --git a/framework/main.py b/framework/main.py > index a018af0..de9d54f 100755 > --- a/framework/main.py > +++ b/framework/main.py > @@ -134,6 +134,9 @@ parser.add_argument('--debug', > parser.add_argument('--debugcase', > action=3D'store_true', > help=3D'enable debug mode in the first case, user ca= n > further debug') > +parser.add_argument('--re_run', > + default=3D1, > + help=3D'when case failed will re-run times, and this > value must >=3D 1') >=20 Suggest add "type=3Dint" in re-run argument definition.=20 > parser.add_argument('--commands', > action=3D'append', > @@ -156,4 +159,4 @@ dts.run_all(args.config_file, args.snapshot, args.git= , > args.patch, args.skip_setup, args.read_cache, > args.project, args.suite_dir, args.test_cases, > args.dir, args.output, args.verbose,args.virttype, > - args.debug, args.debugcase, args.commands) > + args.debug, args.debugcase, args.re_run, args.commands) > -- > 1.9.3