History log of /src/usr.bin/make/unit-tests/varmod-assign.mk |
Revision | | Date | Author | Comments |
1.28 |
| 30-Mar-2025 |
rillig | make: add details to error message for the "::=" modifier
The previous error message about a bad modifier ":" was not helpful, as the strcspn call stopped immediately due to the modifier starting with the separater character ":". The previous error message also didn't reveal that the "parse error" was due to the expression name being empty.
|
1.27 |
| 29-Mar-2025 |
rillig | make: add ":" to error message about unknown modifier
In the manual page, the modifiers are listed with a preceding ":", so use the same pattern in the error message. This removes an inconsistency between the error messages "Unknown modifier" and "Bad modifier".
|
1.26 |
| 29-Mar-2025 |
rillig | make: add more details to error message about unfinished modifier
These details allow to quickly see the place where the syntax error is, based on the surrounding lines from the stack trace.
|
1.25 |
| 29-Aug-2024 |
rillig | 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.
|
1.24 |
| 20-Jul-2024 |
rillig | 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.
|
1.23 |
| 04-Jul-2024 |
rillig | 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.
|
1.22 |
| 30-Jun-2024 |
rillig | 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
|
1.21 |
| 30-Jun-2024 |
rillig | 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.
|
1.20 |
| 20-Apr-2024 |
rillig | branches: 1.20.2; make: provide more context information for parse/evaluate errors
|
1.19 |
| 07-Jan-2024 |
rillig | tests/make: test the '::=' modifier in target scope
|
1.18 |
| 31-Dec-2023 |
rillig | tests/make: finish incomplete sentence in test for assignment modifiers
|
1.17 |
| 29-Dec-2023 |
rillig | tests/make: test the '::=' assignment modifier
|
1.16 |
| 19-Nov-2023 |
rillig | tests/make: replace 'variable expression' with 'expression'
Each expression is based on a variable, there's no need for the verbosity. The wording in make's diagnostics will be changed in a follow-up commit.
|
1.15 |
| 09-Feb-2022 |
rillig | make: fix mistakes, spelling and typos in comments and manual page
No binary change for -DNDEBUG.
|
1.14 |
| 05-Dec-2021 |
rillig | tests/make: make test for '::=' easier to read, fix comments
|
1.13 |
| 30-Nov-2021 |
rillig | 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.
|
1.12 |
| 15-Mar-2021 |
rillig | 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.
|
1.11 |
| 15-Mar-2021 |
rillig | tests/make: demonstrate that the modifier '::=' expands the varname
|
1.10 |
| 14-Feb-2021 |
rillig | make: add test for ::= modifier enclosed in parentheses
|
1.9 |
| 22-Jan-2021 |
rillig | make(1): remove outdated comment from test
It was fixed in var.c 1.472 from 2020-08-25.
|
1.8 |
| 18-Oct-2020 |
rillig | make(1): add test for the ::+= modifier expanding its right-hand side
|
1.7 |
| 18-Oct-2020 |
rillig | make(1): explain existing tests for the ::= assignment modifiers
|
1.6 |
| 25-Aug-2020 |
rillig | make(1): fix error message for ::!= modifier with shell error
It's just too easy to confuse st->val and val.
|
1.5 |
| 25-Aug-2020 |
rillig | make(1): add test for ::!= modifier with shell error
|
1.4 |
| 25-Aug-2020 |
rillig | make(1): move test for the ::= modifier to varmod-assign
|
1.3 |
| 25-Aug-2020 |
rillig | make(1): explain the varmod-assign test
I have no idea why I added the mod-assign-nested test. It is completely boring and doesn't provide any insight.
|
1.2 |
| 16-Aug-2020 |
rillig | make(1): move tests for the :gmtime and ::= modifiers to separate files
|
1.1 |
| 16-Aug-2020 |
rillig | 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.
|
1.20.2.2 |
| 02-Aug-2025 |
perseant | Sync with HEAD
|
1.20.2.1 |
| 01-Jul-2024 |
perseant | Sync with HEAD.
|