From: Luca Vizzarro <Luca.Vizzarro@arm.com>
To: Dean Marx <dmarx@iol.unh.edu>
Cc: dev@dpdk.org, Paul Szczepanek <paul.szczepanek@arm.com>,
Patrick Robb <probb@iol.unh.edu>
Subject: Re: [PATCH v3 3/4] dts: add per-test-suite configuration
Date: Thu, 14 Nov 2024 12:39:27 +0000 [thread overview]
Message-ID: <48bf44a8-d483-4022-bebf-b90d50c7c5a3@arm.com> (raw)
In-Reply-To: <CABD7UXOtVOtCbhXtPq5OXbuvcP5RjFR1OVMdcoBDKt0+qwuh=w@mail.gmail.com>
Hi Dean!
Thank you for your review!
On 13/11/2024 21:44, Dean Marx wrote:
> I like the idea of mapping the suite to specific test cases, and for
> the most part the custom configuration option as well. The only
> thing that I feel should be different is the way the code generation
> is documented, I think it might be worth providing an example within
> conf.yaml through a comment near the suites section, rather than
> just in the dts.rst file. It might be a little more clear where to
> create the custom config class as well.
So... this is a weird one. I've integrated the code generation under
dts-check-format.sh, so nobody should really worry about it, as that
should be run before submitting. If it's not, then the CI will
eventually pick it up when dts-check-format will be in place.
>> +class HelloWorldConfig(TestSuiteConfig):
>> + """Example custom configuration for the `TestHelloWorld`
>> test suite."""
>> +
>> + #: Timeout for the DPDK apps.
>> + timeout: int = 50
>> --
>> 2.43.0
>
> Additionally, I was a bit confused by the custom config examples, do
> these fields (timeout, my_custom_field) actually affect the suite in
> any way as of this patch? Or is this just so that we can potentially
> add configuration options through this method in the future?
The hello_world suite doesn't really need this, I've just added it as an
example. But yes test suites are affected. If you see the hello_world
suite, it calls `self.config.timeout` which is a reference to this
field. This class specifically is now wholly integrated in the
configuration:
test_runs:
- test_suites:
hello_world: # this is a mapping to HelloWorldConfig
# like before the behavior of this field is:
# - if unset or empty list, all test cases are run
# - if individual test cases are listed, those are run
test_cases: [single_core] # field inherited from TestSuiteConfig
timeout: 20 # optional field from HelloWorldConfig
What I've added for the simplicity is to be able to represent any
TestSuiteConfig as a string instead of a mapping:
test_runs:
- test_suites:
hello_world: all # special keyword which enables all test cases
# or
hello_world: single_core all_cores # a whitespace-delimited list
of test suites
Mind that if the underlying test suite configuration has a mandatory
field that has no default, then the string representation will fail and
Pydantic will complain that the (required) field is missing.
Please let me know if I answered every query, and don't hesitate to ask
for further clarifications.
Best,
Luca
next prev parent reply other threads:[~2024-11-14 12:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 16:13 [PATCH] " Luca Vizzarro
2024-09-27 17:45 ` Jeremy Spewock
2024-11-08 13:38 ` [PATCH v2 0/4] " Luca Vizzarro
2024-11-08 13:38 ` [PATCH v2 1/4] dts: add tests package to API docs Luca Vizzarro
2024-11-08 13:38 ` [PATCH v2 2/4] dts: fix smoke tests docstring Luca Vizzarro
2024-11-12 20:03 ` Dean Marx
2024-11-08 13:38 ` [PATCH v2 3/4] dts: add per-test-suite configuration Luca Vizzarro
2024-11-08 13:38 ` [PATCH v2 4/4] dts: update autodoc sorting order Luca Vizzarro
2024-11-08 13:45 ` [PATCH v3 0/4] dts: add per-test-suite configuration Luca Vizzarro
2024-11-08 13:45 ` [PATCH v3 1/4] dts: add tests package to API docs Luca Vizzarro
2024-11-12 19:55 ` Dean Marx
2024-11-08 13:45 ` [PATCH v3 2/4] dts: fix smoke tests docstring Luca Vizzarro
2024-11-08 13:45 ` [PATCH v3 3/4] dts: add per-test-suite configuration Luca Vizzarro
2024-11-13 21:44 ` Dean Marx
2024-11-14 12:39 ` Luca Vizzarro [this message]
2024-11-08 13:45 ` [PATCH v3 4/4] dts: update autodoc sorting order Luca Vizzarro
2024-11-12 20:04 ` Dean Marx
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=48bf44a8-d483-4022-bebf-b90d50c7c5a3@arm.com \
--to=luca.vizzarro@arm.com \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
/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).