[Piglit] [PATCH 10/16] tests/fbo-storage-formats: Make subtest names predictable

Fabian Bieler fabianbieler at fastmail.fm
Mon Jan 29 00:22:20 UTC 2018


From: Dylan Baker <dylan at pnwbakers.com>

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 91b80e09d..9cf8c675a 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\n",
+		               name,
+			       (status == GL_FRAMEBUFFER_COMPLETE ?  "complete" : "incomplete"));
+			piglit_report_subtest_result(PIGLIT_PASS, "%s", name);
 		}
 	}
 
-- 
2.15.1



More information about the Piglit mailing list