[Piglit] [PATCH] framework/programs/run.py: Allow comments in test-list files.
Dylan Baker
dylan at pnwbakers.com
Wed Feb 1 18:36:06 UTC 2017
This look good, thanks for making the changes. Do you have push access or should
I push this for you?
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Quoting Petri Latvala (2017-02-01 02:57:45)
> IGT testing in Intel's CI is using static lists of tests to
> run. Commenting out tests and annotating them will help
> human-readability.
>
> v2: Use comprehensions (Dylan)
>
> CC: Dylan Baker <dylan at pnwbakers.com>
> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
> ---
>
> Here's a version with comprehensions. Tested and verified locally.
>
>
> framework/programs/run.py | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/framework/programs/run.py b/framework/programs/run.py
> index 177bd53..508bc05 100644
> --- a/framework/programs/run.py
> +++ b/framework/programs/run.py
> @@ -317,8 +317,9 @@ def run(input_):
> 'Unable to force a test list with more than one profile')
>
> with open(args.test_list) as test_list:
> - # Strip newlines
> - forced_test_list = [t.strip() for t in test_list]
> + # Strip newlines and comments, ignore empty lines
> + stripped = (t.split('#')[0].strip() for t in test_list)
> + forced_test_list = [t for t in stripped if t]
>
> backend = backends.get_backend(args.backend)(
> args.results_path,
> --
> 2.9.3
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20170201/750ab698/attachment.sig>
More information about the Piglit
mailing list