[PATCH 2/2] Add a message to run 'pytest' to run rest of test suite.

Chris Johns chrisj at rtems.org
Sun Mar 15 22:20:17 UTC 2020


On 14/3/20 8:35 am, Amar Takhar wrote:
> Also check for 'pytest' during configure if not installed print a warning
> about installing it to run new test suite.

Is pytest installed by default?

> ---
>  wscript | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/wscript b/wscript
> index bd7c54d..79ab78e 100644
> --- a/wscript
> +++ b/wscript
> @@ -104,6 +104,8 @@ def configure(ctx):
>      ctx.find_program('python', mandatory = False)
>      ctx.find_program('python2', mandatory = False)
>      ctx.find_program('python3', mandatory = False)
> +    ctx.find_program('pytest', mandatory = False)
> +
>      #
>      # Installing the PYO,PYC seems broken on 1.8.19. The path is wrong.
>      #
> @@ -186,3 +188,10 @@ def rtemstoolkit_tests(ctx):
>                      ctx.end_msg('fail', color = 'RED')
>      if failures:
>          ctx.fatal('Test failures')
> +
> +    from waflib.Logs import pprint
> +
> +    if not ctx.env.PYTEST:
> +        pprint("RED", "'pytest' binary not located during configure please install to run new test suite")
> +    else:
> +        pprint("RED", "Remember to run 'pytest' to run the new test suite!")

I do not think we need these message. The only people who build the tools by
hand are developers working with the code and they should know to run the test
suite if they touch the python code. Everybody else get the tools via the RSB
with a tools build.

Chris


More information about the devel mailing list