The NetBSD Project

CVS log for src/usr.bin/make/unit-tests/directive-for-escape.exp

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.32: download - view: text, markup, annotated - select for diffs
Thu Oct 31 09:12:13 2024 UTC (4 weeks, 3 days ago) by rillig
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -3 lines
make: in the debug log, always qualify line number with filename

Previously, to find out the filename corresponding to a line number from
a 'Parsing' line, it was necessary to find the preceding
'SetFilenameVars' line, which was unnecessarily time-consuming and
distracting.

The 'filename:line' format matches the one used in PrintStackTrace, and
it differs from the one used in PrintLocation, as the former format is
more common in other tools.

Most of the affected unit tests only use the 'Parsing' lines to give
additional context to their debug log, so no structural changes there.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Aug 29 20:20:36 2024 UTC (3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -2 lines
make: reduce line length in error messages

The error messages for deeply nested parse errors were hard to decipher,
due to the large amount of text.  Split these messages into individual
lines, just as in the backtrace for .include files and .for loops.  This
unified backtrace makes the output more uniform.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Jul 7 11:20:10 2024 UTC (4 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +31 -151 lines
tests/make: remove '# expect' lines from .exp file

These lines are only supposed to occur in .mk files.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Jul 6 10:14:35 2024 UTC (4 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +146 -38 lines
tests/make: clean up tests

Prefer "expect+X" directives to be above the code generating them,
instead of "expect-X" directives below the code.

In varmod-edge.mk, separate the tests, as the common loop does not pull
its weight.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Jul 5 19:47:22 2024 UTC (4 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -4 lines
make: in error messages for anonymous variables, log the value

Revision 1.27: download - view: text, markup, annotated - select for diffs
Fri Jul 5 18:59:33 2024 UTC (4 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +6 -4 lines
make: error out on unclosed expressions during parse time

In exchange, this adds location information.

For unnamed expressions, the value is no longer printed.  This will be
added back in a follow-up commit.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Fri Jul 5 17:41:50 2024 UTC (4 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +48 -44 lines
tests/make: add expected messages for "Unclosed expression"

Revision 1.25: download - view: text, markup, annotated - select for diffs
Thu Jul 4 17:47:54 2024 UTC (4 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +4 -0 lines
make: add more context information to error messages

In case of a parse error or evaluation error, print the variable value
in addition to the variable name, to see the effects of previous
expression modifiers.

In nested make calls, print the current directory at the bottom of a
stack trace, as that information is otherwise hard to get in a parallel
build spanning multiple directories.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sun Apr 14 12:30:47 2024 UTC (7 months, 2 weeks ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +1 -0 lines
make: add debug logging for .if and .for lines in -dp mode

This helps track down in which line a condition is evaluated.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Nov 19 22:06:15 2023 UTC (12 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -2 lines
make: replace 'variable expression' with 'expression' in diagnostics

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Jun 23 06:11:06 2023 UTC (17 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +50 -29 lines
tests/make: explain and extend tests for expansion in .for loops

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Jun 1 20:56:35 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +36 -36 lines
tests/make: force line-based diagnostics to be listed in the tests

This way, contradictions between the intended output and the actual
output are closer together and have a better chance of being spotted.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Jun 1 09:02:14 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +39 -36 lines
make: add more details to debug logging of .for loops

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue May 9 19:43:12 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +39 -43 lines
make: skip syntactically wrong .for loops

When a .for loop cannot be interpreted correctly, for example when there
are no iteration variables or the number of words doesn't match the
iteration variables, skip the body of the .for loop instead of
interpreting it once.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon May 8 10:24:07 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +31 -35 lines
make: disallow characters like '$' in variable names in .for loops

Fixes PR 53146.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Jun 12 16:09:21 2022 UTC (2 years, 5 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +37 -30 lines
make: document ExprLen, which is part of a .for loop

No binary change

Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Jan 27 20:15:14 2022 UTC (2 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +9 -0 lines
tests/make: add more edge cases for expansion of .for loop body

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Jan 27 11:26:44 2022 UTC (2 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +59 -30 lines
tests/make: explain escaping in .for loops, add more test cases

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Jan 9 20:53:53 2022 UTC (2 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -2 lines
tests/make: add placeholders for .PARSEDIR and .INCLUDEDFROMDIR

When run via 'cd usr.bin/make/unit-tests && make test', the tests are in
the current directory.  When run via ATF, the tests are in
/usr/tests/usr.bin/make/unit-tests, while the current directory is a
temporary directory.  Allow both variants, plus others that may occur in
the bmake distribution.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Jan 9 14:06:00 2022 UTC (2 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +16 -0 lines
make: fix crash for newline in .for value in -dp mode (since yesterday)

Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Sep 2 07:02:08 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +29 -29 lines
make: rename for_var_len to ExprLen

The text ${VAR} is not a variable, it's a variable expression.

No functional change.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Jun 25 16:10:07 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +6 -10 lines
make: prevent newline injection in .for loops

When a value of a .for loop contained a literal newline, such as from
the expression ${.newline}, that newline was passed verbatim to the
"expanded current body" of the .for loop.  There it was interpreted as a
literal newline, which ended the current line and started a new one.
This resulted in several syntax errors.

In cases like these, print a more precise error message.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Jun 25 15:56:02 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +15 -1 lines
tests/make: demonstrate newline injection in .for loop

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Jun 24 23:22:17 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +7 -0 lines
tests/make: test .for loop over a variable named '$'

It's an impractical edge case, nevertheless it's accepted by make.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Feb 23 15:56:30 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
CVS tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
make: improve error message for unclosed modifier

Replace "variable specification" with the more modern "variable
expression", reduce the number of parentheses, output more than a single
character for modifiers, make it obvious that in expressions such as
${:Serror}, the "" means a variable name.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Feb 15 07:58:19 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +14 -14 lines
make: improve comments in test for expansions in .for loops

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Jan 25 19:05:39 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -1 lines
make(1): rename struct For to struct ForLoop

This removes the ambiguity whether For_Free is meant to be a
module-exported function or a local function associate with that struct.
Rename the affected functions as well.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Jan 24 19:48:11 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +20 -16 lines
make(1): describe expansion of nested variables in .for values

These edge cases are not documented anywhere, and their behavior is
non-intuitive.  For now, just describe them, don't try to fix them.
There may be people out there relying on exactly this behavior.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Jan 24 19:30:18 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +1 -4 lines
make(1): let the test directive-for-escape exit successfully

There is no reason for a non-zero exit status here.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Dec 31 14:26:37 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +22 -0 lines
make(1): add test for common and edge cases in .for loop expansion

Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Dec 31 13:23:43 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +8 -0 lines
make(1): add tests for extreme edge cases of .for loop expansion

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Dec 31 03:05:12 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
make(1): add test for error handling and expansion in .for loops

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>