From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Ma, LihongX" <lihongx.ma@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Chen, Zhaoyan" <zhaoyan.chen@intel.com>,
"Ma, LihongX" <lihongx.ma@intel.com>
Subject: Re: [dts] [PATCH V1] framework: add support config test case in execution.cfg
Date: Mon, 20 Jul 2020 07:10:50 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC8228A@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1594264951-3502-1-git-send-email-lihongx.ma@intel.com>
Applied, thanks
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of lihong
> Sent: 2020年7月9日 11:23
> To: dts@dpdk.org
> Cc: Chen, Zhaoyan <zhaoyan.chen@intel.com>; Ma, LihongX
> <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] framework: add support config test case in
> execution.cfg
>
> can config which test_case you want to run in file execution.cfg, the format is:
> suite_name:test_case_1/test_case_2/test_case_3,
>
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
> framework/dts.py | 7 +++++++
> framework/test_case.py | 5 ++++-
> 2 files changed, 11 insertions(+), 1 deletion(-)
>
> 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 = None
> + if ':' in suite_name:
> + case_list = suite_name[suite_name.find(':')+1:]
> + append_requested_case_list = case_list.split('\\')
> + suite_name = suite_name[:suite_name.find(':')]
> result.test_suite = suite_name
> suite_module = __import__('TestSuite_' + suite_name)
> for test_classname, test_class in get_subclasses(suite_module, TestCase):
> @@ -439,6 +445,7 @@ def dts_run_suite(duts, tester, test_suites, target,
> subtitle):
> suite_obj = test_class(duts, tester, target, suite_name)
> 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=check_case_inst)
> suite_obj.set_subtitle(subtitle)
> result.nic = 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 = case_list
> + if self._requested_tests is None:
> + self._requested_tests = case_list
> + elif case_list is not None:
> + self._requested_tests += case_list
>
> def set_subtitle(self, subtitle):
> """
> --
> 2.7.4
prev parent reply other threads:[~2020-07-20 7:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 3:22 lihong
2020-07-20 7:10 ` Tu, Lijuan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8CE3E05A3F976642AAB0F4675D0AD20E0BC8228A@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=lihongx.ma@intel.com \
--cc=zhaoyan.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).