[igt-dev] [PATCH i-g-t 7/7] runner: Add help for the --environment flag

Knop, Ryszard ryszard.knop at intel.com
Thu Jun 30 13:57:47 UTC 2022


On Wed, 2022-06-29 at 18:30 +0200, Mauro Carvalho Chehab wrote:
> On Tue, 28 Jun 2022 11:44:35 +0200
> Ryszard Knop <ryszard.knop at intel.com> wrote:
> 
> > Signed-off-by: Ryszard Knop <ryszard.knop at intel.com>
> > ---
> >  runner/settings.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/runner/settings.c b/runner/settings.c
> > index 1926e197..383e641e 100644
> > --- a/runner/settings.c
> > +++ b/runner/settings.c
> > @@ -286,6 +286,10 @@ static const char *usage_str =
> >         "  -b, --blacklist FILENAME\n"
> >         "                        Exclude all test matching to
> > regexes from FILENAME\n"
> >         "                        (can be used more than once)\n"
> > +       "  -e, --environment <KEY or KEY=VALUE>\n"
> > +       "                        Set an environment variable for
> > the test process.\n"
> > +       "                        If only the key is provided, the
> > current value is read\n"
> > +       "                        from the runner's environment (and
> > saved for resumes).\n"
> >         "  -L, --list-all        List all matching subtests instead
> > of running\n"
> >         "  --collect-code-cov    Enables gcov-based collect of code
> > coverage for tests.\n"
> >         "                        Requires --collect-script
> > FILENAME\n"
> 
> Looks good to me, but I would also add support for:
> 
>                 -e 'VAR1=foo, VAR2=bar"
> 
> (see my previous comments)
> 
> Besides adding help, you also need to place unit tests in order to
> check that the new command line parameter is working fine.
> See runner/runner_tests.c.

Will do for v2.

Thanks, Ryszard

> Regards,
> Mauro



More information about the igt-dev mailing list