mesa/src/compiler/glsl/glcpp/tests
Matt Turner df29d0a111 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>
2020-11-19 15:31:15 +00:00
..
000-content-with-spaces.c
000-content-with-spaces.c.expected
001-define.c
001-define.c.expected
002-define-chain.c
002-define-chain.c.expected
003-define-chain-reverse.c
003-define-chain-reverse.c.expected
004-define-recursive.c
004-define-recursive.c.expected
005-define-composite-chain.c
005-define-composite-chain.c.expected
006-define-composite-chain-reverse.c
006-define-composite-chain-reverse.c.expected
007-define-composite-recursive.c
007-define-composite-recursive.c.expected
008-define-empty.c
008-define-empty.c.expected
009-undef.c
009-undef.c.expected
010-undef-re-define.c
010-undef-re-define.c.expected
011-define-func-empty.c
011-define-func-empty.c.expected
012-define-func-no-args.c
012-define-func-no-args.c.expected
013-define-func-1-arg-unused.c
013-define-func-1-arg-unused.c.expected
014-define-func-2-arg-unused.c
014-define-func-2-arg-unused.c.expected
015-define-object-with-parens.c
015-define-object-with-parens.c.expected
016-define-func-1-arg.c
016-define-func-1-arg.c.expected
017-define-func-2-args.c
017-define-func-2-args.c.expected
018-define-func-macro-as-parameter.c
018-define-func-macro-as-parameter.c.expected
019-define-func-1-arg-multi.c
019-define-func-1-arg-multi.c.expected
020-define-func-2-arg-multi.c
020-define-func-2-arg-multi.c.expected
021-define-func-compose.c
021-define-func-compose.c.expected
022-define-func-arg-with-parens.c
022-define-func-arg-with-parens.c.expected
023-define-extra-whitespace.c
023-define-extra-whitespace.c.expected
024-define-chain-to-self-recursion.c
024-define-chain-to-self-recursion.c.expected
025-func-macro-as-non-macro.c
025-func-macro-as-non-macro.c.expected
026-define-func-extra-newlines.c
026-define-func-extra-newlines.c.expected
027-define-chain-obj-to-func.c
027-define-chain-obj-to-func.c.expected
028-define-chain-obj-to-non-func.c
028-define-chain-obj-to-non-func.c.expected
029-define-chain-obj-to-func-with-args.c
029-define-chain-obj-to-func-with-args.c.expected
030-define-chain-obj-to-func-compose.c
030-define-chain-obj-to-func-compose.c.expected
031-define-chain-func-to-func-compose.c
031-define-chain-func-to-func-compose.c.expected
032-define-func-self-recurse.c
032-define-func-self-recurse.c.expected
033-define-func-self-compose.c
033-define-func-self-compose.c.expected
034-define-func-self-compose-non-func.c
034-define-func-self-compose-non-func.c.expected
035-define-func-self-compose-non-func-multi-token-argument.c
035-define-func-self-compose-non-func-multi-token-argument.c.expected
036-define-func-non-macro-multi-token-argument.c
036-define-func-non-macro-multi-token-argument.c.expected
037-finalize-unexpanded-macro.c
037-finalize-unexpanded-macro.c.expected
038-func-arg-with-commas.c
038-func-arg-with-commas.c.expected
039-func-arg-obj-macro-with-comma.c
039-func-arg-obj-macro-with-comma.c.expected
040-token-pasting.c
040-token-pasting.c.expected
041-if-0.c
041-if-0.c.expected
042-if-1.c
042-if-1.c.expected
043-if-0-else.c
043-if-0-else.c.expected
044-if-1-else.c
044-if-1-else.c.expected
045-if-0-elif.c
045-if-0-elif.c.expected
046-if-1-elsif.c
046-if-1-elsif.c.expected
047-if-elif-else.c
047-if-elif-else.c.expected
048-if-nested.c
048-if-nested.c.expected
049-if-expression-precedence.c
049-if-expression-precedence.c.expected
050-if-defined.c
050-if-defined.c.expected
051-if-relational.c
051-if-relational.c.expected
052-if-bitwise.c
052-if-bitwise.c.expected
053-if-divide-and-shift.c
053-if-divide-and-shift.c.expected
054-if-with-macros.c
054-if-with-macros.c.expected
055-define-chain-obj-to-func-parens-in-text.c
055-define-chain-obj-to-func-parens-in-text.c.expected
056-macro-argument-with-comma.c
056-macro-argument-with-comma.c.expected
057-empty-arguments.c
057-empty-arguments.c.expected
058-token-pasting-empty-arguments.c
058-token-pasting-empty-arguments.c.expected
059-token-pasting-integer.c
059-token-pasting-integer.c.expected
060-left-paren-in-macro-right-paren-in-text.c
060-left-paren-in-macro-right-paren-in-text.c.expected
061-define-chain-obj-to-func-multi.c
061-define-chain-obj-to-func-multi.c.expected
062-if-0-skips-garbage.c
062-if-0-skips-garbage.c.expected
063-comments.c
063-comments.c.expected
064-version.c
064-version.c.expected
065-if-defined-parens.c
065-if-defined-parens.c.expected
066-if-nospace-expression.c
066-if-nospace-expression.c.expected
067-nested-ifdef-ifndef.c
067-nested-ifdef-ifndef.c.expected
068-accidental-pasting.c
068-accidental-pasting.c.expected
069-repeated-argument.c
069-repeated-argument.c.expected
070-undefined-macro-in-expression.c
070-undefined-macro-in-expression.c.expected
071-punctuator.c
071-punctuator.c.expected
072-token-pasting-same-line.c
072-token-pasting-same-line.c.expected
073-if-in-ifdef.c
073-if-in-ifdef.c.expected
074-elif-undef.c
074-elif-undef.c.expected
075-elif-elif-undef.c
075-elif-elif-undef.c.expected
076-elif-undef-nested.c
076-elif-undef-nested.c.expected
077-else-without-if.c
077-else-without-if.c.expected
078-elif-without-if.c
078-elif-without-if.c.expected
079-endif-without-if.c
079-endif-without-if.c.expected
080-if-without-expression.c
080-if-without-expression.c.expected
081-elif-without-expression.c
081-elif-without-expression.c.expected
082-invalid-paste.c glcpp: Remove illegal characters from tests 2017-01-04 14:40:48 -08:00
082-invalid-paste.c.expected glcpp: Remove illegal characters from tests 2017-01-04 14:40:48 -08:00
083-unterminated-if.c
083-unterminated-if.c.expected
084-unbalanced-parentheses.c
084-unbalanced-parentheses.c.expected glcpp: Handle bison-3.6 error message changes 2020-11-19 15:31:15 +00:00
085-incorrect-argument-count.c
085-incorrect-argument-count.c.expected
086-reserved-macro-names.c
086-reserved-macro-names.c.expected
087-if-comments.c
087-if-comments.c.expected
088-redefine-macro-legitimate.c
088-redefine-macro-legitimate.c.expected
089-redefine-macro-error.c
089-redefine-macro-error.c.expected
090-hash-error.c
090-hash-error.c.expected
091-hash-line.c
091-hash-line.c.expected
092-redefine-macro-error-2.c
092-redefine-macro-error-2.c.expected
093-divide-by-zero.c
093-divide-by-zero.c.expected
094-divide-by-zero-short-circuit.c
094-divide-by-zero-short-circuit.c.expected
095-recursive-define.c
095-recursive-define.c.expected
096-paste-twice.c
096-paste-twice.c.expected
097-paste-with-non-function-macro.c
097-paste-with-non-function-macro.c.expected
098-elif-undefined.c
098-elif-undefined.c.expected
099-c99-example.c
099-c99-example.c.expected
100-macro-with-colon.c
100-macro-with-colon.c.expected
101-macros-used-twice.c
101-macros-used-twice.c.expected
102-garbage-after-endif.c
102-garbage-after-endif.c.expected
103-garbage-after-else-0.c
103-garbage-after-else-0.c.expected
104-hash-line-followed-by-code.c
104-hash-line-followed-by-code.c.expected
105-multiline-hash-line.c
105-multiline-hash-line.c.expected
106-multiline-hash-if.c
106-multiline-hash-if.c.expected
107-multiline-hash-elif.c
107-multiline-hash-elif.c.expected
108-no-space-after-hash-version.c
108-no-space-after-hash-version.c.expected
109-no-space-after-hash-line.c
109-no-space-after-hash-line.c.expected
110-no-space-digits-after-hash-elif.c
110-no-space-digits-after-hash-elif.c.expected
111-no-space-operator-after-hash-if.c
111-no-space-operator-after-hash-if.c.expected
112-no-space-operator-after-hash-elif.c
112-no-space-operator-after-hash-elif.c.expected
113-line-and-file-macros.c glcpp: Remove illegal characters from tests 2017-01-04 14:40:48 -08:00
113-line-and-file-macros.c.expected glcpp: Remove illegal characters from tests 2017-01-04 14:40:48 -08:00
114-paste-integer-tokens.c glcpp: Remove illegal characters from tests 2017-01-04 14:40:48 -08:00
114-paste-integer-tokens.c.expected glcpp: Remove illegal characters from tests 2017-01-04 14:40:48 -08:00
115-line-continuations.c
115-line-continuations.c.expected
116-disable-line-continuations.c
116-disable-line-continuations.c.expected
117-line-continuation-and-non-continuation-backslash.c
117-line-continuation-and-non-continuation-backslash.c.expected
118-comment-becomes-space.c
118-comment-becomes-space.c.expected
119-elif-after-else.c
119-elif-after-else.c.expected
120-undef-builtin.c glcpp: Update tests for new #undef of built-in macro rules. 2016-08-15 22:55:34 -07:00
120-undef-builtin.c.expected Fix glcpp test expectations 2017-06-08 09:46:36 +02:00
121-comment-bug-72686.c
121-comment-bug-72686.c.expected
122-redefine-whitespace.c glsl: ignore trailing whitespace when define redefined 2018-10-10 15:08:32 +11:00
122-redefine-whitespace.c.expected glsl: ignore trailing whitespace when define redefined 2018-10-10 15:08:32 +11:00
123-garbage-after-else-1.c
123-garbage-after-else-1.c.expected
124-preprocessing-numbers.c
124-preprocessing-numbers.c.expected
125-es-short-circuit-undefined.c
125-es-short-circuit-undefined.c.expected
126-garbage-after-directive.c
126-garbage-after-directive.c.expected
127-pragma-empty.c
127-pragma-empty.c.expected
128-space-before-hash.c
128-space-before-hash.c.expected
129-define-non-identifier.c
129-define-non-identifier.c.expected glcpp: Remove empty mid-rule action which changes test behavior. 2016-03-07 23:02:05 -08:00
130-define-comment.c
130-define-comment.c.expected
131-eof-without-newline.c
131-eof-without-newline.c.expected
132-eof-without-newline-define.c
132-eof-without-newline-define.c.expected
133-eof-without-newline-comment.c
133-eof-without-newline-comment.c.expected
134-hash-comment-directive.c
134-hash-comment-directive.c.expected
135-duplicate-parameter.c
135-duplicate-parameter.c.expected
136-plus-plus-and-minus-minus.c
136-plus-plus-and-minus-minus.c.expected
137-expand-macro-after-period.c
137-expand-macro-after-period.c.expected
138-multi-line-comment-in-if-0.c
138-multi-line-comment-in-if-0.c.expected
139-define-without-macro-name.c
139-define-without-macro-name.c.expected
140-null-directive.c
140-null-directive.c.expected
141-pragma-and-__LINE__.c
141-pragma-and-__LINE__.c.expected
142-defined-within-macro.c
142-defined-within-macro.c.expected
143-multiple-else.c
143-multiple-else.c.expected
144-implicit-version.c
144-implicit-version.c.expected
145-version-first.c
145-version-first.c.expected
146-version-first-hash.c
146-version-first-hash.c.expected glcpp: Fix locations when encounting "#<NEWLINE>". 2016-03-10 11:23:26 -08:00
147-define-macro-no-space.c glcpp: Add testing for no space between macro name and replacement list 2017-01-04 14:40:48 -08:00
147-define-macro-no-space.c.expected glcpp: Add testing for no space between macro name and replacement list 2017-01-04 14:40:48 -08:00
147-undef-builtin-allowed.c glcpp: Update tests for new #undef of built-in macro rules. 2016-08-15 22:55:34 -07:00
147-undef-builtin-allowed.c.expected Fix glcpp test expectations 2017-06-08 09:46:36 +02:00
148-legal-characters.c glcpp: Exhaustively test all legal characters in GLSL 2017-01-04 14:40:48 -08:00
148-legal-characters.c.expected glcpp: Exhaustively test all legal characters in GLSL 2017-01-04 14:40:48 -08:00
149-hex-const-uppercase-prefix.c glsl/glcpp: Handle hex constants with 0X prefix 2018-04-24 09:55:05 +10:00
149-hex-const-uppercase-prefix.c.expected glsl/glcpp: Handle hex constants with 0X prefix 2018-04-24 09:55:05 +10:00
glcpp_test.py glcpp: Handle bison-3.6 error message changes 2020-11-19 15:31:15 +00:00