CVS log for src/usr.bin/make/unit-tests/varmod-assign.exp
Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.29: 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.28: preferred, colored
Changes since revision 1.28: +13 -5
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.28: download - view: text, markup, annotated - select for diffs
Sat Jul 20 11:05:12 2024 UTC (4 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +5 -9
lines
make: don't run erroneous commands in compat mode
When there is a parse or evaluation error in an expression that becomes
part of the command, don't run that command, as the result of the failed
evaluation typically contains garbage characters. Skip the remaining
commands from that target as well, as they may depend on the erroneous
command.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Jul 9 19:43:01 2024 UTC (5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +1 -1
lines
make: error out on parse/evaluation errors in shell commands
The expression ${VAR:X} has an unknown modifier ':X'. Previously, this
expression errored out when the expression was evaluated at parse time,
but not when the expression was evaluated when generating the commands
to bring a target up to date. The errors were previously reported, they
didn't affect the exit status, though.
Now, errors in expressions are handled in the same way, regardless of
the time at which they are evaluated.
Revision 1.26: 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.25: preferred, colored
Changes since revision 1.25: +2 -2
lines
make: in error messages for anonymous variables, log the value
Revision 1.25: download - view: text, markup, annotated - select for diffs
Thu Jul 4 18:53:37 2024 UTC (5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2
lines
make: error out on the "Bad modifier" error message
Previously, the "Bad modifier" error message did not affect make's exit
status. As a side effect, this kind of error now gets more context
information.
Revision 1.24: 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.23: preferred, colored
Changes since revision 1.23: +3 -3
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.20.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 1 01:01:15 2024 UTC (5 months, 1 week ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20: +2 -2
lines
Sync with HEAD.
Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Jun 30 15:21:24 2024 UTC (5 months, 1 week ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +1 -1
lines
make: error out on some more syntax errors
Previously, these errors only produced a message on stderr. They only
affected make's exit status when they were evaluated at parse time, but
not when evaluating the commands for a specific target right before
executing them.
The affected syntax errors are:
* invalid regular expressions in the ':C' modifier
* out-of-range references to regex groups in the ':C' modifier
* unfinished modifiers
Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Jun 30 11:44:14 2024 UTC (5 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +1 -1
lines
make: sync error handling between '!=' assignment and '::!=' modifier
Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Jun 30 11:37:21 2024 UTC (5 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +1 -1
lines
make: add detailed exit status to message for failed sub-commands
Several commands communicate via the exit status and not only
distinguish between zero and non-zero, so make this information
available to ease investigations.
The command "false" is not guaranteed to exit with a consistent status,
so use "(exit 13)" instead in the tests, to keep these tests portable
across different operating systems. The exit status 127 is required for
a shell that cannot find a command, so keep that one.
Revision 1.20: 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
Branch point for: perseant-exfatfs
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +1 -1
lines
make: provide more context information for parse/evaluate errors
Revision 1.19: download - view: text, markup, annotated - select for diffs
Sun Jan 7 11:42:22 2024 UTC (11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +7 -0
lines
tests/make: test the '::=' modifier in target scope
Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Dec 29 15:47:03 2023 UTC (11 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +25 -0
lines
tests/make: test the '::=' assignment modifier
Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Nov 30 20:48:01 2021 UTC (3 years 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: +0 -12
lines
tests/make: convert tests for modifier '::=' to parse time
This puts the expected result of the expressions closer to the
expressions, making the tests self-contained.
The error messages that used to produce trailing spaces have been fixed
in var.c 1.853 from 2021-02-23. The error message now encloses the
variable name in quotes.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue Apr 6 01:38:39 2021 UTC (3 years, 8 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.15: preferred, colored
Changes since revision 1.15: +1 -1
lines
make: reduce verbosity of the -dv debug logging for standard cases
The verbosity was already removed from LogBeforeApply, now it is
consistent between LogBeforeApply and LogAfterApply.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Apr 5 13:35:41 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +6 -6
lines
make: in debug log, add space between scope and variable name
Without this space, the debug log looked more like line noise, even
though the only punctuation was a single innocent ':'. From a make
user's perspective, the variable name is a word of its own and should
not be visually glued to its namespace.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Apr 5 13:27:30 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -1
lines
make: omit unnecessary details from -dv debug log
When an expression is based on a defined variable, it does not matter
whether the evaluation mode is "eval" or "eval-defined", therefore omit
these details to reduce confusion.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Apr 5 13:14:55 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -1
lines
make: be more verbose in -dv debug logging
The previous log output was too brief to be understandable. Give more
hints by describing each part of the expression when evaluating a
modifier. Distinguish between parse-only mode and eval mode since in
parse-only mode most of the details are irrelevant.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:02:59 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -2
lines
make: remove VarFlags from debug logging
Before the introduction of ExprDefined, VarFlags contained whether the
expression was defined or not, which was useful to know since the final
value of the expression depends on this information. The other VarFlags
do not influence the evaluation, so there is no point logging them.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Mar 15 18:56:38 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -6
lines
make: fix double varname expansion in the variable modifier '::='
This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.
The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Mar 15 18:46:05 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +17 -0
lines
tests/make: demonstrate that the modifier '::=' expands the varname
Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Feb 23 16:07:14 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2
lines
make: improve error message for bad modifier in variable expression
The improvement is especially noteable for variable expressions based on
the empty variable, see moderrs.exp:103.
Revision 1.8: 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
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +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.7: download - view: text, markup, annotated - select for diffs
Tue Feb 23 00:04:48 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -1
lines
make: add quotes around variable name in an error message
Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Oct 18 21:36:22 2020 UTC (4 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -1
lines
make(1): explain existing tests for the ::= assignment modifiers
Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Aug 25 21:16:53 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +1 -1
lines
make(1): fix error message for ::!= modifier with shell error
It's just too easy to confuse st->val and val.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Aug 25 21:07:39 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -0
lines
make(1): add test for ::!= modifier with shell error
Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Aug 25 20:49:40 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +10 -0
lines
make(1): move test for the ::= modifier to varmod-assign
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Aug 16 12:48:55 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +12 -0
lines
make(1): move tests for the :gmtime and ::= modifiers to separate files
Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Aug 16 12:07:51 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
make(1): add dummies for fine-grained tests, one per single feature
The test names have been derived from the current manual page.
All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.
This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.
CVSweb <webmaster@jp.NetBSD.org>