[Piglit] [PATCH 08/10] shader_runner: add echo command

Jordan Justen jordan.l.justen at intel.com
Wed Oct 16 01:33:12 CEST 2013


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 tests/shaders/shader_runner.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index b3f17e3..65b9bea 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1934,6 +1934,11 @@ piglit_display(void)
 				  &x, &y, &w, &h) == 4) {
 			glEnable(GL_SCISSOR_TEST);
 			glScissor(x, y, w, h);
+		} else if (string_match("echo ", line)) {
+			char* print_to_eol = strdup(line+5);
+			*strchrnul(print_to_eol, '\n') = '\0';
+			printf("%s\n", print_to_eol);
+			free(print_to_eol);
 		} else if ((line[0] != '\n') && (line[0] != '\0')
 			   && (line[0] != '#')) {
 			printf("unknown command \"%s\"\n", line);
-- 
1.7.10.4



More information about the Piglit mailing list