[Piglit] [PATCH v3 3/3] framework/backends/json: Don't convert to TestrunResult while updating
Dylan Baker
dylan at pnwbakers.com
Tue Oct 25 18:54:55 UTC 2016
Quoting Michel Dänzer (2016-10-24 23:10:04)
> On 13/10/16 05:59 AM, Dylan Baker wrote:
> > This changes the way updates are done in the backend, instead of
> > converting to a TestrunResult immediately, all of the transformations
> > are done to the JSON data in it's rawest form, ie, as dicts and lists,
> > and then transform to a TestrunResult (and children) after that.
> >
> > This makes the loading code more robust and simpler, since it's
> > decoupled from the representation, making the transformations easier to
> > test and manage.
> >
> > Part of this change is fixing the .to_json and .from_dict methods, many
> > of which "worked" because they're short comings were papered over by
> > using json.load with a custom decoder. This patch fixes them to actually
> > work correctly. Despite my best attempts I couldn't decouple this work
> > for this patch because of the close coupling of the JSON loading code
> > and the class representations.
> >
> > There are a number of fixups to the tests in this patch, since a number
> > of issues were being covered by the TestrunResult.to_json() method
> > filling it missing values.
> >
> > Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
>
> This change broke HTML summary generation for me. Interestingly, two
> possible invocations fail slightly differently:
>
> > ./piglit summary html summary/quick_cl results/quick_cl.20161024-baseline results/quick_cl.20161025-baseline
> usage: piglit [-h] {print-cmd,run,resume,summary} ...
>
> positional arguments:
> {print-cmd,run,resume,summary}
> print-cmd Print piglit commands, one per line.
> run Run a piglit test
> resume resume an interrupted piglit run
> summary summary generators
>
> optional arguments:
> -h, --help show this help message and exit
Yeah, there's a patch in the really big series that fixes an "except" catching
things it shouldn't and printing the help. It's probably actually the same bug
in the same place. I'll take a look.
>
>
> > ./piglit-summary-html.py summary/quick_cl results/quick_cl.20161024-baseline results/quick_cl.20161025-baseline
> /home/daenzer/src/piglit-git/piglit/framework/test/base.py:77: UserWarning: Timeouts are not available
> warnings.warn('Timeouts are not available')
> Traceback (most recent call last):
> File "./piglit-summary-html.py", line 35, in <module>
> html([i.decode('utf-8') for i in sys.argv[1:]])
> File "/home/daenzer/src/piglit-git/piglit/framework/exceptions.py", line 51, in _inner
> func(*args, **kwargs)
> File "/home/daenzer/src/piglit-git/piglit/framework/programs/summary.py", line 117, in html
> summary.html(args.resultsFiles, args.summaryDir, args.exclude_details)
> File "/home/daenzer/src/piglit-git/piglit/framework/summary/html_.py", line 178, in html
> _make_testrun_info(results, destination, exclude)
> File "/home/daenzer/src/piglit-git/piglit/framework/summary/html_.py", line 100, in _make_testrun_info
> time=each.time_elapsed.delta,
> AttributeError: 'dict' object has no attribute 'delta'
>
>
> --
> Earthling Michel Dänzer | http://www.amd.com
> Libre software enthusiast | Mesa and X developer
-------------- 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/20161025/37040d89/attachment.sig>
More information about the Piglit
mailing list