[Piglit] [PATCH 2/2] shader_runner.c only read one [require] section

Tom Gall tom.gall at linaro.org
Mon Jan 21 19:50:45 PST 2013


When shader_runner parses the shader_test data file, only
parse one [required] section, no longer parse the rest of the file.

v2: better description. Remove warning.

Signed-off-by: Tom Gall <tom.gall at linaro.org>
---
 tests/shaders/shader_runner.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 8dfeb2a..d83228e 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -868,8 +868,12 @@ parse_required_versions(struct requirement_parse_results *results,
 	}
 
 	while (line[0] != '\0') {
-		if (line[0] == '[')
-			in_requirement_section = false;
+		if (line[0] == '[') {
+			if (in_requirement_section)
+				break;
+			else
+				in_requirement_section = false;
+		}
 
 		if (!in_requirement_section) {
 			if (string_match("[require]", line)) {
-- 
1.7.10.4



More information about the Piglit mailing list