[Piglit] [PATCH 6/9] tests/fbo-storage-formats: Make subtest names predictable

Dylan Baker dylan at pnwbakers.com
Sat Jan 20 00:26:01 UTC 2018


Currently the name of the subtest relies on checking the GL state of the
command to know whether the framebuffer is completely or incomplete.
That is a problem for enumerating subtests, we would need to know ahead
of time whether the framebuffer is complete or not.

Instead print the completeness of the test apart from the subtest name,
and name the subtest name just the format name. This also makes the name
the same when the test fails and when in passes.

Signed-off-by: Dylan Baker <dylan.c.baker at intel.com>
---
 tests/fbo/fbo-storage-formats.c |  9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/fbo/fbo-storage-formats.c b/tests/fbo/fbo-storage-formats.c
index 91b80e0..cfc8ae0 100644
--- a/tests/fbo/fbo-storage-formats.c
+++ b/tests/fbo/fbo-storage-formats.c
@@ -200,11 +200,10 @@ test(void)
 			pass = GL_FALSE;
 		} else {
 			GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
-			piglit_report_subtest_result(PIGLIT_PASS,
-						     "%s (%s)",
-						     name,
-						     (status == GL_FRAMEBUFFER_COMPLETE ?
-						      "complete" : "incomplete"));
+			printf("%s is %s",
+		               name,
+			       (status == GL_FRAMEBUFFER_COMPLETE ?  "complete" : "incomplete"));
+			piglit_report_subtest_result(PIGLIT_PASS, "%s", name);
 		}
 	}
 
-- 
git-series 0.9.1


More information about the Piglit mailing list