[Piglit] [PATCH] util: keep track of failures in subtests
Laura Ekstrand
laura at jlekstrand.net
Thu Feb 26 16:57:17 PST 2015
I like this, but let's wait and see what others have to say.
Laura
On Thu, Feb 26, 2015 at 8:06 AM, Martin Peres <martin.peres at linux.intel.com>
wrote:
> ---
> tests/util/piglit-util.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/tests/util/piglit-util.c b/tests/util/piglit-util.c
> index b094625..b5bd89f 100644
> --- a/tests/util/piglit-util.c
> +++ b/tests/util/piglit-util.c
> @@ -273,6 +273,20 @@ piglit_set_timeout(double seconds, enum piglit_result
> timeout_result)
> #endif
> }
>
> +static bool _piglit_subtests_all_passed = true;
> +
> +bool piglit_subtests_all_passed()
> +{
> + return _piglit_subtests_all_passed;
> +}
> +
> +bool piglit_subtests_all_passed_reset()
> +{
> + bool ret = _piglit_subtests_all_passed;
> + _piglit_subtests_all_passed = true;
> + return ret;
> +}
> +
> void
> piglit_report_subtest_result(enum piglit_result result, const char
> *format, ...)
> {
> @@ -287,6 +301,9 @@ piglit_report_subtest_result(enum piglit_result
> result, const char *format, ...)
> fflush(stdout);
>
> va_end(ap);
> +
> + if (result == PIGLIT_FAIL)
> + _piglit_subtests_all_passed = false;
> }
>
> #ifdef _WIN32
> --
> 2.3.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150226/99ce6a72/attachment.html>
More information about the Piglit
mailing list