[Piglit] [PATCH] framework/programs/run.py: Allow comments in test-list files.
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
> 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('#').strip() for t in test_list)
> + forced_test_list = [t for t in stripped if t]
> backend = backends.get_backend(args.backend)(
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 488 bytes
More information about the Piglit