[Piglit] [PATCH] shader_runner: print link error even when link failure expected

Timothy Arceri t_arceri at yahoo.com.au
Mon Nov 9 18:49:50 PST 2015


From: Timothy Arceri <timothy.arceri at collabora.com>

This makes it much easier to be sure the tests you are writting/running
are failing for the correct reason.

This also matches the behaviour of the glslparsertest tool.
---
 tests/shaders/shader_runner.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index b010cbb..9308905 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -3060,6 +3060,8 @@ piglit_display(void)
 			if (link_ok) {
 				printf("shader link error expected, but it was successful!\n");
 				piglit_report_result(PIGLIT_FAIL);
+			} else {
+				fprintf(stderr, "Failed to link:\n%s\n", prog_err_info);
 			}
 		} else if (string_match("link success", line)) {
 			program_must_be_in_use();
-- 
2.4.3



More information about the Piglit mailing list