Home | History | Annotate | Download | only in unit-tests
History log of /src/usr.bin/make/unit-tests/archive.mk
RevisionDateAuthorComments
 1.14  10-Jan-2025  rillig 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.
 1.13  27-Apr-2024  rillig branches: 1.13.2;
tests/make: test detection of static library files
 1.12  09-Apr-2021  christos Don't use a shell pattern to copy files, copy them explicitly. When running
as non-root, [at]*.mk matches archive.mk which we already copied. This was
copied as 444 and trying to overwrite it gives EACCES.
 1.11  15-Nov-2020  rillig make(1): clean up some tests

Fix some mistakes in comments.

Improve some comments to be easier understandable.

Inline variables that are irrelevant for the test at hand (RUN,
MAKE_CMD).

Remove references to functions and constants that have since been removed
or renamed.
 1.10  09-Oct-2020  rillig make(1): use consistent order in .OODATE in test archive.mk
 1.9  08-Oct-2020  rillig make(1): make individual targets in test archive.mk visible

This test still fails on FreeBSD, printing the "ar cru, ranlib" lines
twice, and I don't know why.

To get more insights into the inner details, without activating the full
-dA logging, split the output into paragraphs, one per target.

This change reveals another interesting detail: Dependencies without any
commands (in this case create-archive) don't inherit the commands from
.USEBEFORE and .USE sources.
 1.8  07-Sep-2020  rillig make(1): fix archive test when .CURDIR != .PARSEDIR
 1.7  05-Sep-2020  rillig make(1): add tests for each debug option
 1.6  04-Sep-2020  rillig make(1): re-enable the archive test

The test had failed in the releng build because it assumed it were run
with .CURDIR == .PARSEDIR. This assumption is true when the tests are
run directly from usr.bin/make, but not when they are run from
tests/usr.bin/make.
 1.5  23-Aug-2020  rillig make(1): in archive test, use wildcard that matches more than 1 file

This is to make sure that the buffer used for "archive(member)" is
properly reset after each member.
 1.4  23-Aug-2020  rillig make(1): add test for wildcards in archive dependency
 1.3  16-Aug-2020  rillig make(1): fix archive test

At the beginning of that test, the library archive obviously does not
exist yet.

This test failure is a bit hard to detect since the test is disabled in
usr.bin/make, but not in tests/usr.bin/make. This is because the latter
just runs all .mk files as tests, no matter whether they are commented
out or not.
 1.2  15-Aug-2020  rillig make(1): fix archive test

Even though it is commented out in this Makefile, it is still run by
atf, on purpose. This test is broken on FreeBSD, but on NetBSD it
should still be run.

Without removing the archive first, it could be left over from a
previous test failure and thus be newer than all its members, leading to
${.OODATE} being empty.
 1.1  27-Jul-2020  rillig make(1): add very basic test for archive handling

The whole code in arch.c had been uncovered by tests before.

The code coverage shows that neither the archive name nor the member
contain any $, even though archive.mk looks like it. It could be
necessary to place the variable assignments below the dependency line,
to force late evaluation.
 1.13.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed