The NetBSD Project

CVS log for src/usr.bin/make/unit-tests/directive-for.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.26: download - view: text, markup, annotated - select for diffs
Thu Aug 29 20:20:36 2024 UTC (3 months, 1 week ago) by rillig
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -1 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.25: download - view: text, markup, annotated - select for diffs
Sat Jul 6 10:14:35 2024 UTC (5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +19 -19 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.24: download - view: text, markup, annotated - select for diffs
Fri Jul 5 19:47:22 2024 UTC (5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +1 -1 lines
make: in error messages for anonymous variables, log the value

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Jul 4 17:47:54 2024 UTC (5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -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.22: download - view: text, markup, annotated - select for diffs
Sat Apr 20 10:18:55 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.21: preferred, colored
Changes since revision 1.21: +1 -1 lines
make: provide more context information for parse/evaluate errors

Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Dec 6 22:28:20 2023 UTC (12 months ago) by rillig
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +10 -10 lines
tests/make: show how global variables are unaffected by .for loops

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Oct 19 18:24:33 2023 UTC (13 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +9 -8 lines
tests/make: clean up, explain and reorganize several tests

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Jun 1 20:56:35 2023 UTC (18 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +28 -28 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.18: download - view: text, markup, annotated - select for diffs
Thu Jun 1 09:02:14 2023 UTC (18 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
make: add more details to debug logging of .for loops

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed May 10 13:03:06 2023 UTC (19 months ago) by rillig
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +11 -10 lines
tests/make: clean up tests for .for loops

Most of the tests from forloop.mk were already in directive-for.mk.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue May 9 19:43:12 2023 UTC (19 months ago) by rillig
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +27 -35 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.15: download - view: text, markup, annotated - select for diffs
Mon May 8 10:24:07 2023 UTC (19 months ago) by rillig
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +9 -5 lines
make: disallow characters like '$' in variable names in .for loops

Fixes PR 53146.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon May 8 09:24:42 2023 UTC (19 months ago) by rillig
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +13 -10 lines
tests/make: add more tests for unusual variable names in .for loops

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon May 8 09:01:20 2023 UTC (19 months ago) by rillig
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -4 lines
make: fix parsing of unusual line continuations in .for loops

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Jan 8 20:21:34 2022 UTC (2 years, 11 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.11: preferred, colored
Changes since revision 1.11: +1 -1 lines
make: fix reported line numbers of continuation lines (since 2002)

Previously, multi-line directives like '.info' or '.error' reported the
line number of their last line instead of their first line, which is
more usual.  This also affected the debug log from '-dp'.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Jan 8 10:22:03 2022 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +11 -0 lines
tests/make: demonstrate edge case in parsing .for loops

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Jan 2 01:35:31 2022 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +7 -0 lines
tests/make: test edge cases in .for loops

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Feb 23 15:19:41 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.8: preferred, colored
Changes since revision 1.8: +1 -1 lines
make: improve error message for unknown modifier

Back in 1995, the modifiers were all single-character, and it made sense
to print only the first character.  Nowadays, with ':S', ':@var@...@',
'::=' and several others, a little more context is useful to see where
the exact error is.  The actual modifier is still guessed, and the guess
may be wrong as soon as backslashes get involved, but it is still better
than before.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Dec 27 09:58:35 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +6 -1 lines
make(1): add test for missing error handling in .for loop

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Nov 15 20:20:58 2020 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +18 -18 lines
make(1): update and add comments in tests

As a result of the new comments, some line numbers have changed in the
output of the tests.  No other changes.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Oct 25 15:49:03 2020 UTC (4 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -0 lines
make(1): test funny character in .for variable names

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Oct 25 14:55:23 2020 UTC (4 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +12 -0 lines
make(1): add test for escaping parentheses and braces in .for loops

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Sep 22 19:08:48 2020 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -0 lines
make(1): remove obsolete fix for PR bin/29985

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Sep 22 18:54:50 2020 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -0 lines
make(1): add test for .for loop from PR bin/29985

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Sep 14 18:49:24 2020 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -0 lines
make(1): add test for nested .for loops with the same variable name

Revision 1.1: download - view: text, markup, annotated - select for diffs
Wed Sep 2 05:33:57 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
make(1): add test for the .for directive

For a long time, I had assumed that the iteration variables of a .for
loop are just normal global variables.  This assumption was wrong but
didn't have any consequences.

The iteration variables of a .for loop can just be accessed like global
variables, therefore it is not obvious that they are implemented in a
completely different way.

There are some edge cases in conditions used inside .for loops, in which
the iteration variables cannot be used like normal variables.  An
example is brought up in https://gnats.netbsd.org/47888, which observes
that the defined() and empty() functions in conditions only work with
variables but ignore the iteration "variables", simply because these are
not variables but only expressions.

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>