Home | History | Annotate | Download | only in unit-tests
History log of /src/usr.bin/make/unit-tests/varmod-gmtime.exp
RevisionDateAuthorComments
 1.24  30-Mar-2025  rillig make: use '"filename" line 123' for locations instead of 'filename:123'

The format 'filename:123' is commonly used for identifying a location in
a file. Text editors recognize it and allow quick navigation through it.
The previous format was specific to make and would have required custom
support in editors.

The new format was already used in stack traces, except for the first
line. Now all lines use the same format.
 1.23  11-Jan-2025  rillig make: omit redundant follow-up message "Malformed conditional"

If there is a parse error or an evaluation error during the conditional,
the conditional is already mentioned in the "while evaluating condition"
line, so there's no reason to repeat it once again.

Same for the "Bad condition" message from the '?:' modifier.
 1.22  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.21  06-Aug-2024  rillig make: in error message about conditionals, use single quotes

Single quotes are used less often in the conditionals themselves, which
leads to fewer confusions.
 1.20  05-Jul-2024  rillig make: in error messages for anonymous variables, log the value
 1.19  04-Jul-2024  rillig make: on error, print the targets to be made

This helps to understand situations with several nested sub-makes in
varying directories.
 1.18  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.17  20-Apr-2024  rillig branches: 1.17.2;
make: provide more context information for parse/evaluate errors
 1.16  01-Jun-2023  rillig 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.
 1.15  09-May-2023  rillig tests/make: clean up tests for ':gmtime' and ':localtime'
 1.14  09-May-2023  rillig make: allow ':gmtime' and ':localtime' with dynamic argument

This allows ${%Y:L:gmtime=${mtime}} instead of the indirect
${%Y:L:${:Ugmtime=${mtime}}}.

The direct form also prevents any ':' from the nested expression to be
interpreted as a separator, which doesn't matter for the ':gmtime' and
':localtime' modifiers but will prove useful for other modifiers that
follow the same pattern.
 1.13  09-May-2023  rillig tests/make: demonstrate parse bug in :gmtime and :localtime modifiers
 1.12  09-Dec-2021  rillig make: in parse errors, mark whitespace more clearly

This prevents any trailing whitespace from going unnoticed. It also
marks leading whitespace more clearly, as in the examples with the time
value " 1".
 1.11  19-Jan-2021  rillig make(1): fix tests for :gmtime and :localtime for 32-bit time_t

The comparison operator had accidentally been '!=' instead of '=='.

While here, proofread the documentation and add references for where the
32-bit time_t is defined on Linux and FreeBSD.
 1.10  21-Dec-2020  rillig make(1): remove excess newline from parse errors (since 2020-11-01)

For the modifiers :gmtime and :localtime, the excess newline had been
added in var.c 1.631 from 2020-10-31 21:40:20.

For the modifiers :range and :ts, the excess newline had been added in
var.c 1.635 from 2020-11-01 14:36:25.
 1.9  21-Dec-2020  rillig make(1): align tests for :localtime with those for :gmtime

These tests had been almost the same before, now they are as similar as
possible again.
 1.8  21-Dec-2020  rillig make(1): move tests for :gmtime to parse time

It's easier to have both the expressions and the expected values in a
single file. This also allows for flexible handling of multiple
acceptable outputs, in this case for 32-bit time_t.
 1.7  30-Nov-2020  rillig make(1): fix tests for :gmtime and :localtime for 32-bit time_t

https://bugs.freebsd.org/251465
 1.6  31-Oct-2020  rillig make(1): make parsing of the :gmtime and :localtime modifiers stricter

These variable modifiers accept an optional timestamp in seconds, to
select which date to print. This feature is only used very rarely. The
NetBSD build doesn't use it at all, and the FreeBSD build mainly uses
the plain modifiers :gmtime and :localtime, but not their optional
argument :gmtime=1500000000.

Therefore, this change is not going to affect many builds. Those that
are indeed affected had been wrong all the time anyway.

At parse time, these errors stop the build, as intended. After that,
when the actual shell commands of the targets are expanded and run,
these errors don't stop anything, the build just continues as if nothing
had happened. This is a general problem with Var_Parse, see the many
"handle errors" markers in the code. Another problem is that on parse
errors, parsing continues and spits out spurious strings of the form
"mtime" and "ocaltime". This as well is a general problem with error
handling in make.

ok sjg
 1.5  31-Oct-2020  rillig make(1): add more tests for the variable modifier :localtime
 1.4  31-Oct-2020  rillig make(1): add test for :gmtime with space before the number of seconds
 1.3  31-Oct-2020  rillig make(1): add tests for error handling in the :gmtime variable modifier
 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.17.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed