[Piglit] [PATCH 2/2] shader_runner.c only read one [require] section
Paul Berry
stereotype441 at gmail.com
Wed Jan 30 07:43:39 PST 2013
On 21 January 2013 19:50, Tom Gall <tom.gall at linaro.org> wrote:
> 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>
>
Ok, I've pushed these two patches. Sorry for the delay.
BTW, I took the liberty of adding colons to the patch subjects so that
they're easier to read:
shader_runner.py: Update regex to detect new require section syntax
shader_runner.c: only read one [require] section
> ---
> 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
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130130/93176662/attachment.html>
More information about the Piglit
mailing list