From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3952DA0540; Mon, 20 Jul 2020 09:10:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 01ECB1BEDC; Mon, 20 Jul 2020 09:10:58 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 813A41BED1 for ; Mon, 20 Jul 2020 09:10:55 +0200 (CEST) IronPort-SDR: BI+AvCWcvKr6gYDbfZ8WM/mgQZQoTH2OXnlEGSXSRWDvQ5HpsFDx1X+D3yVlb0R/cKiQtL0PDG Z0ly8FyTywrA== X-IronPort-AV: E=McAfee;i="6000,8403,9687"; a="147820681" X-IronPort-AV: E=Sophos;i="5.75,374,1589266800"; d="scan'208";a="147820681" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2020 00:10:54 -0700 IronPort-SDR: zXbF6SCKUQPna9hTRGHyLiSIeebQjGpDKqejggOitmEJKJxHwRGphPm0aWQyEKbOjHZrBjGh6K C8WVOSjgDqlQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,374,1589266800"; d="scan'208";a="287464447" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 20 Jul 2020 00:10:54 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Jul 2020 00:10:53 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Jul 2020 00:10:53 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.22]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.250]) with mapi id 14.03.0439.000; Mon, 20 Jul 2020 15:10:50 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Chen, Zhaoyan" , "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] framework: add support config test case in execution.cfg Thread-Index: AQHWVd9WF3210y6ST0udnSb33tZta6kQHgYw Date: Mon, 20 Jul 2020 07:10:50 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC8228A@SHSMSX101.ccr.corp.intel.com> References: <1594264951-3502-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1594264951-3502-1-git-send-email-lihongx.ma@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: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] framework: add support config test case in execution.cfg 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts On Behalf Of lihong > Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B9=1B$BF|=1B(B 11:23 > To: dts@dpdk.org > Cc: Chen, Zhaoyan ; Ma, LihongX > > Subject: [dts] [PATCH V1] framework: add support config test case in > execution.cfg >=20 > can config which test_case you want to run in file execution.cfg, the for= mat is: > suite_name:test_case_1/test_case_2/test_case_3, >=20 > Signed-off-by: lihong > --- > framework/dts.py | 7 +++++++ > framework/test_case.py | 5 ++++- > 2 files changed, 11 insertions(+), 1 deletion(-) >=20 > diff --git a/framework/dts.py b/framework/dts.py index d6c4fe5..05cc012 > 100644 > --- a/framework/dts.py > +++ b/framework/dts.py > @@ -432,6 +432,12 @@ def dts_run_suite(duts, tester, test_suites, target, > subtitle): > """ > for suite_name in test_suites: > try: > + # check whether config the test cases > + append_requested_case_list =3D None > + if ':' in suite_name: > + case_list =3D suite_name[suite_name.find(':')+1:] > + append_requested_case_list =3D case_list.split('\\') > + suite_name =3D suite_name[:suite_name.find(':')] > result.test_suite =3D suite_name > suite_module =3D __import__('TestSuite_' + suite_name) > for test_classname, test_class in get_subclasses(suite_modul= e, TestCase): > @@ -439,6 +445,7 @@ def dts_run_suite(duts, tester, test_suites, target, > subtitle): > suite_obj =3D test_class(duts, tester, target, suite_nam= e) > suite_obj.init_log() > suite_obj.set_requested_cases(requested_tests) > + > + suite_obj.set_requested_cases(append_requested_case_list) > suite_obj.set_check_inst(check=3Dcheck_case_inst) > suite_obj.set_subtitle(subtitle) > result.nic =3D suite_obj.nic diff --git a/framework/test= _case.py > b/framework/test_case.py index 282c96d..110dafb 100644 > --- a/framework/test_case.py > +++ b/framework/test_case.py > @@ -221,7 +221,10 @@ class TestCase(object): > """ > Pass down input cases list for check > """ > - self._requested_tests =3D case_list > + if self._requested_tests is None: > + self._requested_tests =3D case_list > + elif case_list is not None: > + self._requested_tests +=3D case_list >=20 > def set_subtitle(self, subtitle): > """ > -- > 2.7.4