From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 631C61C0B for ; Fri, 23 Jun 2017 07:55:14 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 22 Jun 2017 22:55:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,376,1493708400"; d="scan'208";a="1144077161" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga001.jf.intel.com with ESMTP; 22 Jun 2017 22:55:13 -0700 From: "xu,huilong" To: dts@dpdk.org Cc: "xu,huilong" Date: Fri, 23 Jun 2017 13:56:32 +0800 Message-Id: <1498197394-16220-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [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 05:55:15 -0000 add a new re_run parameter for failed case re run time. the default value is 1. Signed-off-by: xu,huilong --- framework/dts.py | 7 +++++-- framework/main.py | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) 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() + if re_run < 1: + re_run = 1 + logger.log_dir = output_dir log_handler = getLogger('dts') log_handler.config_execution('dts') @@ -520,7 +523,7 @@ def run_all(config_file, pkgName, git, patch, skip_setup, # init dut, tester crb duts, tester = 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) 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='store_true', help='enable debug mode in the first case, user can further debug') +parser.add_argument('--re_run', + default=1, + help='when case failed will re-run times, and this value must >= 1') parser.add_argument('--commands', action='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