[Piglit] [PATCH] run.py: add an option to load a test list from a file

Dylan Baker baker.dylan.c at gmail.com
Tue Jan 6 09:07:17 PST 2015


I haven't tested this, but it looks fine to me.

Acked-by: Dylan Baker <dylanx.c.baker at intel.com>

On Friday, November 28, 2014 04:02:38 PM Thomas Wood wrote:
> Signed-off-by: Thomas Wood <thomas.wood at intel.com>
> ---
>  framework/programs/run.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/framework/programs/run.py b/framework/programs/run.py
> index ac96d2e..89ccd11 100644
> --- a/framework/programs/run.py
> +++ b/framework/programs/run.py
> @@ -180,6 +180,8 @@ def _run_parser(input_):
>                              choices=['quiet', 'verbose', 'dummy'],
>                              default='quiet',
>                              help="Set the logger verbosity level")
> +    parser.add_argument("--test-list",
> +                        help="A file containing a list of tests to run")
>      parser.add_argument("test_profile",
>                          metavar="<Path to one or more test profile(s)>",
>                          nargs='+',
> @@ -242,6 +244,12 @@ def run(input_):
>      if args.dmesg:
>          args.concurrency = "none"
>  
> +    # build up the include filter based on test_list
> +    if args.test_list:
> +        with open(args.test_list) as test_list:
> +            for line in test_list.readlines():
> +                args.include_tests.append(line.rstrip())
> +
>      # Pass arguments into Options
>      opts = core.Options(concurrent=args.concurrency,
>                          exclude_filter=args.exclude_tests,
> -- 
> 2.1.0
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150106/868b52ef/attachment.sig>


More information about the Piglit mailing list