[igt-dev] [PATCH i-g-t 0/2] run-tests.sh improvements

Arkadiusz Hiler arkadiusz.hiler at intel.com
Tue Mar 13 11:56:21 UTC 2018


On Tue, Feb 27, 2018 at 12:13:21PM -0800, Lucas De Marchi wrote:
> On Tue, Feb 27, 2018 at 06:46:59AM -0300, Latvala, Petri wrote:
> > 
> > 
> > On 02/26/2018 08:50 PM, Lucas De Marchi wrote:
> > > This is what I need to call run-tests.sh while using meson build system.
> > > I was also integrating it into meson so we don't need to set
> > > IGT_TEST_ROOT before running, but I got confused on what's the plan for
> > > it since there's already a `ninja -C build test` command that could be
> > > used.
> > 
> > ninja -C build test   runs the IGT selfchecks in lib/tests. It's not for 
> > running the kernel tests in ./tests.
> 
> Thanks. But reading tests/meson.build it seems it's doing something more
> like checking --help/--invalid-option/--list-subtests etc from the
> tests/ programs.  But this already clarifies my confusion earlier.
> 
> 
> So I think we need to adapt scripts/run-tests.sh to better
> handle the case we are building with meson. I can see 2 approaches:
> 
> 1) As part of the build generate a build/[tests|scripts]/run-tests.sh
>    that is basically the same scripts, modified for the current build
> 2) Adapt run-tests.sh so additionally to the root directory it looks for
>    things inside a build directory to automatically set the env vars....
>    and adapt the messages so it doesn't suggest you to run make
> 
> Any of these I think would be incremental to the 2 patches in this
> series. What do you think?

I guess we can assume that build/ is the default meson build directory,
and if it's present - use it.

For anything non-standard (i.e. not mentioned by the README) we can
expect people to take care of setting IGT_TEST_ROOT for themselves.

> And the README could be improved with:
> 
> -----8<-----
> Subject: README: clarify tests and selfchecks with meson
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> 
> diff --git a/README b/README
> index 7cd78e44..82c1cad5 100644
> --- a/README
> +++ b/README
> @@ -177,10 +177,13 @@ $ mkdir build && meson build && cd build && ninja
>  
>  Note that meson insist on separate build directories from the source tree.
>  
> -Running testcases is done with
> +Running selfchecks for lib/tests and tests/ is done with
>  
>  $ cd build && ninja test
>  
> +Note that this doesn't actually run the testcases in tests/: scripts/run-tests.sh
> +should continue to be used for that.
> +
>  Documentation is built using
>  
>  $ cd build && ninja && ninja intel-gpu-tools-doc
> ----8<-----
> 
> I can send this as a separate patches if it looks ok.
> 
> Lucas De Marchi
> 
> > 
> > 
> > 
> > >
> > > Lucas De Marchi (2):
> > >    run-tests.sh: allow to run without sudo
> > >    run-tests.sh: allow relative IGT_TEST_ROOT and IGT_CONFIG_PATH
> > >
> > >   scripts/run-tests.sh | 26 ++++++++++++++++++++------
> > >   1 file changed, 20 insertions(+), 6 deletions(-)
> > >
> > 


More information about the igt-dev mailing list