Quoting Petri Latvala (2016-10-17 02:52:36) > IGT testing in Intel's CI is using a static list of tests to > run. Commenting out tests and annotating them will help > human-readability. > > Signed-off-by: Petri Latvala <[email protected]> > --- > > Possible duplicate, I didn't see this arrive on the mailing list myself > > 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 ecfc36f..7921816 100644 > --- a/framework/programs/run.py > +++ b/framework/programs/run.py > @@ -325,8 +325,9 @@ def run(input_): > # If a test list is provided then set the forced_test_list value. > if args.test_list: > with open(args.test_list) as test_list: > - # Strip newlines > - profile.forced_test_list = 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] > + profile.forced_test_list = list(filter(None, stripped))
We don't use map or filter in piglit, we use comprehensions, This also creates a
concrete list for stripped, it would be better to use a generator for that.
I think you could implement this in our style as something like this (I say
think because this isn't tested):
stripped = (t.split('#')[0].strip() for t in test_list)
profile.forced_test_list = [x for x in stripped if x]
Dylan
>
> results.time_elapsed.start = time.time()
> # Set the dmesg type
> --
> 2.9.3
>
> _______________________________________________
> Piglit mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/piglit
signature.asc
Description: signature
_______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
