[Piglit] [PATCH] Add test-list after resume test

Dylan Baker dylan at pnwbakers.com
Fri Nov 18 20:27:23 UTC 2016


Quoting Rami Ben Hassine (2016-11-18 04:53:41)
> Hello all, 
> 
> Actually piglit don’t use the test-list option if we reboot (for x resons) and want to resume a test , note that is not related to suspend test.

This is not a good commit message. A commit message should explain the change,
and the reason for the change.

Consider something like:

Sometimes we want to resume an interrupted run which was started with
--test-list. Currently piglit does not support --test-list with resume, this
patch adds support for the option to piglit resume.

> 
> ---
>  framework/programs/run.py | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/framework/programs/run.py b/framework/programs/run.py
> index e5d5583..2a11288 100644
> --- a/framework/programs/run.py
> +++ b/framework/programs/run.py
> @@ -228,6 +228,7 @@ def _create_metadata(args, name):
>      opts['concurrent'] = args.concurrency
>      opts['include_filter'] = args.include_tests
>      opts['exclude_filter'] = args.exclude_tests
> +    opts['test_list']= args.test_list

I think it would be better to actually store the processed testlist in the
metadata rather than re-opening and re-reading the list (imagine that the list
was generated by another script), and then pass that into _create_metadata
instaed of using args.test_list. That would mean that resume wouldn't need to be
passed --test-list at all, it would just automatically resume.

One of the promises of piglit resume is that it doesn't change anything about
how the run was started, so I think we should store the test_list and resume it.

>      opts['dmesg'] = args.dmesg
>      opts['monitoring'] = args.monitored
>      if args.platform:
> @@ -423,6 +424,12 @@ def resume(input_):
>          if results.options['include_filter']:
>              p.filters.append(
>                  profile.RegexFilter(results.options['include_filter']))
> +        # If a test list is provided then set the forced_test_list value.
> +        if results.options['test_list']:
> +           with open(results.options['test_list']) as test_list:
> +            # Strip newlines

The indentation on this comment looks wrong

> +               profiles[0].forced_test_list = [t.strip() for t in test_list]
> +
>  
>      # This is resumed, don't bother with time since it won't be accurate anyway
>      profile.run(
> -- 
> 2.7.4
> 
> ---------------------------------------------------------------------
> Intel Corporation SAS (French simplified joint stock company)
> Registered headquarters: "Les Montalets"- 2, rue de Paris, 
> 92196 Meudon Cedex, France
> Registration Number:  302 456 199 R.C.S. NANTERRE
> Capital: 4,572,000 Euros
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20161118/61aab80e/attachment.sig>


More information about the Piglit mailing list