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

Mauro Carvalho Chehab mauro.chehab at linux.intel.com
Wed Jun 29 16:30:33 UTC 2022


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.

Regards,
Mauro


More information about the igt-dev mailing list