[Piglit] [PATCH] util: keep track of failures in subtests
Martin Peres
martin.peres at linux.intel.com
Thu Feb 26 08:06:31 PST 2015
---
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
More information about the Piglit
mailing list