Re: [Piglit] [PATCH] framework: Don't stop resume because no tests are left to be run

2017-07-20 Thread Dylan Baker
Quoting Matt Turner (2017-07-19 18:17:22)
> On Tue, Jul 11, 2017 at 10:27 AM, Dylan Baker  wrote:
> > It's completely possible that if piglit resume is run with the -n flag
> > (don't retry incomplete tests), that piglit resume could be invoked with
> > no tests left to run. In this case it makes sense to let piglit resume
> > just finalize the backend and produce a unified result.
> >
> > Signed-off-by: Dylan Baker 
> > cc: Martin Peres 
> > ---
> >  framework/programs/run.py | 15 ++-
> >  1 file changed, 10 insertions(+), 5 deletions(-)
> >
> > diff --git a/framework/programs/run.py b/framework/programs/run.py
> > index 508bc05c4..ef268f722 100644
> > --- a/framework/programs/run.py
> > +++ b/framework/programs/run.py
> > @@ -35,6 +35,7 @@ import six
> >
> >  from framework import core, backends, exceptions, options
> >  from framework import dmesg
> > +from framework import exceptions
> 
> exceptions looks like it's imported a few lines above. Is this intentional?

No, I apparently just can't read.

Dylan


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] framework: Don't stop resume because no tests are left to be run

2017-07-19 Thread Matt Turner
On Tue, Jul 11, 2017 at 10:27 AM, Dylan Baker  wrote:
> It's completely possible that if piglit resume is run with the -n flag
> (don't retry incomplete tests), that piglit resume could be invoked with
> no tests left to run. In this case it makes sense to let piglit resume
> just finalize the backend and produce a unified result.
>
> Signed-off-by: Dylan Baker 
> cc: Martin Peres 
> ---
>  framework/programs/run.py | 15 ++-
>  1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/framework/programs/run.py b/framework/programs/run.py
> index 508bc05c4..ef268f722 100644
> --- a/framework/programs/run.py
> +++ b/framework/programs/run.py
> @@ -35,6 +35,7 @@ import six
>
>  from framework import core, backends, exceptions, options
>  from framework import dmesg
> +from framework import exceptions

exceptions looks like it's imported a few lines above. Is this intentional?
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] framework: Don't stop resume because no tests are left to be run

2017-07-13 Thread Martin Peres

On 11/07/17 20:27, Dylan Baker wrote:

It's completely possible that if piglit resume is run with the -n flag
(don't retry incomplete tests), that piglit resume could be invoked with
no tests left to run. In this case it makes sense to let piglit resume
just finalize the backend and produce a unified result.

Signed-off-by: Dylan Baker 
cc: Martin Peres 


Thanks!

Tested-by: Hector Edmundo Ramirez Gomez 




---
  framework/programs/run.py | 15 ++-
  1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/framework/programs/run.py b/framework/programs/run.py
index 508bc05c4..ef268f722 100644
--- a/framework/programs/run.py
+++ b/framework/programs/run.py
@@ -35,6 +35,7 @@ import six
  
  from framework import core, backends, exceptions, options

  from framework import dmesg
+from framework import exceptions
  from framework import monitoring
  from framework import profile
  from framework.results import TimeAttribute
@@ -435,11 +436,15 @@ def resume(input_):
  p.forced_test_list = results.options['forced_test_list']
  
  # This is resumed, don't bother with time since it won't be accurate anyway

-profile.run(
-profiles,
-results.options['log_level'],
-backend,
-results.options['concurrent'])
+try:
+profile.run(
+profiles,
+results.options['log_level'],
+backend,
+results.options['concurrent'])
+except exceptions.PiglitUserError as e:
+if str(e) != 'no matching tests':
+raise
  
  backend.finalize()
  


___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] framework: Don't stop resume because no tests are left to be run

2017-07-11 Thread Dylan Baker
It's completely possible that if piglit resume is run with the -n flag
(don't retry incomplete tests), that piglit resume could be invoked with
no tests left to run. In this case it makes sense to let piglit resume
just finalize the backend and produce a unified result.

Signed-off-by: Dylan Baker 
cc: Martin Peres 
---
 framework/programs/run.py | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/framework/programs/run.py b/framework/programs/run.py
index 508bc05c4..ef268f722 100644
--- a/framework/programs/run.py
+++ b/framework/programs/run.py
@@ -35,6 +35,7 @@ import six
 
 from framework import core, backends, exceptions, options
 from framework import dmesg
+from framework import exceptions
 from framework import monitoring
 from framework import profile
 from framework.results import TimeAttribute
@@ -435,11 +436,15 @@ def resume(input_):
 p.forced_test_list = results.options['forced_test_list']
 
 # This is resumed, don't bother with time since it won't be accurate anyway
-profile.run(
-profiles,
-results.options['log_level'],
-backend,
-results.options['concurrent'])
+try:
+profile.run(
+profiles,
+results.options['log_level'],
+backend,
+results.options['concurrent'])
+except exceptions.PiglitUserError as e:
+if str(e) != 'no matching tests':
+raise
 
 backend.finalize()
 
-- 
2.13.2

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit