History log of /netbsd-src/usr.bin/make/unit-tests/Makefile (Results 1 – 25 of 355)
Revision Date Author Comments
# b59f0b42 25-Jan-2025 sjg <sjg@NetBSD.org>

make/unit-tests: avoid failure on NFS

The 'rm -rf ${TMPDIR}' at the end of the 'test' target, fails
when building on NFS because the temp file used for the target script
keeps the directory from bei

make/unit-tests: avoid failure on NFS

The 'rm -rf ${TMPDIR}' at the end of the 'test' target, fails
when building on NFS because the temp file used for the target script
keeps the directory from being empty.

Move it to a separate target attached to '.END'

Reviewed by: rillig

show more ...


# 945dd8ed 10-Jan-2025 rillig <rillig@NetBSD.org>

tests/make: test expressions based on undefined variables

When an undefined variable is used in a conditional, make complains about
"Malformed conditional", which is wrong since the conditional is
w

tests/make: test expressions based on undefined variables

When an undefined variable is used in a conditional, make complains about
"Malformed conditional", which is wrong since the conditional is
well-formed but errors out during evaluation.

In order to fix this wrong error message and preserve the remaining
behavior, cover the places in which an expression is evaluated with
undefined expressions being an error (VARE_EVAL_DEFINED), but with
neither producing an error message nor handling errors. This combination
results in the same behavior as evaluating the expressions in the mode
that allows undefined variables to be used in expressions.

show more ...


# ae412370 22-Nov-2024 rillig <rillig@NetBSD.org>

tests/make: speed up running the tests

Only 4 of the 389 tests need to postprocess their output, so spare the
extra 'cat' call in the majority of cases.


# d08a9cc9 31-Oct-2024 rillig <rillig@NetBSD.org>

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
'Se

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.

show more ...


# 43bbb769 18-Aug-2024 rillig <rillig@NetBSD.org>

tests/make: clean up private temporary directory after running tests

Fixes PR bin/58569.


# b9e875e0 07-Jul-2024 rillig <rillig@NetBSD.org>

make: don't track hash table chain lengths during lookup

The chain lengths are only used for debugging purposes, so avoid the
extra cost at each lookup. Instead, calculate the maximum chain length

make: don't track hash table chain lengths during lookup

The chain lengths are only used for debugging purposes, so avoid the
extra cost at each lookup. Instead, calculate the maximum chain length
only when it is actually requested in -dh mode.

The reported number changes slightly: Before, it was the length of the
chain that was actually traversed to find an entry, up to that entry,
now it is the length of the largest chain in the table, no matter if it
was actually accessed or not.

show more ...


# c09c56ab 04-Jul-2024 rillig <rillig@NetBSD.org>

make: on error, print the targets to be made

This helps to understand situations with several nested sub-makes in
varying directories.


# de6cb1fb 01-Jul-2024 sjg <sjg@NetBSD.org>

make: add :tc to capitalize first letter of each word

This is very hard to do without :tc

Reviewed by: rillig


# aee3d42c 01-Jun-2024 sjg <sjg@NetBSD.org>

Run check-expect.lua in .CURDIR


# cdbdfe23 01-Jun-2024 rillig <rillig@NetBSD.org>

tests/make: require all expected messages to be listed in the .mk files


# 0ab57ba3 24-May-2024 rillig <rillig@NetBSD.org>

make: in -DCLEANUP mode, free variables and their values

The variables in the 3 scopes must be freed before the scopes themselves
are freed by Targ_End.

The test opt-m-include-dir creates a directo

make: in -DCLEANUP mode, free variables and their values

The variables in the 3 scopes must be freed before the scopes themselves
are freed by Targ_End.

The test opt-m-include-dir creates a directory of the form '*.tmp', thus
it must be removed before attempting to only remove regular files of
this name.

POSIX requires setenv to copy the passed name and value, so there is no
need to keep that memory allocated any longer.

show more ...


# 820ce664 30-Apr-2024 sjg <sjg@NetBSD.org>

Subst DEFSYSPATH in deptgt-phony


# 873c42ef 20-Apr-2024 rillig <rillig@NetBSD.org>

make: provide more context information for parse/evaluate errors


# aebf9978 07-Jan-2024 sjg <sjg@NetBSD.org>

make: unit-tests handle TEST_MAKE:T != make

We need to allow for ${TEST_MAKE:T}[1-9]: etc when
TEST_MAKE is not 'make'


# 7e018a29 09-Sep-2023 sjg <sjg@NetBSD.org>

Add .MAKE.JOBS.C to indicate wether -jC is supported


# c63251b3 17-Aug-2023 rillig <rillig@NetBSD.org>

tests/make: extend tests for the ':mtime' modifier


# d7881bb6 20-Jun-2023 rillig <rillig@NetBSD.org>

make: allow targets to be used as multiple-inclusion guards

This style is used by FreeBSD, among others.


# 13e86983 16-Jun-2023 rillig <rillig@NetBSD.org>

tests/make: add test for multiple-inclusion guards


# 1d0b121f 16-Jun-2023 rillig <rillig@NetBSD.org>

tests/make: clean up tests for the ':M' and ':S' modifiers


# 94586703 01-Jun-2023 rillig <rillig@NetBSD.org>

tests/make: clean up comments, extend a few tests


# de72ac44 10-May-2023 rillig <rillig@NetBSD.org>

tests/make: clean up tests for .for loops

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


# ff8067fc 09-May-2023 sjg <sjg@NetBSD.org>

make: add :mtime to provide mtime of file

The value of the variable is passed to stat(2)
and st_mtime is new value.
An optional arg can be used if stat(2) fails, otherwise
the current time is used.

make: add :mtime to provide mtime of file

The value of the variable is passed to stat(2)
and st_mtime is new value.
An optional arg can be used if stat(2) fails, otherwise
the current time is used.

See varmod-mtime.mk for usage examples.

show more ...


# f65c7863 25-Feb-2023 sjg <sjg@NetBSD.org>

make: meta-ignore tests will not work if TMPDIR is /tmp

Since /tmp and /var/tmp are always part of .MAKE.META.IGNORE_PATHS
the varname-dot-make-meta-ignore_* tests will not work
if TMPDIR is either

make: meta-ignore tests will not work if TMPDIR is /tmp

Since /tmp and /var/tmp are always part of .MAKE.META.IGNORE_PATHS
the varname-dot-make-meta-ignore_* tests will not work
if TMPDIR is either (or subdir) of those.

show more ...


# 3f8e6586 23-Feb-2023 sjg <sjg@NetBSD.org>

Add unit-tests for .MAKE.META.IGNORE_*

These unit-tests should only be run if TEST_MAKE
has a valid .MAKE.PATH_FILEMON to indicate that filemon is
supported.

All three tests use the same meta-ignor

Add unit-tests for .MAKE.META.IGNORE_*

These unit-tests should only be run if TEST_MAKE
has a valid .MAKE.PATH_FILEMON to indicate that filemon is
supported.

All three tests use the same meta-ignore.inc
which runs three sub-makes

one to initialize the target .meta file
two to ignore a file using .MAKE.META.IGNORE_{PATHS,PATTERNS,FILTER}
three to verify that without .MAKE.META.IGNORE_* the target is out of date.

Fix the order of _SED_CMDS to avoid errors when ${MAKE:T} appears in
.OBJDIR

show more ...


# 8e4b5cfe 24-Jan-2023 sjg <sjg@NetBSD.org>

make: .SYSPATH: to add dirs to sysIncPath

.SYSPATH: with no sources will clear sysIncPath
otherwise sources are added

Reviewed by: rillig


12345678910>>...15