[Piglit] [PATCH] profile.py: If the test list is empty after being filtered exit

Brian Paul brianp at vmware.com
Mon Nov 3 17:31:44 PST 2014


On 11/03/2014 06:26 PM, Dylan Baker wrote:
> Currently if the test list is empty an assertion will be raised in the
> storage backend, this is a non-obvious message. This patch adds a quick
> check that prints a nice message if there are not tests scheduled to
> run.
>
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>
> Brian, Does this trigger in your case?
>
>   framework/profile.py | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/framework/profile.py b/framework/profile.py
> index 0d00e35..d3aba73 100644
> --- a/framework/profile.py
> +++ b/framework/profile.py
> @@ -149,6 +149,11 @@ class TestProfile(object):
>           self.test_list = dict(item for item in self.test_list.iteritems()
>                                 if check_all(item))
>
> +        if not self.test_list:
> +            print('Error: There are no tests scheduled to run. Aborting run.',
> +                  file=sys.stderr)
> +            sys.exit(1)
> +
>       def _pre_run_hook(self):
>           """ Hook executed at the start of TestProfile.run
>
>

Reviewed-by: Brian Paul <brianp at vmware.com>

Thanks!



More information about the Piglit mailing list