The NetBSD Project

CVS log for src/usr.bin/make/unit-tests/

[BACK] Up to [] / src / usr.bin / make / unit-tests

Request diff between arbitrary revisions

Default branch: MAIN

Revision 1.7 / (download) - annotate - [select for diffs], Sat May 7 08:01:20 2022 UTC (23 months ago) by rillig
Branch: 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, HEAD
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

make: rename Compat_Run to Compat_MakeAll

No functional change.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Dec 7 01:04:07 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.5: +5 -3 lines
Diff to previous 1.5 (colored)

make(1): don't make .END if the main targets already failed

This only applies to -k mode.  By default, make exits earlier and skips
the .END node as well if an error occurs.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Dec 7 00:53:30 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.4: +4 -3 lines
Diff to previous 1.4 (colored)

make(1): fix exit status in -k mode if a dependency fails

Whether in -k mode or not, the exit status tells whether all requested
targets were made or not.  If a dependency could not be made, the main
target was not made as well, therefore the exit status must be nonzero
in such a case.

This part of the code lacked proper unit tests until today.  The unit
test is compatible with make>=2003 at least, allowing
to compare the output over time.

In 2003, in the ok-ok-ok-ok case, "Making all from all-dep." was printed
twice in a row, for whatever reason  ... (40 minutes later) ... If I had
just made the two commands for 'all' and '.END' more distinguishable.
Back in 2003, the local variables for .END had not been initialized,
instead the .END node was run with the local variables of the last
preceding node.  In this case, that node was 'all', therefore ${.TARGET}
had obviously expanded to 'all'.

Somewhere in 2004, the shell commands were no longer run with the -e
flag, which resulted in the "exit status $?" line to be printed in cases
that had stopped early before.

Somewhere in 2005, the local variables for the .END node had been fixed.
The variable ${.TARGET} now had the value '.END', just as expected.  In
addition, the dependencies for the .END node were made, although without
getting their proper local variables.  This resulted in the output
"Making  out of nothing" instead of the expected "Making end-dep out of

Still in 2005, in the test case "all=ok all-dep=ok end=ok end-dep=ERR",
the error code of the failed 'end-dep' was first reported as "*** Error
code 1 (continuing)".  To compensate for this improvement, a new bug had
been introduced.  The test case "all=ok all-dep=ok end=ERR end-dep=ERR"
had properly exited with status 1 on 2005-01-01, but on 2006-01-01 it
exited with status 0, thereby ignoring errors in the .END node.

Somewhere in 2008, some of the error messages (but not all) were
directed to stderr instead of stdout.  The actual output stayed the same

Somewhere in 2011, the dependency of the .END node got its own local
variables, and ${.TARGET} now expanded to 'end-dep', as expected.

Somewhere in 2016, the two empty lines between the "*** Error code 1
(continuing)" and the "Stop." got compressed into a single empty line.

On 2020-12-07 (that is, today), the exit status 1 has been restored in
the error cases, after it had been wrong for at least 14 years.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Dec 6 22:36:58 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.3: +58 -6 lines
Diff to previous 1.3 (colored)

make(1): test all combinations of failed main and .END targets

Adding an individual test for each of the 16 combinations would have
been too much manual work, and it's not easy to come up with a good
naming scheme for all the tests, keeping them short and expressive at
the same time.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Dec 6 21:22:04 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

make(1): add test for .END after failed main node

Revision 1.2 / (download) - annotate - [select for diffs], Tue Nov 24 17:59:42 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

make(1): add test for error in dependency of .END node in -k mode

Revision 1.1 / (download) - annotate - [select for diffs], Tue Nov 24 15:36:51 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN

make(1): add test for missing "Stop" after error in .END

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

CVSweb <>