[Piglit] [PATCH v2] Refactor PlainExecTest, GleanTest, and GTFTest to share code.

Eric Anholt eric at anholt.net
Fri Jul 8 21:35:08 PDT 2011

On Fri,  8 Jul 2011 16:54:33 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Each of these classes are essentially the same, except for:
> 1. How to determine whether the test passed/failed
> 2. Setting up the command and options
> All the logic for running the command and obtaining its output can be
> shared, as well as the logic to determine if it trapped/aborted/etc.
> This patch creates a new 'ExecTest' base class.  Subclasses can set the
> exact command to run and options in their __init__ method, and must
> supply an 'interpretResult' method which reads the output and sets
> results['result'] to pass/fail (along with other desired annotations).

The only behavior diff I saw in review was that we wouldn't do
PlainExecTests's interpretResult block if the exit code was != 0
(piglit_report_result(PIGLIT_FAIL)) any more.  I'm not sure if this
would result in less information being parsed into the result log.

Overall, looks like a good cleanup, and if it's confirmed that this
doesn't mess up reporting,

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20110708/e2431991/attachment-0001.pgp>

More information about the Piglit mailing list