Re: [Piglit] [PATCH] framework/programs/run.py: Allow comments in test-list files.
Pushed :) Quoting Petri Latvala (2017-02-02 01:24:56) > On 02/01/2017 08:36 PM, Dylan Baker wrote: > > This look good, thanks for making the changes. Do you have push access or > > should > > I push this for you? > > > > Reviewed-by: Dylan Baker> > > > > > I don't think I have access. If you'd be so kind? > > > -- > Petri Latvala > signature.asc Description: signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] framework/programs/run.py: Allow comments in test-list files.
On 02/01/2017 08:36 PM, Dylan Baker wrote: This look good, thanks for making the changes. Do you have push access or should I push this for you? Reviewed-by: Dylan BakerI don't think I have access. If you'd be so kind? -- Petri Latvala ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] framework/programs/run.py: Allow comments in test-list files.
This look good, thanks for making the changes. Do you have push access or should I push this for you? Reviewed-by: Dylan BakerQuoting 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 > Signed-off-by: Petri Latvala > --- > > 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 > signature.asc Description: signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] framework/programs/run.py: Allow comments in test-list files.
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 BakerSigned-off-by: Petri Latvala --- 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 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] framework/programs/run.py: Allow comments in test-list files.
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> --- > > 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 > Piglit@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/piglit signature.asc Description: signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] framework/programs/run.py: Allow comments in test-list files.
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--- 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)) results.time_elapsed.start = time.time() # Set the dmesg type -- 2.9.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit