The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.342 / (download) - annotate - [select for diffs], Sun Jan 7 02:07:44 2024 UTC (2 months, 3 weeks ago) by sjg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.341: +2 -1 lines
Diff to previous 1.341 (colored) to selected 1.41 (colored)

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'

Revision 1.341 / (download) - annotate - [select for diffs], Sat Sep 9 16:41:04 2023 UTC (6 months, 2 weeks ago) by sjg
Branch: MAIN
Changes since 1.340: +2 -1 lines
Diff to previous 1.340 (colored) to selected 1.41 (colored)

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

Revision 1.340 / (download) - annotate - [select for diffs], Thu Aug 17 18:48:32 2023 UTC (7 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.339: +2 -1 lines
Diff to previous 1.339 (colored) to selected 1.41 (colored)

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

Revision 1.339 / (download) - annotate - [select for diffs], Tue Jun 20 09:25:34 2023 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.338: +2 -1 lines
Diff to previous 1.338 (colored) to selected 1.41 (colored)

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

This style is used by FreeBSD, among others.

Revision 1.338 / (download) - annotate - [select for diffs], Fri Jun 16 09:25:13 2023 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.337: +7 -1 lines
Diff to previous 1.337 (colored) to selected 1.41 (colored)

tests/make: add test for multiple-inclusion guards

Revision 1.337 / (download) - annotate - [select for diffs], Fri Jun 16 07:20:45 2023 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.336: +1 -2 lines
Diff to previous 1.336 (colored) to selected 1.41 (colored)

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

Revision 1.336 / (download) - annotate - [select for diffs], Thu Jun 1 07:27:30 2023 UTC (9 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.335: +1 -2 lines
Diff to previous 1.335 (colored) to selected 1.41 (colored)

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

Revision 1.335 / (download) - annotate - [select for diffs], Wed May 10 13:03:06 2023 UTC (10 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.334: +1 -2 lines
Diff to previous 1.334 (colored) to selected 1.41 (colored)

tests/make: clean up tests for .for loops

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

Revision 1.334 / (download) - annotate - [select for diffs], Tue May 9 20:14:27 2023 UTC (10 months, 3 weeks ago) by sjg
Branch: MAIN
Changes since 1.333: +2 -1 lines
Diff to previous 1.333 (colored) to selected 1.41 (colored)

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.

Revision 1.333 / (download) - annotate - [select for diffs], Sat Feb 25 19:30:32 2023 UTC (13 months ago) by sjg
Branch: MAIN
Changes since 1.332: +19 -18 lines
Diff to previous 1.332 (colored) to selected 1.41 (colored)

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.

Revision 1.332 / (download) - annotate - [select for diffs], Thu Feb 23 05:20:45 2023 UTC (13 months ago) by sjg
Branch: MAIN
Changes since 1.331: +19 -10 lines
Diff to previous 1.331 (colored) to selected 1.41 (colored)

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

Revision 1.331 / (download) - annotate - [select for diffs], Tue Jan 24 00:24:02 2023 UTC (14 months ago) by sjg
Branch: MAIN
Changes since 1.330: +3 -2 lines
Diff to previous 1.330 (colored) to selected 1.41 (colored)

make: .SYSPATH: to add dirs to sysIncPath

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

Reviewed by: rillig

Revision 1.330 / (download) - annotate - [select for diffs], Mon Jan 23 23:01:52 2023 UTC (14 months ago) by sjg
Branch: MAIN
Changes since 1.329: +2 -1 lines
Diff to previous 1.329 (colored) to selected 1.41 (colored)

make: .[NO]READONLY for control of read-only variables

Reviewed by: rillig

Revision 1.329 / (download) - annotate - [select for diffs], Thu Jan 19 23:26:14 2023 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.328: +1 -5 lines
Diff to previous 1.328 (colored) to selected 1.41 (colored)

tests/make: rename files that are not test cases

Revision 1.328 / (download) - annotate - [select for diffs], Thu Jan 19 19:55:27 2023 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.327: +4 -1 lines
Diff to previous 1.327 (colored) to selected 1.41 (colored)

tests/make: add tests for whitespace in leading '@+-'

Revision 1.327 / (download) - annotate - [select for diffs], Sun Sep 25 12:32:56 2022 UTC (18 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
Changes since 1.326: +2 -2 lines
Diff to previous 1.326 (colored) to selected 1.41 (colored)

tests/make: fix test for option '-e' (broken since 2022-01-23)

Revision 1.326 / (download) - annotate - [select for diffs], Sat Sep 10 16:20:04 2022 UTC (18 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.325: +5 -3 lines
Diff to previous 1.325 (colored) to selected 1.41 (colored)

tests/make: be more specific about the egrep compatibility

Revision 1.325 / (download) - annotate - [select for diffs], Fri Sep 9 18:36:15 2022 UTC (18 months, 2 weeks ago) by sjg
Branch: MAIN
Changes since 1.324: +11 -2 lines
Diff to previous 1.324 (colored) to selected 1.41 (colored)

Handle deprecation of egrep

Revision 1.324 / (download) - annotate - [select for diffs], Sat Sep 3 15:03:32 2022 UTC (18 months, 3 weeks ago) by sjg
Branch: MAIN
Changes since 1.323: +3 -2 lines
Diff to previous 1.323 (colored) to selected 1.41 (colored)

Only update distrib/sets/lists/tests/mi with valid files

sync-mi: use CVS/Entries to ensure we only update
distrib/sets/lists/tests/mi with files known to CVS.

Reviewed by: rillig

Revision 1.323 / (download) - annotate - [select for diffs], Fri Sep 2 18:54:25 2022 UTC (18 months, 3 weeks ago) by sjg
Branch: MAIN
Changes since 1.322: +3 -2 lines
Diff to previous 1.322 (colored) to selected 1.41 (colored)

Enable make/unit-tests/directive-for-break

Also ensure MAKE_VERSION is ignored.

Revision 1.322 / (download) - annotate - [select for diffs], Fri Sep 2 16:24:31 2022 UTC (18 months, 3 weeks ago) by sjg
Branch: MAIN
Changes since 1.321: +2 -1 lines
Diff to previous 1.321 (colored) to selected 1.41 (colored)

make: add .break to terminate .for loop early

When .break is encountered within a .for loop
it causes immediate termination.

Outside of a .for loop .break causes a parse error.

Reviewed by: christos

Revision 1.321 / (download) - annotate - [select for diffs], Thu Aug 25 06:23:38 2022 UTC (19 months ago) by rillig
Branch: MAIN
Changes since 1.320: +4 -2 lines
Diff to previous 1.320 (colored) to selected 1.41 (colored)

tests/make: fix canonicalization for single-digit day of month

Revision 1.320 / (download) - annotate - [select for diffs], Wed Aug 24 22:09:41 2022 UTC (19 months ago) by rillig
Branch: MAIN
Changes since 1.319: +5 -1 lines
Diff to previous 1.319 (colored) to selected 1.41 (colored)

make: prevent future out-of-bounds errors when parsing expressions

A modifier in an expression ends not only at the next ':' or at the
closing '}' or ')', but also at the end of the string.

Previously, testing for the end of the string had been done separately,
which was error-prone since 2006-05-11, when indirect modifiers were
introduced.  Since then, it was possible that the string terminator '\0'
was accidentally skipped in cases where the loop condition only tested
for the ending character.  When parsing indirect modifiers, the ending
character is indeed '\0', but when parsing direct modifiers, it is '}'
or ')'.

A welcome side effect is that in the case of unclosed expressions such
as '${VAR:Modifier', the amount of error messages is reduced from 2 or 3
to only 1.  The removed error messages were wrong and thus confusing
anyway.

Revision 1.319 / (download) - annotate - [select for diffs], Tue Jul 26 19:32:25 2022 UTC (20 months ago) by sjg
Branch: MAIN
Changes since 1.318: +2 -1 lines
Diff to previous 1.318 (colored) to selected 1.41 (colored)

Pass MAKEOBJDIR to opt-m-include-dir

Prevent makeing opt-m-include-dir.tmp in src tree.

Reviewed by: rillig

Revision 1.318 / (download) - annotate - [select for diffs], Fri Jun 10 21:28:50 2022 UTC (21 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.317: +2 -2 lines
Diff to previous 1.317 (colored) to selected 1.41 (colored)

tests/make: reword comment in Makefile to be more specific

Revision 1.317 / (download) - annotate - [select for diffs], Thu Jun 2 07:34:39 2022 UTC (21 months, 4 weeks ago) by skrll
Branch: MAIN
Changes since 1.316: +2 -2 lines
Diff to previous 1.316 (colored) to selected 1.41 (colored)

Increase the resource limit so these tests pass on hppa.

LGTM from Roland

Revision 1.316 / (download) - annotate - [select for diffs], Mon May 23 22:33:56 2022 UTC (22 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.315: +2 -1 lines
Diff to previous 1.315 (colored) to selected 1.41 (colored)

tests/make: document and demonstrate .for i containing .if empty(i)

PR bin/43821 describes the inconsistency that in a '.for i' loop, the
condition '.if ${i:M*.c}' works since 2009 while the seemingly
equivalent condition '.if !empty(i:M*.c)' does not access the variable
'i' from the .for loop but instead the global 'i'.

Resolving this situation in a backwards-compatible and non-surprising
way is hard, as make has grown several features during the last 20 years
that interact in various edge cases.  For now, document the most obvious
pitfalls.

Revision 1.315 / (download) - annotate - [select for diffs], Sun May 8 10:20:49 2022 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.314: +1 -2 lines
Diff to previous 1.314 (colored) to selected 1.41 (colored)

tests/make: remove test varquote

The test varmod-quote-dollar covers the same topic.

Revision 1.314 / (download) - annotate - [select for diffs], Sun May 8 06:51:27 2022 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.313: +1 -2 lines
Diff to previous 1.313 (colored) to selected 1.41 (colored)

tests/make: migrate cond1 test to other, more specific tests

The tests in cond1 were a mixture of "everything related to conditions",
and the test cases were heavily dependent on each other, which made them
hard to understand.  Move each test case to its corresponding
special-purpose test.

Revision 1.313 / (download) - annotate - [select for diffs], Sat May 7 17:49:47 2022 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.312: +3 -1 lines
Diff to previous 1.312 (colored) to selected 1.41 (colored)

make: allow to randomize build order of targets

In complex dependency structures, when a build fails, a probable cause
is a missing dependency declaration between some files.  In compat mode,
the build order is deterministic, in jobs mode, it is somewhat
deterministic.  To explore more edge cases, add the line ".MAKE.MODE +=
randomize-targets" somewhere in the makefile.

Fixes PR bin/45226 by riastradh.  Reviewed by christos.

Revision 1.312 / (download) - annotate - [select for diffs], Mon Apr 18 15:06:28 2022 UTC (23 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.311: +2 -1 lines
Diff to previous 1.311 (colored) to selected 1.41 (colored)

make: only switch to POSIX mode if '.POSIX:' is the first line

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
says that in order to make a makefile POSIX-conforming, its first
non-comment line must be the special dependency line '.POSIX:' without
any source dependencies.

Previously, make switched to POSIX mode even if such a line occurred
anywhere else, which was allowed by POSIX but was deep in the
"unspecified behavior" area.  For NetBSD make, there is no big
difference since it doesn't ship any <posix.mk> file, this change mainly
affects the bmake distribution.

Previously, makefiles that contain '.POSIX:' somewhere in the middle
could fail due to <posix.mk> resetting .SUFFIXES, among other things.

Suggested by Simon J. Gerraty, who also reviewed an earlier version of
this change.

Revision 1.311 / (download) - annotate - [select for diffs], Sat Mar 26 12:44:57 2022 UTC (2 years ago) by rillig
Branch: MAIN
Changes since 1.310: +2 -1 lines
Diff to previous 1.310 (colored) to selected 1.41 (colored)

make: fix crash on .undef of an environment variable (since 2020-10-06)

Revision 1.310 / (download) - annotate - [select for diffs], Fri Mar 25 22:38:39 2022 UTC (2 years ago) by rillig
Branch: MAIN
Changes since 1.309: +8 -4 lines
Diff to previous 1.309 (colored) to selected 1.41 (colored)

tests/make: suppress -DCLEANUP output in test deptgt-phony

Revision 1.309 / (download) - annotate - [select for diffs], Sat Feb 12 13:17:57 2022 UTC (2 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.308: +2 -1 lines
Diff to previous 1.308 (colored) to selected 1.41 (colored)

tests/make: document the history of bugs in '-k' mode

Reported in PR#49720 in 2015, fixed independently in compat.c 1.199 from
2020-12-07.

Revision 1.308 / (download) - annotate - [select for diffs], Sat Feb 12 01:15:18 2022 UTC (2 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.307: +2 -1 lines
Diff to previous 1.307 (colored) to selected 1.41 (colored)

tests/make: demonstrate bug for .SILENT in jobs mode (since 2003)

Reported 2011 in PR#45356.

Revision 1.307 / (download) - annotate - [select for diffs], Wed Feb 9 21:24:29 2022 UTC (2 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.306: +2 -2 lines
Diff to previous 1.306 (colored) to selected 1.41 (colored)

tests/make: remove redundant 'echo' from variable assignments

Before main.c 1.231 from 2014-09-09, a variable assignment using the
operator '!=' generated a warning "Couldn't read shell's output" if the
output of the command was empty.  The simplest way to suppress this
wrong warning was to add an empty 'echo' to the command.  This hack is
no longer needed.

Revision 1.306 / (download) - annotate - [select for diffs], Wed Feb 9 21:09:24 2022 UTC (2 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.305: +2 -2 lines
Diff to previous 1.305 (colored) to selected 1.41 (colored)

make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.

Revision 1.305 / (download) - annotate - [select for diffs], Wed Feb 9 20:52:06 2022 UTC (2 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.304: +1 -2 lines
Diff to previous 1.304 (colored) to selected 1.41 (colored)

make: prefix the warning about read-only .OBJDIR with a colon

For consistency with the other warnings.

Revision 1.304 / (download) - annotate - [select for diffs], Wed Feb 9 18:54:19 2022 UTC (2 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.303: +2 -2 lines
Diff to previous 1.303 (colored) to selected 1.41 (colored)

tests/make: use more distinctive placeholder for TMPDIR

Revision 1.303 / (download) - annotate - [select for diffs], Mon Feb 7 22:43:50 2022 UTC (2 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.302: +2 -1 lines
Diff to previous 1.302 (colored) to selected 1.41 (colored)

tests/make: demonstrate combination of .USE with transformation rule

Reported in 2003 in PR toolchain/20993.  Linking a transformation rule
with .USE or .USEBEFORE node makes the transformation rule fail.

Revision 1.302 / (download) - annotate - [select for diffs], Thu Jan 27 21:50:50 2022 UTC (2 years, 2 months ago) by sjg
Branch: MAIN
Changes since 1.301: +2 -1 lines
Diff to previous 1.301 (colored) to selected 1.41 (colored)

numEntries can vary

Revision 1.301 / (download) - annotate - [select for diffs], Thu Jan 27 02:24:46 2022 UTC (2 years, 2 months ago) by sjg
Branch: MAIN
Changes since 1.300: +2 -1 lines
Diff to previous 1.300 (colored) to selected 1.41 (colored)

Do not allow /usr/obj to cause failure.

Revision 1.300 / (download) - annotate - [select for diffs], Sun Jan 23 18:00:53 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.299: +1 -2 lines
Diff to previous 1.299 (colored) to selected 1.41 (colored)

tests/make: migrate modts to varmod-to-separator and explain

Revision 1.299 / (download) - annotate - [select for diffs], Sun Jan 23 16:25:54 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.298: +7 -7 lines
Diff to previous 1.298 (colored) to selected 1.41 (colored)

tests/make: rename var-class to var-scope

There is no such concept as a "variable class" in make, these tests
focus on the variable scope instead.

Revision 1.298 / (download) - annotate - [select for diffs], Sun Jan 23 16:09:38 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.297: +1 -3 lines
Diff to previous 1.297 (colored) to selected 1.41 (colored)

tests/make: extend test suite, move old tests to 2020 scheme

The tests from envfirst.mk are now in opt-env.mk.
The tests from modword.mk are now in varmod-select-words.mk.

Revision 1.297 / (download) - annotate - [select for diffs], Sat Jan 22 16:23:56 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.296: +1 -2 lines
Diff to previous 1.296 (colored) to selected 1.41 (colored)

tests/make: explore edge cases involving .ifmake

Revision 1.296 / (download) - annotate - [select for diffs], Wed Jan 19 22:10:41 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.295: +2 -1 lines
Diff to previous 1.295 (colored) to selected 1.41 (colored)

tests/make: demonstrate wrong location in diagnostic (since 2018-12-22)

When a target has multiple places where commands are defined, the
diagnostics mixed up the filename in some cases.

Revision 1.295 / (download) - annotate - [select for diffs], Tue Jan 11 19:47:34 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.294: +1 -2 lines
Diff to previous 1.294 (colored) to selected 1.41 (colored)

tests/make: clean up after test for option '-dF'

When the file for the debug log cannot be opened, make exits
immediately.  This doesn't give the test a chance to clean up the
temporary log file.

Instead of trying to treat a regular file as a directory and create a
file in it, assume that the directory /nonexistent-$uuid is actually
nonexistent.  This leads to the same kind of error message, independent
of strerror(3).

Revision 1.294 / (download) - annotate - [select for diffs], Sun Jan 9 20:53:53 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.293: +4 -1 lines
Diff to previous 1.293 (colored) to selected 1.41 (colored)

tests/make: add placeholders for .PARSEDIR and .INCLUDEDFROMDIR

When run via 'cd usr.bin/make/unit-tests && make test', the tests are in
the current directory.  When run via ATF, the tests are in
/usr/tests/usr.bin/make/unit-tests, while the current directory is a
temporary directory.  Allow both variants, plus others that may occur in
the bmake distribution.

Revision 1.293 / (download) - annotate - [select for diffs], Tue Dec 28 01:04:03 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.292: +2 -1 lines
Diff to previous 1.292 (colored) to selected 1.41 (colored)

tests/make: clean up after test 'opt-debug-file'

Revision 1.292 / (download) - annotate - [select for diffs], Tue Dec 28 00:56:17 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.291: +2 -1 lines
Diff to previous 1.291 (colored) to selected 1.41 (colored)

tests/make: document inconsistencies between '!=' and '::!='

Found while trying to make the error messages from Cmd_Exec more
detailed.

Revision 1.291 / (download) - annotate - [select for diffs], Thu Dec 23 11:05:59 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.290: +2 -1 lines
Diff to previous 1.290 (colored) to selected 1.41 (colored)

tests/make: explain the current behavior of the option '--version'

Revision 1.290 / (download) - annotate - [select for diffs], Tue Dec 14 00:02:57 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.289: +2 -1 lines
Diff to previous 1.289 (colored) to selected 1.41 (colored)

make: remove unreachable code for parsing the dependency operator

At the point where ParseDependencyOp is called, cp is guaranteed to
point to either ':' or '!'.

No functional change.

Revision 1.289 / (download) - annotate - [select for diffs], Mon Dec 13 23:38:54 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.288: +2 -1 lines
Diff to previous 1.288 (colored) to selected 1.41 (colored)

tests/make: extend tests for parsing makefiles

Revision 1.288 / (download) - annotate - [select for diffs], Sun Dec 12 22:16:48 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.287: +2 -2 lines
Diff to previous 1.287 (colored) to selected 1.41 (colored)

tests/make: test and document the newly added "variable" .SUFFIXES

Revision 1.287 / (download) - annotate - [select for diffs], Thu Dec 9 20:47:33 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.286: +3 -2 lines
Diff to previous 1.286 (colored) to selected 1.41 (colored)

make: add back support for jemalloc 100

The ports sun2 and vax default to jemalloc 100, as opposed to the rest
of the ports, which use jemalloc 510.  Some developers choose to use
jemalloc 100, so let them run the tests with memory debugging as well.

Suggested by mrg on source-changes-d.

Revision 1.286 / (download) - annotate - [select for diffs], Sun Dec 5 15:20:13 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.285: +2 -1 lines
Diff to previous 1.285 (colored) to selected 1.41 (colored)

make: fix use-after-free in modifier ':@'

Without memory allocator debugging, the newly added test doesn't show
any obvious failure.

With memory allocator debugging enabled, all make versions since
2016.02.27.16.20.06 crash with a segmentation fault.

Revision 1.285 / (download) - annotate - [select for diffs], Sun Dec 5 14:57:36 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.284: +2 -2 lines
Diff to previous 1.284 (colored) to selected 1.41 (colored)

tests/make: migrate to jemalloc > 100

When I started working on usr.bin/make in 2020, I used NetBSD 8, which
used jemalloc 100.

After updating to NetBSD 8 to 9.99.x, the debugging options for jemalloc
stopped working since MALLOC_OPTIONS had been replaced with MALLOC_CONF
in 2019.

Enable malloc debugging again, to reliably reproduce the use-after-free
for the variable modifier ':@'.

Revision 1.284 / (download) - annotate - [select for diffs], Tue Oct 19 15:59:26 2021 UTC (2 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.283: +10 -6 lines
Diff to previous 1.283 (colored) to selected 1.41 (colored)

Replace ${.OBJDIR} with <curdir> for consistent results.

If we replace ${.OBJDIR} with <objdir> some tests produce
different results depending on the value of .OBJDIR

For similar reasons eliminate .OBJDIR and .PATH from output of
varname-empty

Reviewed by: rillig

Revision 1.283 / (download) - annotate - [select for diffs], Mon Aug 30 17:08:13 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.282: +2 -1 lines
Diff to previous 1.282 (colored) to selected 1.41 (colored)

tests/make: explain where "${var}" in .for loops comes from

Revision 1.282 / (download) - annotate - [select for diffs], Sat Jul 31 20:55:46 2021 UTC (2 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.281: +2 -1 lines
Diff to previous 1.281 (colored) to selected 1.41 (colored)

tests/make: split tests for the variable modifier ':O'

The tests for parse errors are now in varmod-order, which lets the other
tests focus on the desired behavior of the modifiers.

Revision 1.281 / (download) - annotate - [select for diffs], Fri Jul 30 19:55:22 2021 UTC (2 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.280: +2 -1 lines
Diff to previous 1.280 (colored) to selected 1.41 (colored)

Add :On for numeric sort

Reviewed by: christos rillig

Revision 1.280 / (download) - annotate - [select for diffs], Tue Jun 29 00:35:23 2021 UTC (2 years, 9 months ago) by sjg
Branch: MAIN
Changes since 1.279: +7 -1 lines
Diff to previous 1.279 (colored) to selected 1.41 (colored)

Allow BROKEN_TESTS to cause TESTS to be skipped.

Some tests simply do not work in some environments.
Eg. shell-ksh on macos/arm64
Allow local site to set BROKEN_TESTS to skip those they know
will not work.

Reviewed by: rillig

Revision 1.279 / (download) - annotate - [select for diffs], Wed Jun 16 09:39:48 2021 UTC (2 years, 9 months ago) by rillig
Branch: MAIN
Changes since 1.278: +2 -1 lines
Diff to previous 1.278 (colored) to selected 1.41 (colored)

tests/make: demonstrate wrong error handling in jobs mode

Revision 1.278 / (download) - annotate - [select for diffs], Tue May 18 17:05:45 2021 UTC (2 years, 10 months ago) by sjg
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1
Changes since 1.277: +2 -1 lines
Diff to previous 1.277 (colored) to selected 1.41 (colored)

Do not trust that /nonexistent does not exist

Use /nonexistent.${.MAKE.PID} to avoid failure when
/nonexistent actually exists.

Revision 1.277 / (download) - annotate - [select for diffs], Tue Apr 27 16:20:06 2021 UTC (2 years, 11 months ago) by rillig
Branch: MAIN
CVS Tags: cjep_staticlib_x-base
Branch point for: cjep_staticlib_x
Changes since 1.276: +2 -1 lines
Diff to previous 1.276 (colored) to selected 1.41 (colored)

tests/make: test the combination of -de with -j1

The test cases are the same as in opt-debug-errors.mk.  The output
differs in several details though.

Even though the option '-k' is given (which is the default for any tests
that don't override it in unit-tests/Makefile), there is no message
"(continuing)" anywhere.

The failed target is printed twice.  Once before the failed commands,
once after.  This redundancy is not necessary and may be removed in a
follow-up commit.

The printed commands are in their unexpanded form, which may or may not
be more helpful than the expanded and space-normalized form of compat
mode.  Either way, this is an unnecessary inconsistency between compat
mode and jobs mode.

In jobs mode, the message "make: stopped in $dir" is printed for each
failure, which is helpful since each of the jobs may have started in a
separate directory.

Revision 1.276 / (download) - annotate - [select for diffs], Thu Apr 15 19:02:29 2021 UTC (2 years, 11 months ago) by rillig
Branch: MAIN
Changes since 1.275: +2 -1 lines
Diff to previous 1.275 (colored) to selected 1.41 (colored)

tests/make: demonstrate handling of null bytes

Revision 1.275 / (download) - annotate - [select for diffs], Sun Apr 4 13:20:52 2021 UTC (2 years, 11 months ago) by rillig
Branch: MAIN
Changes since 1.274: +2 -1 lines
Diff to previous 1.274 (colored) to selected 1.41 (colored)

tests/make: split test for modifier ':@' into separate files

The file varmod-loop.mk has grown too large to be single-purpose, plus
it combined parse-time and run-time tests.  This has the downside that
as soon as a parse-time test results in an error, the run-time tests are
not run anymore.

Revision 1.274 / (download) - annotate - [select for diffs], Sat Apr 3 11:08:40 2021 UTC (2 years, 11 months ago) by rillig
Branch: MAIN
Changes since 1.273: +3 -3 lines
Diff to previous 1.273 (colored) to selected 1.41 (colored)

make: use C99 bool type instead of defining its own

No functional change.

Revision 1.273 / (download) - annotate - [select for diffs], Sun Mar 14 11:49:37 2021 UTC (3 years ago) by rillig
Branch: MAIN
Changes since 1.272: +2 -1 lines
Diff to previous 1.272 (colored) to selected 1.41 (colored)

tests/make: add test for short-circuit evaluation of modifiers

Revision 1.272 / (download) - annotate - [select for diffs], Sun Mar 14 10:45:51 2021 UTC (3 years ago) by rillig
Branch: MAIN
Changes since 1.271: +8 -3 lines
Diff to previous 1.271 (colored) to selected 1.41 (colored)

make: demonstrate wrong expression evaluation in -dL mode

Revision 1.271 / (download) - annotate - [select for diffs], Sun Feb 14 20:16:17 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.270: +2 -1 lines
Diff to previous 1.270 (colored) to selected 1.41 (colored)

make: add test for the variable modifier ':sh'

Revision 1.270 / (download) - annotate - [select for diffs], Sun Feb 14 13:24:45 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.269: +4 -2 lines
Diff to previous 1.269 (colored) to selected 1.41 (colored)

make: fix TMPDIR in unit-tests

Combining the assignment operator ':=' with the variable modifier ':U'
on the same variable does not work as intended.  At the point where the
':U' is evaluated, the variable is guaranteed to be defined because the
code in VarAssign_EvalSubst says so.

Revision 1.269 / (download) - annotate - [select for diffs], Sat Feb 6 18:26:03 2021 UTC (3 years, 1 month ago) by sjg
Branch: MAIN
Changes since 1.268: +19 -10 lines
Diff to previous 1.268 (colored) to selected 1.41 (colored)

Avoid test failures when more than one user run them.

Use a private  TMPDIR
a subdir of .OBJDIR if using it
otherwise /tmp/uid${.MAKE.UID}

Revision 1.268 / (download) - annotate - [select for diffs], Thu Feb 4 00:16:03 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.267: +2 -1 lines
Diff to previous 1.267 (colored) to selected 1.41 (colored)

make: remove .PARSEDIR from test output of varname-empty

The .PARSEDIR has nothing to do with .CURDIR.  This wrong assumption
made the NetBSD test suite fail since the actual .PARSEDIR was not
replaced with "<curdir>".

Revision 1.267 / (download) - annotate - [select for diffs], Wed Feb 3 08:34:15 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.266: +3 -2 lines
Diff to previous 1.266 (colored) to selected 1.41 (colored)

make: in the test varname-empty, keep more debug output

Filtering out the interesting lines based on the very specific pattern
"Var_Set" was surprising.

Revision 1.266 / (download) - annotate - [select for diffs], Tue Feb 2 17:27:35 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.265: +8 -1 lines
Diff to previous 1.265 (colored) to selected 1.41 (colored)

make: demonstrate that neither -dg2 nor -dg3 produces debug output

Revision 1.265 / (download) - annotate - [select for diffs], Mon Feb 1 20:31:41 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.264: +2 -1 lines
Diff to previous 1.264 (colored) to selected 1.41 (colored)

make: add test for reading from make's stdin

Just out of curiosity whether that really works.  It does.

Revision 1.264 / (download) - annotate - [select for diffs], Sat Jan 30 12:46:38 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.263: +2 -1 lines
Diff to previous 1.263 (colored) to selected 1.41 (colored)

make(1): add test for combining the options -j, -n, -t

This is a preparation for refactoring the complicated condition in
JobStart.

Revision 1.263 / (download) - annotate - [select for diffs], Fri Jan 29 22:38:17 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.262: +2 -1 lines
Diff to previous 1.262 (colored) to selected 1.41 (colored)

make(1): demonstrate unnecessary creation of empty files in jobs mode

Revision 1.262 / (download) - annotate - [select for diffs], Sat Jan 23 07:34:00 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.261: +13 -5 lines
Diff to previous 1.261 (colored) to selected 1.41 (colored)

make(1): fix unit tests for dash and bash 5.1

Revision 1.261 / (download) - annotate - [select for diffs], Tue Jan 19 05:49:33 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.260: +23 -5 lines
Diff to previous 1.260 (colored) to selected 1.41 (colored)

make(1): normalize shell error messages in tests

Newly supported is bash, which outputs "bash: line 123".

Revision 1.260 / (download) - annotate - [select for diffs], Thu Dec 31 03:05:12 2020 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.259: +3 -1 lines
Diff to previous 1.259 (colored) to selected 1.41 (colored)

make(1): add test for error handling and expansion in .for loops

Revision 1.259 / (download) - annotate - [select for diffs], Wed Dec 30 14:50:08 2020 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.258: +2 -1 lines
Diff to previous 1.258 (colored) to selected 1.41 (colored)

make(1): add test for .endfor without corresponding .for

Revision 1.258 / (download) - annotate - [select for diffs], Tue Dec 29 01:45:06 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.257: +2 -1 lines
Diff to previous 1.257 (colored) to selected 1.41 (colored)

make(1): add test that explains how variables are exported

Exporting the variables at the right time and with the correct values is
a subtle issue.  The current implementation carefully marks variables as
ready to be exported, then exports them and at the same time tries to
export as few variables as possible, to avoid memory leaks.  This test
describes and explains how all this works in detail.

This test also justifies that the call to Var_ReexportVars happens in
the make process itself, not in the child processes, no matter whether
these are created with vfork or (only theoretically) with plain fork.
This has changed in compat.c 1.217, job.c 1.390 and main.c 1.504 from
2020-12-27.

Revision 1.257 / (download) - annotate - [select for diffs], Sun Dec 27 05:11:40 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.256: +2 -1 lines
Diff to previous 1.256 (colored) to selected 1.41 (colored)

make(1): add test for expansion errors in jobs mode

Since compat mode and jobs mode are implemented separately and vary in
lots of small details, each of them needs to be tested on its own.

Revision 1.256 / (download) - annotate - [select for diffs], Mon Dec 21 20:47:29 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.255: +1 -4 lines
Diff to previous 1.255 (colored) to selected 1.41 (colored)

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.

Revision 1.255 / (download) - annotate - [select for diffs], Mon Dec 21 20:35:17 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.254: +1 -4 lines
Diff to previous 1.254 (colored) to selected 1.41 (colored)

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.

Revision 1.254 / (download) - annotate - [select for diffs], Mon Dec 21 18:22:31 2020 UTC (3 years, 3 months ago) by sjg
Branch: MAIN
Changes since 1.253: +4 -3 lines
Diff to previous 1.253 (colored) to selected 1.41 (colored)

Set default for .MAKE.OS once

Revision 1.253 / (download) - annotate - [select for diffs], Sun Dec 20 19:37:23 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.252: +1 -2 lines
Diff to previous 1.252 (colored) to selected 1.41 (colored)

make(1): include line numbers in output of test varmod-edge.mk

Suppressing the line numbers does not provide much benefit, given that
the test file doesn't change often.

Revision 1.252 / (download) - annotate - [select for diffs], Sat Dec 19 16:00:17 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.251: +2 -1 lines
Diff to previous 1.251 (colored) to selected 1.41 (colored)

make(1): add test for null byte in .for loop body

Revision 1.251 / (download) - annotate - [select for diffs], Sat Dec 19 12:14:59 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.250: +2 -1 lines
Diff to previous 1.250 (colored) to selected 1.41 (colored)

make(1): demonstrate wrong line numbers in .for loops, since 2007-01-01

Revision 1.250 / (download) - annotate - [select for diffs], Mon Dec 14 20:23:50 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.249: +2 -1 lines
Diff to previous 1.249 (colored) to selected 1.41 (colored)

make(1): add test for parsing the end of a condition

Revision 1.249 / (download) - annotate - [select for diffs], Sun Dec 13 17:44:31 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.248: +2 -1 lines
Diff to previous 1.248 (colored) to selected 1.41 (colored)

make(1): demonstrate wrong error handling in compat mode

Revision 1.248 / (download) - annotate - [select for diffs], Sun Dec 13 05:13:38 2020 UTC (3 years, 3 months ago) by sjg
Branch: MAIN
Changes since 1.247: +2 -3 lines
Diff to previous 1.247 (colored) to selected 1.41 (colored)

Prune job debug output that may appear out of order.

A race between child and parent means that we cannot
guarantee whether all child output is seen before we call
JobClosePipes, thus intervening debug output can appear
before or after the last child output.

Revision 1.247 / (download) - annotate - [select for diffs], Sun Dec 13 02:09:33 2020 UTC (3 years, 3 months ago) by sjg
Branch: MAIN
Changes since 1.246: +5 -2 lines
Diff to previous 1.246 (colored) to selected 1.41 (colored)

Ensure we have a value for .MAKE.UID

Revision 1.246 / (download) - annotate - [select for diffs], Sun Dec 13 00:46:25 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.245: +2 -1 lines
Diff to previous 1.245 (colored) to selected 1.41 (colored)

make(1): add test for misspelled directives

This test allows the other directive-* tests to focus on the purpose of
the individual directive, allowing these tests to continue after
parsing, without errors.

Revision 1.245 / (download) - annotate - [select for diffs], Sat Dec 12 15:06:11 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.244: +13 -2 lines
Diff to previous 1.244 (colored) to selected 1.41 (colored)

make(1): add test for a shell with error control

None of the predefined shells has error control, and the corresponding
code had not been covered by the existing unit tests.

Revision 1.244 / (download) - annotate - [select for diffs], Thu Dec 10 17:06:13 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.243: +3 -1 lines
Diff to previous 1.243 (colored) to selected 1.41 (colored)

make(1): test all combinations of switches for running commands

The code in JobPrintSpecials is rather complicated and contains
surprising interaction between some of the switches.

To see the exact effects of the switches, record the current state and
its output, to prevent accidental breakage during the upcoming
refactorings.

Revision 1.243 / (download) - annotate - [select for diffs], Wed Dec 9 08:18:35 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.242: +10 -5 lines
Diff to previous 1.242 (colored) to selected 1.41 (colored)

make(1): remove noise from test output of opt-jobs-no-action

Revision 1.242 / (download) - annotate - [select for diffs], Wed Dec 9 07:57:52 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.241: +6 -1 lines
Diff to previous 1.241 (colored) to selected 1.41 (colored)

make(1): add test for the -n option combined with RunFlags

Revision 1.241 / (download) - annotate - [select for diffs], Wed Dec 9 00:25:00 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.240: +2 -1 lines
Diff to previous 1.240 (colored) to selected 1.41 (colored)

make(1): add test for combining -j1 with -n

Revision 1.240 / (download) - annotate - [select for diffs], Mon Dec 7 22:27:56 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.239: +6 -2 lines
Diff to previous 1.239 (colored) to selected 1.41 (colored)

make(1): normalize output of test sh-dots for non-native mode

Revision 1.239 / (download) - annotate - [select for diffs], Mon Dec 7 21:35:43 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.238: +1 -2 lines
Diff to previous 1.238 (colored) to selected 1.41 (colored)

make(1): add tests and tutorial for the ?= assignment operator

Revision 1.238 / (download) - annotate - [select for diffs], Mon Dec 7 01:32:04 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.237: +2 -1 lines
Diff to previous 1.237 (colored) to selected 1.41 (colored)

make(1): add test for wrong exit status 0 after failed targets with -k

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

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

Revision 1.236 / (download) - annotate - [select for diffs], Sat Dec 5 03:42:15 2020 UTC (3 years, 3 months ago) by sjg
Branch: MAIN
Changes since 1.235: +2 -2 lines
Diff to previous 1.235 (colored) to selected 1.41 (colored)

Use .MAKE.OS if we can

Revision 1.235 / (download) - annotate - [select for diffs], Fri Dec 4 14:28:50 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.234: +6 -12 lines
Diff to previous 1.234 (colored) to selected 1.41 (colored)

make(1): use fixed format for debug output of the directory cache

The previous output format had a %-20s conversion specifier.  This
produced different output depending on the length of the pathname, which
was too difficult to normalize.  By moving the directory name to the
end, it is no longer necessary to fill up any space, and the numbers are
always aligned properly.

As a result, 3 of the unit tests no longer need any special
postprocessing of their output.

Revision 1.234 / (download) - annotate - [select for diffs], Tue Dec 1 22:16:36 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.233: +2 -1 lines
Diff to previous 1.233 (colored) to selected 1.41 (colored)

make(1): add test and tutorial for indirect modifiers

Revision 1.233 / (download) - annotate - [select for diffs], Tue Dec 1 20:37:30 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.232: +2 -1 lines
Diff to previous 1.232 (colored) to selected 1.41 (colored)

make(1): add test for the special .MAKEFLAGS variable

Revision 1.232 / (download) - annotate - [select for diffs], Tue Dec 1 17:50:04 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.231: +11 -5 lines
Diff to previous 1.231 (colored) to selected 1.41 (colored)

make(1): add tests for suppressing "stopped in"

These tests demonstrate the unwanted behavior described in PR bin/55578
and PR bin/55832.

Revision 1.231 / (download) - annotate - [select for diffs], Mon Nov 30 21:10:15 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.230: +8 -2 lines
Diff to previous 1.230 (colored) to selected 1.41 (colored)

make(1): fix tests for :gmtime and :localtime for 32-bit time_t

https://bugs.freebsd.org/251465

Revision 1.230 / (download) - annotate - [select for diffs], Mon Nov 30 18:32:49 2020 UTC (3 years, 3 months ago) by sjg
Branch: MAIN
Changes since 1.229: +2 -1 lines
Diff to previous 1.229 (colored) to selected 1.41 (colored)

Add some tests for meta mode

Revision 1.229 / (download) - annotate - [select for diffs], Sun Nov 29 18:49:36 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.228: +2 -2 lines
Diff to previous 1.228 (colored) to selected 1.41 (colored)

make(1): clean up memory management for CachedDirs

Previously, the reference count for a newly created CacheDir had been
set to 1 in CacheNewDir.  This was wrong because at that point, the
object had not been referenced by any nonlocal variable.  The reference
count is no longer incremented at this point.

All callers of CacheNewDir either append the newly created CachedDir to
a SearchPath via Lst_Append and CachedDir_Ref, or they assign it to a
global variable via CachedDir_Assign.

Since the reference count is no longer wrongly incremented, it does not
need to be decremented more than necessary in Dir_End.  To keep the code
simple and maintainable, all assignments to global variables are now
handled by CachedDir_Assign.  Adding a CachedDir to a list is still done
manually via Lst_Append, and the corresponding code for decrementing is
in SearchPath_Clean and SearchPath_Free.  These details may be cleaned
up in a follow-up commit.

As a result, when OpenDirs_Done is called in the unit tests, the list of
open directories is empty.  It had been non-empty in a single unit test
before (dep-wildcards.mk), as a result of calling Dir_Expand.

The additional debug logging for the reference counting is not enabled
by default since it contains memory addresses, which makes the output
dependent on the memory allocator.

The function CachedDir_Destroy has been merged into CachedDir_Undef,
which had only been used in Dir_End before.  The new name emphasizes
that it corresponds to CachedDir_Ref.

Revision 1.228 / (download) - annotate - [select for diffs], Sun Nov 29 14:29:19 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.227: +2 -1 lines
Diff to previous 1.227 (colored) to selected 1.41 (colored)

make(1): add debug logging for OpenDirs_Done

Revision 1.227 / (download) - annotate - [select for diffs], Sun Nov 29 10:57:16 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.226: +3 -1 lines
Diff to previous 1.226 (colored) to selected 1.41 (colored)

make(1): add debug logging for reference counting of CachedDir

Revision 1.226 / (download) - annotate - [select for diffs], Wed Nov 25 00:50:44 2020 UTC (3 years, 4 months ago) by sjg
Branch: MAIN
Changes since 1.225: +2 -2 lines
Diff to previous 1.225 (colored) to selected 1.41 (colored)

Add .MAKE.UID and .MAKE.GID

Revision 1.225 / (download) - annotate - [select for diffs], Wed Nov 25 00:32:18 2020 UTC (3 years, 4 months ago) by sjg
Branch: MAIN
Changes since 1.224: +3 -1 lines
Diff to previous 1.224 (colored) to selected 1.41 (colored)

access(2) does not work for root, so skip objdir-writable

Revision 1.224 / (download) - annotate - [select for diffs], Tue Nov 24 19:02:59 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.223: +3 -1 lines
Diff to previous 1.223 (colored) to selected 1.41 (colored)

make(1): add test for bug in error handling of .BEGIN in -k mode

Revision 1.223 / (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.222: +2 -1 lines
Diff to previous 1.222 (colored) to selected 1.41 (colored)

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

Revision 1.222 / (download) - annotate - [select for diffs], Tue Nov 24 15:36:51 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.221: +2 -1 lines
Diff to previous 1.221 (colored) to selected 1.41 (colored)

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

Revision 1.221 / (download) - annotate - [select for diffs], Mon Nov 23 16:01:59 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.220: +5 -2 lines
Diff to previous 1.220 (colored) to selected 1.41 (colored)

make(1): make output of test opt-debug-graph1 consistent

The output from the directory cache made the regular NetBSD build fail
because the pathname to the working directory differs, thus affecting
the spacing.

This time, document why the directory cache needs to be excluded from
the output.

Revision 1.220 / (download) - annotate - [select for diffs], Mon Nov 23 15:00:32 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.219: +2 -1 lines
Diff to previous 1.219 (colored) to selected 1.41 (colored)

make(1): test that .PHONY targets are not resolved using suffix rules

Revision 1.219 / (download) - annotate - [select for diffs], Sun Nov 22 23:45:20 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.218: +7 -3 lines
Diff to previous 1.218 (colored) to selected 1.41 (colored)

make(1): add test for debug output from transformation rules

Revision 1.218 / (download) - annotate - [select for diffs], Sun Nov 22 20:36:17 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.217: +5 -1 lines
Diff to previous 1.217 (colored) to selected 1.41 (colored)

make(1): add another unit test for suffix handling

Revision 1.217 / (download) - annotate - [select for diffs], Sun Nov 22 19:37:27 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.216: +2 -1 lines
Diff to previous 1.216 (colored) to selected 1.41 (colored)

make(1): document the selection of the main target

Revision 1.216 / (download) - annotate - [select for diffs], Sun Nov 22 18:44:10 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.215: +4 -7 lines
Diff to previous 1.215 (colored) to selected 1.41 (colored)

make(1): make configuration of export tests simpler

The configuration section of unit-tests/Makefile is already complicated
enough to read, due to the excessive use of regular expressions.
Therefore, to keep the structuring elements at a minimum, inline the
.for loop.

Revision 1.215 / (download) - annotate - [select for diffs], Sun Nov 22 18:25:43 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.214: +16 -7 lines
Diff to previous 1.214 (colored) to selected 1.41 (colored)

make(1): add more output to test for -dg1

Previously, the variables section had been omitted.  This was because
the variables had been output in hashcode order until 2020-10-18, and
because some of the variable values are specific to the test environment
or the individual run (MACHINE_ARCH, MAKE.PPID).

Revision 1.214 / (download) - annotate - [select for diffs], Sat Nov 21 21:41:27 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.213: +2 -3 lines
Diff to previous 1.213 (colored) to selected 1.41 (colored)

make(1): capture more output from test deptgt-suffixes

This will have an effect with the next commit.

Revision 1.213 / (download) - annotate - [select for diffs], Sat Nov 21 17:44:40 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.212: +7 -1 lines
Diff to previous 1.212 (colored) to selected 1.41 (colored)

make(1): limit memory usage in tests

There is a suspicious condition in SuffUpdateTarget code that looks wrong
on the first sight.  When removing it though, make allocates huge amounts
of memory.  To stop freezing the whole machine in this situation, limit
the total memory.

The limit of 200000 has been determined experimentally on NetBSD 8.0
x86_64.  With a limit of 100000, make wouldn't even start.  100 MB of
memory is really a lot for such a simple program that according to top(1)
only needs 8 MB.  But 200 MB is still better than 5 GB.

Since the Makefile is used on other platforms as well, via the bmake
distribution, and since every operating system has its own list of ulimit
options, make this configurable.

Revision 1.212 / (download) - annotate - [select for diffs], Sat Nov 21 10:32:42 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.211: +2 -1 lines
Diff to previous 1.211 (colored) to selected 1.41 (colored)

make(1): add test for incomplete transformation rule

Revision 1.211 / (download) - annotate - [select for diffs], Thu Nov 19 23:50:26 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.210: +2 -2 lines
Diff to previous 1.210 (colored) to selected 1.41 (colored)

make(1): fix test opt-debug-jobs for native shell

Even after substituting the actual shell name with <shell>, the trailing
optional -q option needs to be normalized.

Revision 1.210 / (download) - annotate - [select for diffs], Thu Nov 19 21:46:10 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.209: +2 -1 lines
Diff to previous 1.209 (colored) to selected 1.41 (colored)

make(1): fix test opt-debug-jobs when compiled with dash as shell

make USER_CPPFLAGS=-DDEFSHELL_CUSTOM='\"/usr/pkg/bin/dash\"'

Revision 1.209 / (download) - annotate - [select for diffs], Thu Nov 19 21:39:50 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.208: +1 -2 lines
Diff to previous 1.208 (colored) to selected 1.41 (colored)

make(1): remove redundant postprocessing for test var-op-shell

The regular expression from the previous line already matches everything
that the removed line could ever match.

Revision 1.208 / (download) - annotate - [select for diffs], Thu Nov 19 21:35:46 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.207: +1 -4 lines
Diff to previous 1.207 (colored) to selected 1.41 (colored)

make(1): remove postprocessing for test directive-export-gmake

Since revision 1.3, directive-export-gmake.mk takes care of handling this
case.  Removing the "error" lines from the output of the tests only makes
the test harder to understand and may also hide future bugs.

Revision 1.207 / (download) - annotate - [select for diffs], Wed Nov 18 04:10:34 2020 UTC (3 years, 4 months ago) by sjg
Branch: MAIN
Changes since 1.206: +6 -7 lines
Diff to previous 1.206 (colored) to selected 1.41 (colored)

Cleanup - colliding fixes for same issue

Revision 1.206 / (download) - annotate - [select for diffs], Wed Nov 18 01:12:00 2020 UTC (3 years, 4 months ago) by sjg
Branch: MAIN
Changes since 1.205: +14 -2 lines
Diff to previous 1.205 (colored) to selected 1.41 (colored)

Some tests need help with dash

Revision 1.205 / (download) - annotate - [select for diffs], Tue Nov 17 20:27:35 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.204: +2 -1 lines
Diff to previous 1.204 (colored) to selected 1.41 (colored)

make(1): make test vardebug independent from the shell

Revision 1.204 / (download) - annotate - [select for diffs], Tue Nov 17 20:19:24 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.203: +2 -2 lines
Diff to previous 1.203 (colored) to selected 1.41 (colored)

make(1): fix test output of var-op-shell for dash

Dash is helpful and outputs the line number in case of an error.  The
other shells don't do this.  Accept both variants.

Revision 1.203 / (download) - annotate - [select for diffs], Mon Nov 16 15:12:16 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.202: +2 -1 lines
Diff to previous 1.202 (colored) to selected 1.41 (colored)

make(1): add test for self-referencing suffix rule

Just to ensure that make doesn't run into an endless loop.

Revision 1.202 / (download) - annotate - [select for diffs], Sun Nov 15 20:50:46 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.201: +2 -2 lines
Diff to previous 1.201 (colored) to selected 1.41 (colored)

make(1): fix typo in test for variable with empty name

Revision 1.201 / (download) - annotate - [select for diffs], Sun Nov 15 20:20:58 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.200: +21 -1 lines
Diff to previous 1.200 (colored) to selected 1.41 (colored)

make(1): update and add comments in tests

As a result of the new comments, some line numbers have changed in the
output of the tests.  No other changes.

Revision 1.200 / (download) - annotate - [select for diffs], Sat Nov 14 18:07:26 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.199: +3 -1 lines
Diff to previous 1.199 (colored) to selected 1.41 (colored)

make(1): use progname instead of hard-coded 'make' in warning

This only affects the warning that chdir to objdir failed.  In sub-makes
the progname includes the [n], allowing to narrow down the actual cause
of the problem.

Revision 1.199 / (download) - annotate - [select for diffs], Sat Nov 14 15:35:20 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.198: +2 -1 lines
Diff to previous 1.198 (colored) to selected 1.41 (colored)

make(1): add test for the -t option in jobs mode

Revision 1.198 / (download) - annotate - [select for diffs], Thu Nov 12 23:35:21 2020 UTC (3 years, 4 months ago) by sjg
Branch: MAIN
Changes since 1.197: +9 -1 lines
Diff to previous 1.197 (colored) to selected 1.41 (colored)

Pass a writable flag to Main_SetObjdir to control writable check

For curdir and an explicit .OBJDIR target, we allow for
the directory to be read-only.
During InitObjdir we otherwise default to requiring objdir to be
writable - this can be controlled by env variable
MAKE_OBJDIR_CHECK_WRITABLE

Add unit-tests/objdir-writable

Reviewed by: christos rillig

Revision 1.197 / (download) - annotate - [select for diffs], Tue Nov 10 22:23:37 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.196: +2 -1 lines
Diff to previous 1.196 (colored) to selected 1.41 (colored)

make(1): add more tests for parsing .if directives

The details of parsing are quite tricky and not documented in the manual
page.  Record the current behavior to be a little safer in future
refactorings.

Revision 1.196 / (download) - annotate - [select for diffs], Tue Nov 10 00:19:19 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.195: +2 -1 lines
Diff to previous 1.195 (colored) to selected 1.41 (colored)

make(1): add test for the obsolete variable VPATH

Revision 1.195 / (download) - annotate - [select for diffs], Mon Nov 9 20:50:56 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.194: +2 -14 lines
Diff to previous 1.194 (colored) to selected 1.41 (colored)

make(1): in tests, move command line arguments into the test proper

Revision 1.194 / (download) - annotate - [select for diffs], Mon Nov 9 20:39:46 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.193: +4 -5 lines
Diff to previous 1.193 (colored) to selected 1.41 (colored)

make(1): move test for != assignments to var-op-shell

Revision 1.193 / (download) - annotate - [select for diffs], Mon Nov 9 19:12:52 2020 UTC (3 years, 4 months ago) by sjg
Branch: MAIN
Changes since 1.192: +2 -1 lines
Diff to previous 1.192 (colored) to selected 1.41 (colored)

Control TZ for depsrc-optional

Revision 1.192 / (download) - annotate - [select for diffs], Sun Nov 8 23:54:28 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.191: +3 -1 lines
Diff to previous 1.191 (colored) to selected 1.41 (colored)

make(1): in lint mode, only allow '&&' and '||', not '&' and '|'

These variants of the condition operators are neither documented in the
manual page nor are they used in practice.

Revision 1.191 / (download) - annotate - [select for diffs], Sun Nov 8 16:44:47 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.190: +2 -1 lines
Diff to previous 1.190 (colored) to selected 1.41 (colored)

make(1): add test for expanding variable expressions

Revision 1.190 / (download) - annotate - [select for diffs], Sat Nov 7 23:25:06 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.189: +3 -1 lines
Diff to previous 1.189 (colored) to selected 1.41 (colored)

make(1): add test for OP_SUBMAKE

Revision 1.189 / (download) - annotate - [select for diffs], Sat Nov 7 20:01:17 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.188: +2 -1 lines
Diff to previous 1.188 (colored) to selected 1.41 (colored)

make(1): add test for job command flags

Revision 1.188 / (download) - annotate - [select for diffs], Wed Nov 4 04:24:57 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.187: +2 -1 lines
Diff to previous 1.187 (colored) to selected 1.41 (colored)

make(1): add test for undefined variables in command line arguments

The variable discardUndefined has an implicit negation in its name,
which makes it hard to understand.  Plus, most of the time it is true.
It's better to have a flag that is false most of the time and has a
positive name.

On the first attempt of inverting that variable, I stumbled upon
MainParseArgs, which initially leaves discardUndefined == FALSE, and
after handling the dashed options, sets it to TRUE.  This would make a
difference when more command line arguments would be added later via the
.MAKEFLAGS special target.

Upon further inspection, the only place where discardUndefined is used
is in VarAssign_EvalSubst in parse.c, and that place is not reachable
from any of the dashed options.  Therefore, discardUndefined could
already be set at the very beginning of MainParseArgs or even when
initializing the global variable itself, without any observable
difference.

Not even the ::= variable modifier could do anything about this since it
is not reachable from the dashed command line options as well, and in
addition, it expands its right-hand side in any case, always discarding
undefined variables.  Oh, these little inconsistencies everywhere.

Revision 1.187 / (download) - annotate - [select for diffs], Tue Nov 3 17:17:31 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.186: +1 -2 lines
Diff to previous 1.186 (colored) to selected 1.41 (colored)

make(1): move tests from directives.mk to separate tests

Revision 1.186 / (download) - annotate - [select for diffs], Mon Nov 2 21:53:28 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.185: +1 -2 lines
Diff to previous 1.185 (colored) to selected 1.41 (colored)

make(1): remove obsolete POSTPROC.varname from unit tests

It was not needed anymore since 2020-10-18.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Nov 2 20:43:27 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.184: +2 -1 lines
Diff to previous 1.184 (colored) to selected 1.41 (colored)

make(1): add test for parse errors in commands in lint mode (-dL)

The difference to non-lint mode is that the exit status is now 2 instead
of 0.

Revision 1.184 / (download) - annotate - [select for diffs], Mon Nov 2 20:40:10 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.183: +1 -2 lines
Diff to previous 1.183 (colored) to selected 1.41 (colored)

make(1): remove debugging code from sync-mi

Revision 1.183 / (download) - annotate - [select for diffs], Mon Nov 2 20:20:42 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.182: +2 -1 lines
Diff to previous 1.182 (colored) to selected 1.41 (colored)

make(1): add test for parse errors in shell commands, compat mode

Revision 1.182 / (download) - annotate - [select for diffs], Mon Nov 2 20:19:33 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.181: +6 -3 lines
Diff to previous 1.181 (colored) to selected 1.41 (colored)

make(1): handle errors when sync-mi fails because of a syntax error

Revision 1.181 / (download) - annotate - [select for diffs], Sun Nov 1 19:02:22 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.180: +1 -3 lines
Diff to previous 1.180 (colored) to selected 1.41 (colored)

make(1): move test flags to test varmod-match-escape.mk

Revision 1.180 / (download) - annotate - [select for diffs], Sat Oct 31 20:30:06 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.179: +2 -1 lines
Diff to previous 1.179 (colored) to selected 1.41 (colored)

make(1): add more tests for the variable modifier :localtime

Revision 1.179 / (download) - annotate - [select for diffs], Sat Oct 31 11:30:57 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.178: +2 -1 lines
Diff to previous 1.178 (colored) to selected 1.41 (colored)

make(1): add test for recursive variable expressions

Revision 1.178 / (download) - annotate - [select for diffs], Sat Oct 31 11:06:24 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.177: +1 -2 lines
Diff to previous 1.177 (colored) to selected 1.41 (colored)

make(1): merge the SysV modifier tests into varmod-sysv

Revision 1.177 / (download) - annotate - [select for diffs], Fri Oct 30 15:03:58 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.176: +4 -7 lines
Diff to previous 1.176 (colored) to selected 1.41 (colored)

make(1): move test flags for varname-dot-shell to the test itself

Revision 1.176 / (download) - annotate - [select for diffs], Thu Oct 29 18:19:41 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.175: +1 -3 lines
Diff to previous 1.175 (colored) to selected 1.41 (colored)

make(1): move MAKEFLAGS handling in vardebug test to the test itself

Revision 1.175 / (download) - annotate - [select for diffs], Sat Oct 24 02:25:02 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.174: +2 -1 lines
Diff to previous 1.174 (colored) to selected 1.41 (colored)

make(1): add test for looking up suffixes

Revision 1.174 / (download) - annotate - [select for diffs], Fri Oct 23 19:54:35 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.173: +2 -1 lines
Diff to previous 1.173 (colored) to selected 1.41 (colored)

make(1): add test for dependencies of the form '%.o: %.c'

Revision 1.173 / (download) - annotate - [select for diffs], Fri Oct 23 19:23:01 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.172: +2 -1 lines
Diff to previous 1.172 (colored) to selected 1.41 (colored)

make(1): add test case in which .BEGIN depends on .END

Just for fun.

Revision 1.172 / (download) - annotate - [select for diffs], Fri Oct 23 19:11:30 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.171: +2 -1 lines
Diff to previous 1.171 (colored) to selected 1.41 (colored)

make(1): add test for the '::' dependency operator

Revision 1.171 / (download) - annotate - [select for diffs], Fri Oct 23 14:38:39 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.170: +1 -2 lines
Diff to previous 1.170 (colored) to selected 1.41 (colored)

make(1): move tests from cond2.mk to varmod-ifelse.mk (fixup)

Revision 1.170 / (download) - annotate - [select for diffs], Fri Oct 23 06:18:23 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.169: +2 -1 lines
Diff to previous 1.169 (colored) to selected 1.41 (colored)

make(1): add test for .ERROR_CMD in jobs mode

Revision 1.169 / (download) - annotate - [select for diffs], Tue Oct 20 20:36:53 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.168: +7 -2 lines
Diff to previous 1.168 (colored) to selected 1.41 (colored)

make(1): split test suffixes.mk into simpler, isolated tests

The code in suff.c is already hard to understand, and so were the tests
in suffixes.mk since several independent topics were merged into a
single test.

Splitting this test into a separate test per issue allows to document
the expected and actual behavior in more detail.  That's complicated
enough already.

PR bin/49086

Revision 1.168 / (download) - annotate - [select for diffs], Sun Oct 18 22:55:52 2020 UTC (3 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.167: +7 -2 lines
Diff to previous 1.167 (colored) to selected 1.41 (colored)

In meta mode we do not have to re-run all tests when Makefile is touched

Revision 1.167 / (download) - annotate - [select for diffs], Sun Oct 18 16:33:18 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.166: +2 -1 lines
Diff to previous 1.166 (colored) to selected 1.41 (colored)

make(1): add test for turning a target into a transformation

Revision 1.166 / (download) - annotate - [select for diffs], Sat Oct 17 16:53:26 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.165: +1 -7 lines
Diff to previous 1.165 (colored) to selected 1.41 (colored)

make(1): document why the ampersand is not listed in export.exp

Revision 1.165 / (download) - annotate - [select for diffs], Sat Oct 10 19:25:19 2020 UTC (3 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.164: +7 -1 lines
Diff to previous 1.164 (colored) to selected 1.41 (colored)

Limit output of export tests to POSIX compatible env vars

Revision 1.164 / (download) - annotate - [select for diffs], Thu Oct 8 19:11:35 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.163: +1 -2 lines
Diff to previous 1.163 (colored) to selected 1.41 (colored)

make(1): remove test misc.mk from Makefile

Revision 1.163 / (download) - annotate - [select for diffs], Thu Oct 8 17:54:20 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.162: +3 -1 lines
Diff to previous 1.162 (colored) to selected 1.41 (colored)

make(1): fix test opt-debug-jobs on non-native platforms

Revision 1.162 / (download) - annotate - [select for diffs], Mon Oct 5 19:27:48 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.161: +12 -1 lines
Diff to previous 1.161 (colored) to selected 1.41 (colored)

make(1): revert previous commit

It had accidentally reverted all the work from the past few days.

Revision 1.161 / (download) - annotate - [select for diffs], Mon Oct 5 19:24:29 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.160: +1 -12 lines
Diff to previous 1.160 (colored) to selected 1.41 (colored)

make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25.  In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath.  Dir_ClearPath takes full ownership of the given list and
empties it.  This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table.  This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes.  This by itself
was not a problem since the hash table would be freed afterwards.  But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again.  Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.

Revision 1.160 / (download) - annotate - [select for diffs], Sun Oct 4 06:53:15 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.159: +3 -1 lines
Diff to previous 1.159 (colored) to selected 1.41 (colored)

make(1): add tests for parsing assignments, especially :sh

Luckily nobody uses the :sh variable assignment modifier since its
syntactical variant != is simpler.

Revision 1.159 / (download) - annotate - [select for diffs], Sat Oct 3 17:30:54 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.158: +2 -1 lines
Diff to previous 1.158 (colored) to selected 1.41 (colored)

make(1): add test demonstrating the Towers of Hanoi puzzle

It's not the primary task of make to handle procedure calls with
parameters, combined with lexical scoping, therefore the code does not
look as straight-forward or clean as in other programming languages.  It
feels more like squeezing a programming problem from the imperative
world into the world of declarative dependencies.

A more idiomatic way of implementing this puzzle should be as a
dependency graph since that's both the natural structure of the puzzle
and the primary domain of make.  Something like having a main target
"hanoi-5" that depends on intermediate targets of the form
"move-1.2.3.4.5-_._._._._-_._._._._", each representing a single
configuration of the stacks.  These targets could be generated
dynamically.  A benefit of this implementation would be that the puzzle
could be resumed from an arbitrary configuration, just just from the
initial configuration.

Revision 1.158 / (download) - annotate - [select for diffs], Sat Oct 3 14:39:36 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.157: +5 -1 lines
Diff to previous 1.157 (colored) to selected 1.41 (colored)

make(1): add tests for the various supported shells

Revision 1.157 / (download) - annotate - [select for diffs], Sat Oct 3 08:16:53 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.156: +5 -1 lines
Diff to previous 1.156 (colored) to selected 1.41 (colored)

make(1): add test for the -dj debug option

Revision 1.156 / (download) - annotate - [select for diffs], Fri Oct 2 20:34:59 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.155: +3 -1 lines
Diff to previous 1.155 (colored) to selected 1.41 (colored)

make(1): add tests for parsing and exporting variables

Once again, there are a few surprises deeply hidden inside the edge
cases.

Revision 1.155 / (download) - annotate - [select for diffs], Tue Sep 29 18:16:24 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.154: +12 -3 lines
Diff to previous 1.154 (colored) to selected 1.41 (colored)

make(1): fix test job-output-long-lines

The test failed on Linux since the test relied on the two child
processes interleaving each other.  This is not guaranteed to happen
though.

Revision 1.154 / (download) - annotate - [select for diffs], Sun Sep 27 20:11:34 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.153: +4 -1 lines
Diff to previous 1.153 (colored) to selected 1.41 (colored)

make(1): add test for merging long lines of job output

Revision 1.153 / (download) - annotate - [select for diffs], Sun Sep 27 13:18:30 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.152: +4 -2 lines
Diff to previous 1.152 (colored) to selected 1.41 (colored)

make(1): run tests with jemalloc debugging enabled

This protects against very simple memory allocation bugs such as
migrating Lst_ForEachUntil to Lst_ForEach without remembering that
Lst_ForEachUntil can handle the situation where the current list node is
removed from the list, but Lst_ForEach cannot.  This happens in
Make_ExpandUse, for example.

Revision 1.152 / (download) - annotate - [select for diffs], Fri Sep 25 23:24:49 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.151: +2 -1 lines
Diff to previous 1.151 (colored) to selected 1.41 (colored)

make(1): add test for harmless bug in Parse_File

When there is a dependency group at the end of a top-level makefile,
this dependency group is not finished properly.  This allows to add
further commands to the targets of this dependency group, which was not
intended.

Revision 1.151 / (download) - annotate - [select for diffs], Fri Sep 25 20:11:06 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.150: +2 -1 lines
Diff to previous 1.150 (colored) to selected 1.41 (colored)

make(1): add test for make() function in conditions

Revision 1.150 / (download) - annotate - [select for diffs], Fri Sep 25 18:18:25 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.149: +2 -1 lines
Diff to previous 1.149 (colored) to selected 1.41 (colored)

make(1): add test for deleting the suffixes during parsing

Revision 1.149 / (download) - annotate - [select for diffs], Fri Sep 25 05:56:59 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.148: +2 -1 lines
Diff to previous 1.148 (colored) to selected 1.41 (colored)

make(1): add test for partial expansion of undefined variables

Revision 1.148 / (download) - annotate - [select for diffs], Wed Sep 23 07:54:08 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.147: +1 -4 lines
Diff to previous 1.147 (colored) to selected 1.41 (colored)

make(1): remove debug output from counter tests

Now that the tests work as intended, the debug information is no longer
necessary.  It was only intended to track down the cause of the
unexpected behavior.

Revision 1.147 / (download) - annotate - [select for diffs], Wed Sep 23 03:33:55 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.146: +4 -2 lines
Diff to previous 1.146 (colored) to selected 1.41 (colored)

make(1): add variant of the counter test

I had expected that using the ::+= modifier instead of the ::= modifier
would work, since the assignment modifier for COUNTER no longer contains
a reference to itself.  But instead of ending up at 4, the counter even
goes up to 6.

Revision 1.146 / (download) - annotate - [select for diffs], Wed Sep 23 03:06:38 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.145: +2 -1 lines
Diff to previous 1.145 (colored) to selected 1.41 (colored)

make(1): fix assertion failure in -j mode with .END node

There had been two separate global variables for the .END node, and in
parallel mode, only the one in jobs.c was initialized.

The code in JobRun heads over to Compat_Make without calling Compat_Run
first, which left the variable ENDNode uninitialized.

Revision 1.145 / (download) - annotate - [select for diffs], Mon Sep 21 04:20:35 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.144: +9 -5 lines
Diff to previous 1.144 (colored) to selected 1.41 (colored)

make(1): run tests with absolute filenames as well

The tests varname-dot-parsedir and varname-dot-parsefile had been broken
before if they were run with the "-f $PWD/$test.mk" option.  This way of
running the tests is used by FreeBSD.

Revision 1.144 / (download) - annotate - [select for diffs], Mon Sep 21 03:45:29 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.143: +3 -1 lines
Diff to previous 1.143 (colored) to selected 1.41 (colored)

make(1): fix tests for .PARSEDIR/.PARSEFILE

The output of these tests previously depended upon whether the test
makefile was specified as relative or as absolute path.  In NetBSD, it
is specified as relative path, in FreeBSD as absolute path.

Adjust the expected output to hide this difference; in the .rawout files
it is still visible.

Revision 1.143 / (download) - annotate - [select for diffs], Tue Sep 15 16:22:04 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.142: +1 -2 lines
Diff to previous 1.142 (colored) to selected 1.41 (colored)

make(1): move flags for lint test into the test itself

Revision 1.142 / (download) - annotate - [select for diffs], Mon Sep 14 06:44:50 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.141: +2 -1 lines
Diff to previous 1.141 (colored) to selected 1.41 (colored)

make(1): add test for undefined expressions in conditions in lint mode

Revision 1.141 / (download) - annotate - [select for diffs], Mon Sep 14 06:22:59 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.140: +2 -1 lines
Diff to previous 1.140 (colored) to selected 1.41 (colored)

make(1): add tests for numbers in conditions

Revision 1.140 / (download) - annotate - [select for diffs], Sun Sep 13 09:20:23 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.139: +6 -1 lines
Diff to previous 1.139 (colored) to selected 1.41 (colored)

make(1): add tests for the various .include directives

Revision 1.139 / (download) - annotate - [select for diffs], Sun Sep 13 09:17:47 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.138: +7 -20 lines
Diff to previous 1.138 (colored) to selected 1.41 (colored)

make(1): fix sync-mi helper target, at least for adding tests

Revision 1.138 / (download) - annotate - [select for diffs], Mon Sep 7 18:49:15 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.137: +4 -2 lines
Diff to previous 1.137 (colored) to selected 1.41 (colored)

make(1): explain why each test is run in a sub-make

Revision 1.137 / (download) - annotate - [select for diffs], Mon Sep 7 18:43:59 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored) to selected 1.41 (colored)

make(1): use consistent spelling for postprocessing

Revision 1.136 / (download) - annotate - [select for diffs], Sat Sep 5 12:59:07 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.135: +2 -1 lines
Diff to previous 1.135 (colored) to selected 1.41 (colored)

make(1): add test for intentional hash collision for variable names

Hash collisions may slow down make in certain special situations.  There
is no point though in maliciously triggering such a situation since
anyone who can inject values into makefiles can easily run shell
commands using the :!cmd! modifier or similar mechanisms.  Crafting
variable names just to slow down make is thus not an attack vector.

Revision 1.135 / (download) - annotate - [select for diffs], Sat Sep 5 06:36:40 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.134: +5 -5 lines
Diff to previous 1.134 (colored) to selected 1.41 (colored)

make(1): move test for -dg1 from opt-debug-g1 to opt-debug-graph1

Revision 1.134 / (download) - annotate - [select for diffs], Sat Sep 5 06:20:51 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.133: +25 -1 lines
Diff to previous 1.133 (colored) to selected 1.41 (colored)

make(1): add tests for each debug option

Revision 1.133 / (download) - annotate - [select for diffs], Fri Sep 4 19:03:38 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.132: +2 -3 lines
Diff to previous 1.132 (colored) to selected 1.41 (colored)

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.

Revision 1.132 / (download) - annotate - [select for diffs], Fri Sep 4 17:05:39 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.131: +2 -1 lines
Diff to previous 1.131 (colored) to selected 1.41 (colored)

make(1): add test for the special variable MAKEFILE

Revision 1.131 / (download) - annotate - [select for diffs], Fri Sep 4 05:23:25 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.130: +1 -2 lines
Diff to previous 1.130 (colored) to selected 1.41 (colored)

make(1): extend tests for the :hash variable modifier

The previous test vectors didn't contain any hash with a leading zero.
This could have been a simple programming mistake by using %8x instead
of the intended %08x.  Using snprintf wouldn't have been possible anyway
since the hex digits are printed in little-endian order, but without
reversing the bits of each digit.  Kind of unusual, but doesn't affect
the distribution of the hashes.

Revision 1.130 / (download) - annotate - [select for diffs], Wed Sep 2 05:33:57 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.129: +2 -1 lines
Diff to previous 1.129 (colored) to selected 1.41 (colored)

make(1): add test for the .for directive

For a long time, I had assumed that the iteration variables of a .for
loop are just normal global variables.  This assumption was wrong but
didn't have any consequences.

The iteration variables of a .for loop can just be accessed like global
variables, therefore it is not obvious that they are implemented in a
completely different way.

There are some edge cases in conditions used inside .for loops, in which
the iteration variables cannot be used like normal variables.  An
example is brought up in https://gnats.netbsd.org/47888, which observes
that the defined() and empty() functions in conditions only work with
variables but ignore the iteration "variables", simply because these are
not variables but only expressions.

Revision 1.129 / (download) - annotate - [select for diffs], Sat Aug 29 19:35:38 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.128: +2 -3 lines
Diff to previous 1.128 (colored) to selected 1.41 (colored)

make(1): fix sh-dots test

The exact output depends on the shell.  Some shells prefix the error
message with their name, some don't.

Revision 1.128 / (download) - annotate - [select for diffs], Sat Aug 29 19:07:32 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.127: +2 -1 lines
Diff to previous 1.127 (colored) to selected 1.41 (colored)

make(1): add test for the .ifmake directive

Revision 1.127 / (download) - annotate - [select for diffs], Sat Aug 29 18:50:25 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.126: +2 -1 lines
Diff to previous 1.126 (colored) to selected 1.41 (colored)

make(1): add tests for .else and .for + .endif

Revision 1.126 / (download) - annotate - [select for diffs], Sat Aug 29 14:47:26 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.125: +2 -1 lines
Diff to previous 1.125 (colored) to selected 1.41 (colored)

make(1): fix assertion failure for .SUFFIXES in archives

This occurred in the posix1.mk test, even though it is disabled in
unit-tests.  But in tests/usr.bin/make it still runs.  There, it should
have produced an "expected failure" but crashed instead.

The archive-suffix test is the stripped-down version of the posix1 test.

Revision 1.125 / (download) - annotate - [select for diffs], Sat Aug 29 10:52:47 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.124: +2 -2 lines
Diff to previous 1.124 (colored) to selected 1.41 (colored)

make(1): fix test opt-debug-g1

Including the directory cache made the test output fragile.

Revision 1.124 / (download) - annotate - [select for diffs], Fri Aug 28 15:40:53 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.123: +2 -1 lines
Diff to previous 1.123 (colored) to selected 1.41 (colored)

make(1): add test for interrupting a command

Revision 1.123 / (download) - annotate - [select for diffs], Fri Aug 28 04:05:35 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.122: +5 -1 lines
Diff to previous 1.122 (colored) to selected 1.41 (colored)

make(1): add test for the undocumented .NULL special dependency target

Revision 1.122 / (download) - annotate - [select for diffs], Fri Aug 28 03:51:06 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.121: +3 -1 lines
Diff to previous 1.121 (colored) to selected 1.41 (colored)

make(1): add tests for the special .INCLUDES and .LIBS variables

Revision 1.121 / (download) - annotate - [select for diffs], Fri Aug 28 02:45:51 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.120: +4 -1 lines
Diff to previous 1.120 (colored) to selected 1.41 (colored)

make(1): disable the sync-mi convenience target

Revision 1.120 / (download) - annotate - [select for diffs], Thu Aug 27 19:00:17 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.119: +6 -1 lines
Diff to previous 1.119 (colored) to selected 1.41 (colored)

make(1): add test for the -dg1 option

Revision 1.119 / (download) - annotate - [select for diffs], Sun Aug 23 14:46:33 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.118: +2 -1 lines
Diff to previous 1.118 (colored) to selected 1.41 (colored)

make(1): add test for + commands with the -n command line option

Revision 1.118 / (download) - annotate - [select for diffs], Sun Aug 23 14:28:04 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.117: +6 -1 lines
Diff to previous 1.117 (colored) to selected 1.41 (colored)

make(1): add tests for the -i -k -v -V -W options

Revision 1.117 / (download) - annotate - [select for diffs], Sun Aug 23 13:50:17 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.116: +7 -1 lines
Diff to previous 1.116 (colored) to selected 1.41 (colored)

make(1): add tests for numeric comparisons in .if directives

Revision 1.116 / (download) - annotate - [select for diffs], Sun Aug 23 09:28:52 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.115: +4 -2 lines
Diff to previous 1.115 (colored) to selected 1.41 (colored)

make(1): fix assertion failure in debug output for read-only variables

Revision 1.115 / (download) - annotate - [select for diffs], Sun Aug 23 09:18:25 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.114: +6 -1 lines
Diff to previous 1.114 (colored) to selected 1.41 (colored)

make(1): add test for the newly added .SHELL variable

Revision 1.114 / (download) - annotate - [select for diffs], Sat Aug 22 21:55:54 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.113: +2 -1 lines
Diff to previous 1.113 (colored) to selected 1.41 (colored)

make(1): add test for expanding wildcards in directories

This test covers DirExpandInt.

Revision 1.113 / (download) - annotate - [select for diffs], Sat Aug 22 21:30:52 2020 UTC (3 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.112: +2 -2 lines
Diff to previous 1.112 (colored) to selected 1.41 (colored)

bash says 'command not found'

Revision 1.112 / (download) - annotate - [select for diffs], Sat Aug 22 21:22:24 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.111: +3 -1 lines
Diff to previous 1.111 (colored) to selected 1.41 (colored)

make(1): try to set the variable named "" using the command line

Before 2020-08-22, the command line argument '=cmline-plain' triggered
undefined behavior, just like the assignment '=assigned' in the Makefile.

Revision 1.111 / (download) - annotate - [select for diffs], Sat Aug 22 20:50:43 2020 UTC (3 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored) to selected 1.41 (colored)

Use TEST_MAKE to run unit-tests

This lets us take advantage of new features like ${.SHELL}

Revision 1.110 / (download) - annotate - [select for diffs], Sat Aug 22 20:23:14 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.109: +2 -1 lines
Diff to previous 1.109 (colored) to selected 1.41 (colored)

make(1): add test for assigning to the variable named ""

This has been possible at least since 2013, probably much longer.

Revision 1.109 / (download) - annotate - [select for diffs], Sat Aug 22 16:51:26 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.108: +2 -1 lines
Diff to previous 1.108 (colored) to selected 1.41 (colored)

make(1): add test for deferred variable expansion in dependencies

Revision 1.108 / (download) - annotate - [select for diffs], Sat Aug 22 15:25:50 2020 UTC (3 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.107: +2 -1 lines
Diff to previous 1.107 (colored) to selected 1.41 (colored)

Supress /bin/sh: in error for sh-dots

Revision 1.107 / (download) - annotate - [select for diffs], Sat Aug 22 12:51:11 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.106: +2 -1 lines
Diff to previous 1.106 (colored) to selected 1.41 (colored)

make(1): add test for "no target to make"

Revision 1.106 / (download) - annotate - [select for diffs], Sat Aug 22 11:27:02 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.105: +2 -1 lines
Diff to previous 1.105 (colored) to selected 1.41 (colored)

make(1): add test for the special "..." in shell commands

Revision 1.105 / (download) - annotate - [select for diffs], Sat Aug 22 08:29:13 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.104: +3 -1 lines
Diff to previous 1.104 (colored) to selected 1.41 (colored)

make(1): add test for combining :: and .USEBEFORE

Revision 1.104 / (download) - annotate - [select for diffs], Thu Aug 20 18:05:57 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.103: +2 -1 lines
Diff to previous 1.103 (colored) to selected 1.41 (colored)

make(1): enable debug logging for archive test

This test succeeds locally on NetBSD 8.0 but not in the official test
runs on https://releng.netbsd.org/test-results.html.  To see the
difference, run the test with full debug information.

This test is commented out in usr.bin/make/unit-tests/Makefile, but that
doesn't stop tests/usr.bin/make/t_make.sh from running it nevertheless,
since over there, all *.mk files are considered tests, be they commented
out or not.

Revision 1.103 / (download) - annotate - [select for diffs], Thu Aug 20 17:45:47 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.102: +2 -1 lines
Diff to previous 1.102 (colored) to selected 1.41 (colored)

make(1): add test for parsing functions in .if conditions

Revision 1.102 / (download) - annotate - [select for diffs], Wed Aug 19 05:25:26 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.101: +2 -1 lines
Diff to previous 1.101 (colored) to selected 1.41 (colored)

make(1): add test for the -n option

Revision 1.101 / (download) - annotate - [select for diffs], Wed Aug 19 05:13:18 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.100: +2 -1 lines
Diff to previous 1.100 (colored) to selected 1.41 (colored)

make(1): add test for the -q option

Revision 1.100 / (download) - annotate - [select for diffs], Sun Aug 16 20:43:01 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.99: +1 -2 lines
Diff to previous 1.99 (colored) to selected 1.41 (colored)

make(1): move tests for the :Ox modifier into separate file

The test has been extended by ensuring that the shuffled words are still
the same.  Comparing two shuffled lists is probabilistic, but comparing
their sorted results is not, therefore that's completely sensible to do.

When writing this test, by coincidence I discovered how to generate the
"Undefined variable" error message.  Unfortunately, the error message is
wrong since the variable NUMBERS is defined at that point.  In summary,
that error message is shown when it shouldn't, and when it should it is
not shown.  Still, I'm glad that I finally found it.

Revision 1.99 / (download) - annotate - [select for diffs], Sun Aug 16 20:03:53 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.98: +5 -1 lines
Diff to previous 1.98 (colored) to selected 1.41 (colored)

make(1): move tests for the :M modifier into separate files

The test for the different escaping has been adjusted to actually show
the different parsing results in the test output.  To do this, it had to
get its own file since it needs the -dv debug flag and specialized
post-processing.

Revision 1.98 / (download) - annotate - [select for diffs], Sun Aug 16 18:40:13 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.97: +8 -11 lines
Diff to previous 1.97 (colored) to selected 1.41 (colored)

make(1): run tests in an almost empty, controlled environment

Several of the tests use simple variable names that might be influenced
by environment variables of the same name.  Especially the tests for the
?= variable assignment operator need an empty environment to start with,
to produce reliable results.

The PATH must be in the base environment since several tests depend on
the usual tools like echo(1), sleep(1), grep(1).  Setting the PATH to a
fixed value would have made it impossible to run the tests in a custom
environment that don't have a /bin directory.  It's the user's
responsibility to provide a sane PATH.

Revision 1.97 / (download) - annotate - [select for diffs], Sun Aug 16 18:17:17 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.96: +5 -5 lines
Diff to previous 1.96 (colored) to selected 1.41 (colored)

make(1): force all tests to be run with the -r flag

Without that flag, <sys.mk> is loaded before the tests.  The tests are
not intended to either use or even test these rules and definitions,
therefore it is safe to omit this command line option.

If there should ever be tests for POSIX-conformance that need the
builtin rules and definitions, these tests can still ".include <sys.mk>"
at the beginning and be done with it, since the -m command line option
is not touched.  The system-default rules and definitions are still
available, they are just not active by default.

Suggested by sjg.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Aug 16 18:04:33 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.95: +2 -3 lines
Diff to previous 1.95 (colored) to selected 1.41 (colored)

make(1): use consistent formatting for running the tests

With the many newly added tests, having two messages ("testing xzy" and
"postprocessing xyz") made the output too noisy since the words were not
aligned nicely.  Use the same formatting as for MAKEVERBOSE=0, and
remove the message for postprocessing.  If there should ever be problems
during postprocessing, it's trivial to run "../make TESTS=bad-test -dl"
to find out where the problem is.

Revision 1.95 / (download) - annotate - [select for diffs], Sun Aug 16 17:58:48 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.94: +4 -6 lines
Diff to previous 1.94 (colored) to selected 1.41 (colored)

make(1): clean up cleaning of test files

The variables CLEANFILES and CLEANDIRS are not supposed to be
user-settable, thus use a simple "=" instead of "+=".

Since CLEANDIRS is always set, there is no point in making the rm
conditional.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Aug 16 12:30:45 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored) to selected 1.41 (colored)

make(1): move tests for :S, :C, :@ from modmisc to their separate tests

Revision 1.93 / (download) - annotate - [select for diffs], Sun Aug 16 12:07:51 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.92: +207 -1 lines
Diff to previous 1.92 (colored) to selected 1.41 (colored)

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.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Aug 15 01:49:07 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.91: +4 -2 lines
Diff to previous 1.91 (colored) to selected 1.41 (colored)

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.

Revision 1.91 / (download) - annotate - [select for diffs], Sun Aug 9 16:32:28 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.90: +2 -1 lines
Diff to previous 1.90 (colored) to selected 1.41 (colored)

make(1): add test for .USE combined with inference rule without commands

Discovered by christos.

Revision 1.90 / (download) - annotate - [select for diffs], Sun Aug 9 12:59:16 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.89: +3 -1 lines
Diff to previous 1.89 (colored) to selected 1.41 (colored)

make(1): add test for non-obvious .MAKE.EXPORTED edge case

Revision 1.89 / (download) - annotate - [select for diffs], Fri Aug 7 19:24:27 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.88: +7 -1 lines
Diff to previous 1.88 (colored) to selected 1.41 (colored)

make(1): add test for exporting variables

Revision 1.88 / (download) - annotate - [select for diffs], Fri Aug 7 14:40:59 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored) to selected 1.41 (colored)

make(1): document why the suffixes test must stay disabled

Revision 1.87 / (download) - annotate - [select for diffs], Fri Aug 7 14:26:18 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored) to selected 1.41 (colored)

make(1): enable test phony-end

This at least documents the actual behavior.  Not sure what the expected
behavior is and why.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Aug 7 13:43:50 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored) to selected 1.41 (colored)

make(1): enable test for .IMPSRC

Having this test disabled was very confusing since its content didn't
match the actual behavior, and this also differs from the GNU make
behavior.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Aug 6 16:23:52 2020 UTC (3 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored) to selected 1.41 (colored)

Use -r for recursive

Revision 1.84 / (download) - annotate - [select for diffs], Thu Aug 6 05:36:33 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.83: +4 -1 lines
Diff to previous 1.83 (colored) to selected 1.41 (colored)

make(1): add test for unintended "recursive variable" in -dL mode

Revision 1.83 / (download) - annotate - [select for diffs], Mon Aug 3 15:43:32 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.82: +4 -1 lines
Diff to previous 1.82 (colored) to selected 1.41 (colored)

make(1): in lint mode, disallow dynamic variable names in :@ modifier

This is an extremely obscure feature that hopefully nobody ever
considered using.

Revision 1.82 / (download) - annotate - [select for diffs], Sun Aug 2 22:43:14 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.81: +3 -2 lines
Diff to previous 1.81 (colored) to selected 1.41 (colored)

make(1): set more predictable environment for counter test

Having an environment variable or a global variable called "C" would
change the debug output since an existing variable is not set to the
empty value first.  See parse.c, keyword "!Var_Exists".

Revision 1.81 / (download) - annotate - [select for diffs], Sun Aug 2 14:53:02 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.80: +4 -1 lines
Diff to previous 1.80 (colored) to selected 1.41 (colored)

make(1): add test for nested VAR_SUBST assignments

Revision 1.80 / (download) - annotate - [select for diffs], Sat Aug 1 18:14:08 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored) to selected 1.41 (colored)

make(1): fix error message when regcomp fails

If regcomp fails, it's not the regex substitution that is erroneous, but
the regex compilation.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Aug 1 15:28:28 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.78: +2 -1 lines
Diff to previous 1.78 (colored) to selected 1.41 (colored)

make(1): improve output grouping in varmod-edge test

The generated error messages are now closer to the test cases that
produce them.  To keep the expected output stable, the line numbers are
omitted from the .info directives.

Revision 1.78 / (download) - annotate - [select for diffs], Fri Jul 31 22:07:28 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.77: +28 -3 lines
Diff to previous 1.77 (colored) to selected 1.41 (colored)

make(1): automate adding or removing test files

Revision 1.77 / (download) - annotate - [select for diffs], Fri Jul 31 16:42:51 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (colored) to selected 1.41 (colored)

make(1): add test for braces in dependency lines

The comment at DirExpandCurly says something about "recursively", but the
nested braces don't work.

The manual page only mentions that "{} may be used", but it keeps quiet
about the exact meaning and also doesn't mention any nesting.

Revision 1.76 / (download) - annotate - [select for diffs], Wed Jul 29 19:48:33 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.75: +2 -1 lines
Diff to previous 1.75 (colored) to selected 1.41 (colored)

make(1): add enough tests to cover the ApplyModifier functions

Only a few return statements are still missing from the code coverage.

In ApplyModifier_Assign, the test for an empty variable name is skipped
for now since it segfaults.

In ApplyModifier_SysV after the second ParseModifierPart, the branch for
the missing delimiter is not reached since this case is already checked
for in the first part of the function. To trigger this branch, a
specially crafted, unrealistic string needs to be created, and that's too
complicated for the moment.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Jul 28 22:44:44 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.74: +2 -1 lines
Diff to previous 1.74 (colored) to selected 1.41 (colored)

make(1): add test for setting .OBJDIR via the command line

Revision 1.74 / (download) - annotate - [select for diffs], Tue Jul 28 18:39:56 2020 UTC (3 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored) to selected 1.41 (colored)

Use cat if no POSTPROC.${.TARGET:R}

On Linux sed with no flags throws an error.

Revision 1.73 / (download) - annotate - [select for diffs], Tue Jul 28 16:26:37 2020 UTC (3 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.72: +2 -2 lines
Diff to previous 1.72 (colored) to selected 1.41 (colored)

Ensure .CURDIR is correct for tests that run sub-makes

Revision 1.72 / (download) - annotate - [select for diffs], Tue Jul 28 16:11:55 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored) to selected 1.41 (colored)

make(1): disable archive test

On FreeBSD, running the archive.mk test results in "create-archive is up
to date" and similar messages.  The situation is unclear, and the
archive code seems to be practically unused.  Furthermore the archive
test doesn't ensure that it is run in ${.PARSEDIR}, so it needs a bit
more work.

Revision 1.71 / (download) - annotate - [select for diffs], Tue Jul 28 00:48:00 2020 UTC (3 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.70: +2 -1 lines
Diff to previous 1.70 (colored) to selected 1.41 (colored)

Use -r for export.mk to minimize interference

Revision 1.70 / (download) - annotate - [select for diffs], Mon Jul 27 20:46:17 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.69: +2 -1 lines
Diff to previous 1.69 (colored) to selected 1.41 (colored)

make(1): add tests for parsing directives like .if and .info

Revision 1.69 / (download) - annotate - [select for diffs], Mon Jul 27 19:45:56 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.68: +3 -2 lines
Diff to previous 1.68 (colored) to selected 1.41 (colored)

make(1): prepare test for .export to show all exported variables

Currently the unit tests don't cover exporting of local variables like
.TARGET or @.  To see the effects, all exported variables must be listed
by the tests.

Revision 1.68 / (download) - annotate - [select for diffs], Mon Jul 27 19:23:12 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored) to selected 1.41 (colored)

make(1): sort flags for test cases alphabetically

Revision 1.67 / (download) - annotate - [select for diffs], Mon Jul 27 18:51:56 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.66: +2 -1 lines
Diff to previous 1.66 (colored) to selected 1.41 (colored)

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.

Revision 1.66 / (download) - annotate - [select for diffs], Sun Jul 26 22:15:36 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.65: +2 -1 lines
Diff to previous 1.65 (colored) to selected 1.41 (colored)

make(1): add test for off-by-one error in Var_Parse

Revision 1.65 / (download) - annotate - [select for diffs], Sun Jul 26 11:10:29 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.64: +4 -1 lines
Diff to previous 1.64 (colored) to selected 1.41 (colored)

make(1): add test for appending and exporting a variable

Revision 1.64 / (download) - annotate - [select for diffs], Sat Jul 25 21:19:29 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.63: +26 -9 lines
Diff to previous 1.63 (colored) to selected 1.41 (colored)

make(1): add tests for previously uncovered code

Revision 1.63 / (download) - annotate - [select for diffs], Thu Jul 9 22:40:14 2020 UTC (3 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.62: +6 -6 lines
Diff to previous 1.62 (colored) to selected 1.41 (colored)

Fix typo

Revision 1.62 / (download) - annotate - [select for diffs], Sat Jul 4 22:17:09 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.61: +7 -5 lines
Diff to previous 1.61 (colored) to selected 1.41 (colored)

make(1): ignore system-specific error message from regcomp in test

NetBSD 8 has: repetition-operator operand invalid
Ubuntu has: Invalid preceding regular expression

Revision 1.61 / (download) - annotate - [select for diffs], Sat Jul 4 22:01:10 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.60: +84 -75 lines
Diff to previous 1.60 (colored) to selected 1.41 (colored)

make(1): add post-processing for tests

By defining SED_CMDS.${test}, a test can do additional post-processing
on its output, for example to normalize paths or error messages.

The Makefile for the tests now follows the common style to have all
relevant definitions at the top of the file, and all the implementation
details at the bottom.

By using the += instead of backslashed lists, it becomes easier to
comment out a single test, either temporarily or permanently (such as
the POSIX tests).

The :C modifier has been replaced with the simpler :S, some :S modifiers
have been replaced with simpler := modifiers.

The postprocessing commands have been extracted from the actual command.
This makes editing and commenting them easier.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Jul 4 21:04:25 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.59: +17 -7 lines
Diff to previous 1.59 (colored) to selected 1.41 (colored)

make(1): improve documentation about adding new tests

Revision 1.59 / (download) - annotate - [select for diffs], Sun Jun 28 09:42:40 2020 UTC (3 years, 9 months ago) by rillig
Branch: MAIN
Changes since 1.58: +2 -1 lines
Diff to previous 1.58 (colored) to selected 1.41 (colored)

make(1): demonstrate bug when evaluating conditions

Revision 1.58 / (download) - annotate - [select for diffs], Sun May 17 12:36:26 2020 UTC (3 years, 10 months ago) by rillig
Branch: MAIN
Changes since 1.57: +2 -1 lines
Diff to previous 1.57 (colored) to selected 1.41 (colored)

usr.bin/make: demonstrate actual behavior of .INCLUDEDFROMFILE

Revision 1.57 / (download) - annotate - [select for diffs], Sun May 10 12:42:11 2020 UTC (3 years, 10 months ago) by rillig
Branch: MAIN
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored) to selected 1.41 (colored)

usr.bin/make: sort test cases alphabetically

Revision 1.56 / (download) - annotate - [select for diffs], Sun May 10 12:34:01 2020 UTC (3 years, 10 months ago) by rillig
Branch: MAIN
Changes since 1.55: +2 -1 lines
Diff to previous 1.55 (colored) to selected 1.41 (colored)

usr.bin/make: add tests for surprising dollar removal

Revision 1.55 / (download) - annotate - [select for diffs], Wed Apr 29 23:15:21 2020 UTC (3 years, 11 months ago) by rillig
Branch: MAIN
Changes since 1.54: +2 -1 lines
Diff to previous 1.54 (colored) to selected 1.41 (colored)

usr.bin/make: add test case for lazy conditions

Revision 1.54 / (download) - annotate - [select for diffs], Sat Nov 30 00:38:51 2019 UTC (4 years, 4 months ago) by rillig
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp
Changes since 1.53: +2 -1 lines
Diff to previous 1.53 (colored) to selected 1.41 (colored)

Add unit tests for variable modifiers like :M and :N

Revision 1.53 / (download) - annotate - [select for diffs], Thu May 24 00:25:44 2018 UTC (5 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Branch point for: phil-wifi
Changes since 1.52: +2 -1 lines
Diff to previous 1.52 (colored) to selected 1.41 (colored)

unit test for $ underquoting in :Q modifier

Revision 1.52 / (download) - annotate - [select for diffs], Tue May 5 21:51:09 2015 UTC (8 years, 10 months ago) by sjg
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: pgoyette-compat, netbsd-8
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored) to selected 1.41 (colored)

When evaluating condtionals from .if we want to require
that the lhs is a variable reference, a number or a quoted string.
This helps avoid subtle bugs caused by typos.

When conditionals are being evaluated during variable expansion
we cannot be as strict becuase lhs will already have been expanded.

We therefor pass a boolean to Cond_EvalExpression to tell it how
lhs should be treated.

Add unit-tests/cond2.mk to test the above

Reviewed by: christos, joerg

Revision 1.51 / (download) - annotate - [select for diffs], Mon Oct 20 23:21:11 2014 UTC (9 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.50: +9 -6 lines
Diff to previous 1.50 (colored) to selected 1.41 (colored)

Extract broken tests

Revision 1.50 / (download) - annotate - [select for diffs], Fri Aug 29 20:03:27 2014 UTC (9 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.49: +5 -1 lines
Diff to previous 1.49 (colored) to selected 1.41 (colored)

*.rawout are out-of-date if ${TEST_MAKE} is newer.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Aug 29 15:55:44 2014 UTC (9 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored) to selected 1.41 (colored)

posix1.mk and suffixes.mk need to cleanup in order to achieve
repeatable results.
posix1.mk's lib.a target still looks dubious.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Aug 24 17:17:24 2014 UTC (9 years, 7 months ago) by apb
Branch: MAIN
Changes since 1.47: +10 -2 lines
Diff to previous 1.47 (colored) to selected 1.41 (colored)

Let "make clean" delete the files and dirs created by some of the tests.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Aug 24 11:52:45 2014 UTC (9 years, 7 months ago) by apb
Branch: MAIN
Changes since 1.46: +2 -1 lines
Diff to previous 1.46 (colored) to selected 1.41 (colored)

Add tests for backslash escaping in make(1).

Many of these tests fail, and I have populated the escape.exp file with
the results that I expect, not with the results that make(1) actually
produces.

Also update the set lists for these tests.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Aug 23 15:21:35 2014 UTC (9 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.45: +2 -1 lines
Diff to previous 1.45 (colored) to selected 1.41 (colored)

Instead of adding the test in 48095 I added the tests in 48096. Add the
missing test now.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Aug 23 15:02:04 2014 UTC (9 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.44: +3 -1 lines
Diff to previous 1.44 (colored) to selected 1.41 (colored)

Convert test in PR/49085

Revision 1.44 / (download) - annotate - [select for diffs], Thu Aug 21 22:00:30 2014 UTC (9 years, 7 months ago) by apb
Branch: MAIN
Changes since 1.43: +2 -1 lines
Diff to previous 1.43 (colored) to selected 1.41 (colored)

Add a .PATH, so you can be in any other directory and run
"make -f /path/to/this/Makefile sometest.out"
and have it create sometest.out in your current directory.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Aug 21 15:37:13 2014 UTC (9 years, 7 months ago) by apb
Branch: MAIN
Changes since 1.42: +2 -1 lines
Diff to previous 1.42 (colored) to selected 1.41 (colored)

Add varmisc.mk, for miscellaneous variable tests.

For now, the only test is copied from
src/tests/usr.bin/make/d_unmatchedvarparen.mk.  This was
the only test in src/tests/usr.bin/make that was not also in
src/usr.bin/make/unit-tests.

XXX: src/tests/usr.bin/mk should be changed to reach over to
src/usr.bin/make/unit-tests, instead of keeping out of date copies
of the tests.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Aug 21 13:44:51 2014 UTC (9 years, 7 months ago) by apb
Branch: MAIN
Changes since 1.41: +50 -28 lines
Diff to previous 1.41 (colored)

Give each group of tests its own output file.

* Rename each sub-makefile to *.mk;
* Add a *.exp file of expected output for each sub-makefile;
* Remove test.exp, which is replaced by all the other *.exp files.
* Use suffix rules to generate *.rawout and *.out files for
  each test case.
* Rewrite the test and accept targets to adapt to the new way.

The old (now removed) test.exp file is almost identical to the
concatenation (in the correct order) of all the new *.exp files.  There
are expected differences in makefile names embedded in the output, and
the new "exit status" lines.  Some old "*** Error code 1 (ignored)"
lines are also removed (replaced by new "exit status 1" lines).

Revision 1.41 / (download) - annotate - [selected], Thu Aug 21 13:31:52 2014 UTC (9 years, 7 months ago) by apb
Branch: MAIN
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

Stricter sed expression for matching an optional PID in square brackets.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Aug 21 12:42:03 2014 UTC (9 years, 7 months ago) by apb
Branch: MAIN
Changes since 1.39: +2 -1 lines
Diff to previous 1.39 (colored) to selected 1.41 (colored)

When sanitising test output, replace "${TEST_MAKE}" with "make".
This string may appear in error messages that end up in the output.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Aug 20 08:39:14 2014 UTC (9 years, 7 months ago) by apb
Branch: MAIN
Changes since 1.38: +3 -2 lines
Diff to previous 1.38 (colored) to selected 1.41 (colored)

Add tests for VAR != command.

Revision 1.38 / (download) - annotate - [select for diffs], Wed Aug 28 21:56:50 2013 UTC (10 years, 7 months ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.37: +2 -1 lines
Diff to previous 1.37 (colored) to selected 1.41 (colored)

Fix parsing of SUNSHCMD style :sh = assigments.

Submitted by: Will Andrews at freebsd.org

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jul 16 19:59:28 2013 UTC (10 years, 8 months ago) by sjg
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored) to selected 1.41 (colored)

Fix unit-tests to cope with recent change to progname

Revision 1.36 / (download) - annotate - [select for diffs], Fri Mar 22 16:36:46 2013 UTC (11 years ago) by sjg
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.35: +2 -1 lines
Diff to previous 1.35 (colored) to selected 1.41 (colored)

Add unit-test for export-env and gmake export

Revision 1.35 / (download) - annotate - [select for diffs], Fri Nov 9 19:08:28 2012 UTC (11 years, 4 months ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, dholland-make-base
Changes since 1.34: +3 -1 lines
Diff to previous 1.34 (colored) to selected 1.41 (colored)

Add a unit-test for .ORDER

Revision 1.34 / (download) - annotate - [select for diffs], Tue Jun 19 23:25:53 2012 UTC (11 years, 9 months ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored) to selected 1.41 (colored)

Add unit-tests for .for

Revision 1.33 / (download) - annotate - [select for diffs], Thu Sep 29 23:38:04 2011 UTC (12 years, 6 months ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache
Changes since 1.32: +2 -1 lines
Diff to previous 1.32 (colored) to selected 1.41 (colored)

Make sure .PHONY targets get .TARGET set.
This wasn't happening when a dependency of .END.
Set .PREFIX too and add a unit-test.

PR: 43534

Revision 1.32 / (download) - annotate - [select for diffs], Thu Apr 7 01:40:02 2011 UTC (12 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: cherry-xenmp-base, cherry-xenmp
Changes since 1.31: +2 -1 lines
Diff to previous 1.31 (colored) to selected 1.41 (colored)

Add the :hash modifier to compute a 32bit hash of an variable.
This uses MurmurHash3 to get a reasonable collission-free hash with
small code. The result is endian neutral.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Mar 6 00:02:14 2011 UTC (13 years ago) by sjg
Branch: MAIN
Changes since 1.30: +3 -1 lines
Diff to previous 1.30 (colored) to selected 1.41 (colored)

Add unit tests to check that exists(some/dir/) works

Also fix handling of sysV substitutions when lhs and variable are empty.

Also that modifiers do not cause errors during conditional tests
when undefined variables should otherwise be ok.
Ie. .if defined(nosuch) && ${nosuch:Mx} != ""

Revision 1.30 / (download) - annotate - [select for diffs], Fri Dec 10 00:37:23 2010 UTC (13 years, 3 months ago) by sjg
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored) to selected 1.41 (colored)

fix style

Revision 1.29 / (download) - annotate - [select for diffs], Fri Dec 10 00:36:33 2010 UTC (13 years, 3 months ago) by sjg
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored) to selected 1.41 (colored)

Need to export LC_ALL=C too

Revision 1.28 / (download) - annotate - [select for diffs], Thu Apr 22 21:41:11 2010 UTC (13 years, 11 months ago) by sjg
Branch: MAIN
Changes since 1.27: +5 -1 lines
Diff to previous 1.27 (colored) to selected 1.41 (colored)

Force LANG=C to ensure sort(1) behaves as expected

Revision 1.27 / (download) - annotate - [select for diffs], Thu Apr 22 19:15:24 2010 UTC (13 years, 11 months ago) by sjg
Branch: MAIN
Changes since 1.26: +3 -2 lines
Diff to previous 1.26 (colored) to selected 1.41 (colored)

PR: 42850
Reviewed by:

modmisc: since we apply an exists() test to $paths, be conservative
in what we expect.

Run the unit tests with -r -m / so that we do not fail if there
is no sys.mk present.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Apr 8 17:41:29 2010 UTC (13 years, 11 months ago) by sjg
Branch: MAIN
Changes since 1.25: +6 -2 lines
Diff to previous 1.25 (colored) to selected 1.41 (colored)

Process .ERROR the same as .BEGIN, .END etc
so that it cannot be the default target.
Add unit-tests for .info - .error, and .ERROR.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Nov 19 00:30:25 2009 UTC (14 years, 4 months ago) by sjg
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.24: +3 -1 lines
Diff to previous 1.24 (colored) to selected 1.41 (colored)

Add .unexport - the exact opposite of .export
and .unexport-env which unexport's all previously .export'd globals
as well as clearing environ[].
Allow's sys.mk near total controll.

Reviewed by: apb

Revision 1.24 / (download) - annotate - [select for diffs], Wed Oct 7 16:40:30 2009 UTC (14 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored) to selected 1.41 (colored)

The parser used to break dependency lines at ';' without regard
for substitution patterns.  This (perhaps coupled with the
new handling of .for variables in ${:U<value>...) caused interesting
results for lines like:

.for file in ${LIST}
for-subst:       ${file:S;^;${here}/;g}

add a unit-test to keep an eye on this.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Oct 25 22:27:39 2008 UTC (15 years, 5 months ago) by apb
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored) to selected 1.41 (colored)

Use ${TOOL_SED} instead if plain sed in Makefiles.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Mar 31 00:12:21 2008 UTC (16 years ago) by sjg
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, matt-mips64-base2, hpcarm-cleanup-nbase
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored) to selected 1.41 (colored)

If the name passed to Var_Exists contains '$' run it through Var_Subst.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Oct 5 15:27:46 2007 UTC (16 years, 5 months ago) by sjg
Branch: MAIN
CVS Tags: matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, christos-broken
Changes since 1.20: +3 -1 lines
Diff to previous 1.20 (colored) to selected 1.41 (colored)

Add the ability to .export variables to the environment.

Revision 1.20 / (download) - annotate - [select for diffs], Thu May 11 15:37:07 2006 UTC (17 years, 10 months ago) by sjg
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-mips64-base, matt-mips64, hpcarm-cleanup, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: matt-armv6
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored) to selected 1.41 (colored)

Extract the variable modifier logic to a separate function.
This cuts Var_Parse in half! and allows the modifier logic to
be used recursively - when getting modifiers via variables.

Add new unit-test, to check that certain error cases are handled
correctly.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Feb 26 22:45:46 2006 UTC (18 years, 1 month ago) by apb
Branch: MAIN
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored) to selected 1.41 (colored)

Make ".WAIT" apply recursively to all children of nodes on the right
hand side of the .WAIT, except when the recursive interpretation would
cause a cycle in the dependency graph.

Discussed in tech-toolchain.  Reviewed by christos, sjg.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Feb 26 21:43:01 2006 UTC (18 years, 1 month ago) by sjg
Branch: MAIN
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored) to selected 1.41 (colored)

Update man page and add test case for specifying modifiers via variable.
Also allow said variable to appear anywhere in the modifier list.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Feb 13 18:17:36 2006 UTC (18 years, 1 month ago) by apb
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored) to selected 1.41 (colored)

Escape dots in sed regexps.  Without this patch, and without
an OBJDIR, "make test" in usr.bin/make fails.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jun 15 22:32:22 2005 UTC (18 years, 9 months ago) by rpaulo
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored) to selected 1.41 (colored)

Add a unit-test for comments.
Addition to PR bin/17732.
Approved by sjg and christos.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 1 17:17:34 2005 UTC (18 years, 10 months ago) by sjg
Branch: MAIN
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored) to selected 1.41 (colored)

Add :Ox for random ordering, based on patch from
Mike M. Volokhov <mishka@apk.od.ua>

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jun 30 03:26:26 2004 UTC (19 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: netbsd-3-base
Branch point for: netbsd-3
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored) to selected 1.41 (colored)

Add missing NetBSD ID tags

Revision 1.13 / (download) - annotate - [select for diffs], Fri May 7 08:12:16 2004 UTC (19 years, 10 months ago) by sjg
Branch: MAIN
Changes since 1.12: +8 -3 lines
Diff to previous 1.12 (colored) to selected 1.41 (colored)

Remove use of sh -e when running in compat mode.
Its not posix compliant and serves very little purpose.
With this change compat and jobs modes are consistent wrt how
they treat each line of a script.

Add support for the '+' command line prefix as required by posix.
Lines prefixed with '+' are executed even when -n is given.
[Actually posix says they should also be done for -q and -t]

PR:
Reviewed by: jmc

Revision 1.12 / (download) - annotate - [select for diffs], Thu Apr 8 00:59:01 2004 UTC (19 years, 11 months ago) by sjg
Branch: MAIN
Changes since 1.11: +6 -4 lines
Diff to previous 1.11 (colored) to selected 1.41 (colored)

Add check for extraneous .else's - based on patch from Arne H. Juul
in PR/24420.
Add a unit-test for conditionals.
Also in the unit-test makefile strip any .CURDIR in output.

PR: 24420

Revision 1.11 / (download) - annotate - [select for diffs], Fri Feb 20 09:03:26 2004 UTC (20 years, 1 month ago) by sjg
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.10: +20 -45 lines
Diff to previous 1.10 (colored) to selected 1.41 (colored)

Fix :M so that modifiers in nested variables don't terminate parsing
early.  Add a unit-test to verify it works and keeps working.
Re-jig the unit-tests so that all are sub makefiles.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jan 19 00:32:26 2004 UTC (20 years, 2 months ago) by sjg
Branch: MAIN
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored) to selected 1.41 (colored)

ternary is .PHONY

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jan 9 00:56:44 2004 UTC (20 years, 2 months ago) by sjg
Branch: MAIN
Changes since 1.8: +7 -2 lines
Diff to previous 1.8 (colored) to selected 1.41 (colored)

Add unit test for ternary modifier

Revision 1.8 / (download) - annotate - [select for diffs], Sat Sep 27 21:29:37 2003 UTC (20 years, 6 months ago) by sjg
Branch: MAIN
Changes since 1.7: +12 -5 lines
Diff to previous 1.7 (colored) to selected 1.41 (colored)

Implement :[] modifier to allow picking a range of words out of a variable.
Also :tW and a W flag to :C and :S to allow treating value as a single word.
Add unit tests for the above, and fix some corner cases.
Based on patches supplied by Alan Barrett <apb@cequrux.com>

Revision 1.7 / (download) - annotate - [select for diffs], Fri Aug 8 06:42:38 2003 UTC (20 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.6: +5 -3 lines
Diff to previous 1.6 (colored) to selected 1.41 (colored)

Hook make unit-tests into regress

Revision 1.6 / (download) - annotate - [select for diffs], Fri Aug 1 04:57:20 2003 UTC (20 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored) to selected 1.41 (colored)

Avoid \a as a test of invalid separator, since if we make ksh the default
shell, we get different results.  \x seems safe.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Jul 31 00:46:15 2003 UTC (20 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.4: +7 -3 lines
Diff to previous 1.4 (colored) to selected 1.41 (colored)

Test behavior of commandline variable assignments.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jul 29 08:44:42 2003 UTC (20 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.3: +6 -5 lines
Diff to previous 1.3 (colored) to selected 1.41 (colored)

First bug picked up by the unit tests - delim wasn't always initialized.
Avoid putting '\' in test case script lines since shell's like that on
SunOS insist on interpreting them.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jul 29 08:16:01 2003 UTC (20 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.2: +17 -17 lines
Diff to previous 1.2 (colored) to selected 1.41 (colored)

Use single quotes to protect everything from shell's that might
alter the results.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jul 29 06:35:09 2003 UTC (20 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.1: +3 -2 lines
Diff to previous 1.1 (colored) to selected 1.41 (colored)

Regardless of the name of TEST_MAKE, force it to make in test.exp
to avoid needless failures.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jul 28 22:52:12 2003 UTC (20 years, 8 months ago) by sjg
Branch: MAIN
Diff to selected 1.41 (colored)

Fix parsing bug for :ts - patch from Alan Barrett <apb@cequrux.com>
Also add simple unit-test jig (regress/usr.bin/make will use it too)
but having it local here makes inclusion in bmake simpler.

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 <webmaster@jp.NetBSD.org>