[Piglit] [PATCH 2/2] results.py: Allow partially completed runs to be summarized
Dylan Baker
baker.dylan.c at gmail.com
Sat Nov 15 21:54:32 PST 2014
On Sunday, November 16, 2014 03:44:06 PM Dave Airlie wrote:
> On 14 November 2014 09:26, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> > This restores the ability to create a summary from a partial set of
> > runs by using the same functionality as resume.
> >
> > Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> > cc: airlied at gmail.com
>
> Tested-by: Dave Airlie <airlied at redhat.com>
>
> wfm, please push!
pushed.
> > ---
> > framework/results.py | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/framework/results.py b/framework/results.py
> > index 175a386..6ab22b1 100644
> > --- a/framework/results.py
> > +++ b/framework/results.py
> > @@ -190,6 +190,19 @@ def load_results(filename):
> > # file descriptors
> > if not os.path.isdir(filename):
> > filepath = filename
> > + elif os.path.exists(os.path.join(filename, 'metadata.json')):
> > + # If the test is still running we need to use the resume code, since
> > + # there will not be a results.json file.
> > + # We want to return here since the results are known current (there's
> > + # an assert in TestrunResult.load), and there is no filepath
> > + # to pass to update_results
> > + # XXX: This needs to be run before searching for a results.json file so
> > + # that if the new run is overwriting an old one we load the
> > + # partial and not the original. It might be better to just delete
> > + # the contents of the folder if there is anything in it.
> > + # XXX: What happens if the tests folder gets deleted in the middle of
> > + # this?
> > + return TestrunResult.resume(filename)
> > else:
> > # If there are both old and new results in a directory pick the new
> > # ones first
> > --
> > 2.1.3
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20141115/25d49358/attachment.sig>
More information about the Piglit
mailing list