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

Submitted by Dylan Baker on Jan. 20, 2018, 12:26 a.m.

Details

Message ID a2d81efcde7f6a565ecee720c34b1775cc1765ef.1516407949.git-series.dylan@pnwbakers.com
State New
Headers show
Series "Series without cover letter" ( rev: 13 12 11 10 9 8 7 6 5 4 3 2 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Dylan Baker Jan. 20, 2018, 12:26 a.m.
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@intel.com>
---
 tests/fbo/fbo-storage-formats.c |  9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

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);
 		}
 	}