glcpp: Handle bison-3.6 error message changes
authorMatt Turner <mattst88@gmail.com>
Tue, 17 Nov 2020 19:58:24 +0000 (14:58 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 19 Nov 2020 15:31:15 +0000 (15:31 +0000)
commitdf29d0a111da3a555d8f0751722ca70fe0c5ffc0
tree64318f8698a9fa920ecb0438d8522ed442b5b40d
parent2be8cebd0b062aa91a6198ba8ae99cc8749b2e8d
glcpp: Handle bison-3.6 error message changes

In bison's commit 72c9fa4510eb (skeletons: use "end of file" instead of
"$end") in bison-3.6, '$end' was changed to 'end of file' in error
messages. Since our glcpp test cases contain the expected output text,
they rely on the particular messages printed by bison. The test case
084-unbalanced-parentheses fails when Mesa is built with bison-3.6 due
to this change.

To allow the test to pass on all supported versions of bison, we:

   1. Change '$end' -> 'end of file' in the .expected file, and
   2. Normalize the error generated by the test case with the same
      replacement

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3181
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7659>
src/compiler/glsl/glcpp/tests/084-unbalanced-parentheses.c.expected
src/compiler/glsl/glcpp/tests/glcpp_test.py