Module Name: src
Committed By: rillig
Date: Sat Sep 5 06:20:51 UTC 2020
Modified Files:
src/distrib/sets/lists/tests: mi
src/usr.bin/make/unit-tests: Makefile archive.mk
Added Files:
src/usr.bin/make/unit-tests: opt-debug-all.exp opt-debug-all.mk
opt-debug-archive.exp opt-debug-archive.mk opt-debug-cond.exp
opt-debug-cond.mk opt-debug-curdir.exp opt-debug-curdir.mk
opt-debug-dir.exp opt-debug-dir.mk opt-debug-errors.exp
opt-debug-errors.mk opt-debug-file.exp opt-debug-file.mk
opt-debug-for.exp opt-debug-for.mk opt-debug-graph1.exp
opt-debug-graph1.mk opt-debug-graph2.exp opt-debug-graph2.mk
opt-debug-graph3.exp opt-debug-graph3.mk opt-debug-hash.exp
opt-debug-hash.mk opt-debug-jobs.exp opt-debug-jobs.mk
opt-debug-lint.exp opt-debug-lint.mk opt-debug-loud.exp
opt-debug-loud.mk opt-debug-making.exp opt-debug-making.mk
opt-debug-meta.exp opt-debug-meta.mk opt-debug-no-rm.exp
opt-debug-no-rm.mk opt-debug-parse.exp opt-debug-parse.mk
opt-debug-suff.exp opt-debug-suff.mk opt-debug-targets.exp
opt-debug-targets.mk opt-debug-var.exp opt-debug-var.mk
opt-debug-varraw.exp opt-debug-varraw.mk opt-debug-x-trace.exp
opt-debug-x-trace.mk
Log Message:
make(1): add tests for each debug option
To generate a diff of this commit:
cvs rdiff -u -r1.918 -r1.919 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.133 -r1.134 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/archive.mk
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/opt-debug-all.exp \
src/usr.bin/make/unit-tests/opt-debug-all.mk \
src/usr.bin/make/unit-tests/opt-debug-archive.exp \
src/usr.bin/make/unit-tests/opt-debug-archive.mk \
src/usr.bin/make/unit-tests/opt-debug-cond.exp \
src/usr.bin/make/unit-tests/opt-debug-cond.mk \
src/usr.bin/make/unit-tests/opt-debug-curdir.exp \
src/usr.bin/make/unit-tests/opt-debug-curdir.mk \
src/usr.bin/make/unit-tests/opt-debug-dir.exp \
src/usr.bin/make/unit-tests/opt-debug-dir.mk \
src/usr.bin/make/unit-tests/opt-debug-errors.exp \
src/usr.bin/make/unit-tests/opt-debug-errors.mk \
src/usr.bin/make/unit-tests/opt-debug-file.exp \
src/usr.bin/make/unit-tests/opt-debug-file.mk \
src/usr.bin/make/unit-tests/opt-debug-for.exp \
src/usr.bin/make/unit-tests/opt-debug-for.mk \
src/usr.bin/make/unit-tests/opt-debug-graph1.exp \
src/usr.bin/make/unit-tests/opt-debug-graph1.mk \
src/usr.bin/make/unit-tests/opt-debug-graph2.exp \
src/usr.bin/make/unit-tests/opt-debug-graph2.mk \
src/usr.bin/make/unit-tests/opt-debug-graph3.exp \
src/usr.bin/make/unit-tests/opt-debug-graph3.mk \
src/usr.bin/make/unit-tests/opt-debug-hash.exp \
src/usr.bin/make/unit-tests/opt-debug-hash.mk \
src/usr.bin/make/unit-tests/opt-debug-jobs.exp \
src/usr.bin/make/unit-tests/opt-debug-jobs.mk \
src/usr.bin/make/unit-tests/opt-debug-lint.exp \
src/usr.bin/make/unit-tests/opt-debug-lint.mk \
src/usr.bin/make/unit-tests/opt-debug-loud.exp \
src/usr.bin/make/unit-tests/opt-debug-loud.mk \
src/usr.bin/make/unit-tests/opt-debug-making.exp \
src/usr.bin/make/unit-tests/opt-debug-making.mk \
src/usr.bin/make/unit-tests/opt-debug-meta.exp \
src/usr.bin/make/unit-tests/opt-debug-meta.mk \
src/usr.bin/make/unit-tests/opt-debug-no-rm.exp \
src/usr.bin/make/unit-tests/opt-debug-no-rm.mk \
src/usr.bin/make/unit-tests/opt-debug-parse.exp \
src/usr.bin/make/unit-tests/opt-debug-parse.mk \
src/usr.bin/make/unit-tests/opt-debug-suff.exp \
src/usr.bin/make/unit-tests/opt-debug-suff.mk \
src/usr.bin/make/unit-tests/opt-debug-targets.exp \
src/usr.bin/make/unit-tests/opt-debug-targets.mk \
src/usr.bin/make/unit-tests/opt-debug-var.exp \
src/usr.bin/make/unit-tests/opt-debug-var.mk \
src/usr.bin/make/unit-tests/opt-debug-varraw.exp \
src/usr.bin/make/unit-tests/opt-debug-varraw.mk \
src/usr.bin/make/unit-tests/opt-debug-x-trace.exp \
src/usr.bin/make/unit-tests/opt-debug-x-trace.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.918 src/distrib/sets/lists/tests/mi:1.919
--- src/distrib/sets/lists/tests/mi:1.918 Fri Sep 4 17:05:39 2020
+++ src/distrib/sets/lists/tests/mi Sat Sep 5 06:20:50 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.918 2020/09/04 17:05:39 rillig Exp $
+# $NetBSD: mi,v 1.919 2020/09/05 06:20:50 rillig Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -4812,8 +4812,56 @@
./usr/tests/usr.bin/make/unit-tests/opt-backwards.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-chdir.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-chdir.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-all.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-all.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-archive.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-archive.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-cond.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-cond.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-curdir.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-curdir.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-dir.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-dir.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-errors.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-errors.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-file.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-file.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-for.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-for.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-debug-g1.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-debug-g1.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-graph1.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-graph1.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-graph2.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-graph2.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-graph3.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-graph3.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-hash.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-hash.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-jobs.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-jobs.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-lint.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-lint.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-loud.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-loud.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-making.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-making.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-meta.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-meta.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-no-rm.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-no-rm.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-parse.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-parse.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-suff.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-suff.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-targets.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-targets.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-var.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-var.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-varraw.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-varraw.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-x-trace.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-x-trace.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-debug.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-debug.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-define.exp tests-usr.bin-tests compattestfile,atf
Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.133 src/usr.bin/make/unit-tests/Makefile:1.134
--- src/usr.bin/make/unit-tests/Makefile:1.133 Fri Sep 4 19:03:38 2020
+++ src/usr.bin/make/unit-tests/Makefile Sat Sep 5 06:20:51 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.133 2020/09/04 19:03:38 rillig Exp $
+# $NetBSD: Makefile,v 1.134 2020/09/05 06:20:51 rillig Exp $
#
# Unit tests for make(1)
#
@@ -171,7 +171,31 @@ TESTS+= opt
TESTS+= opt-backwards
TESTS+= opt-chdir
TESTS+= opt-debug
+TESTS+= opt-debug-all
+TESTS+= opt-debug-archive
+TESTS+= opt-debug-curdir
+TESTS+= opt-debug-cond
+TESTS+= opt-debug-dir
+TESTS+= opt-debug-errors
+TESTS+= opt-debug-file
+TESTS+= opt-debug-for
TESTS+= opt-debug-g1
+TESTS+= opt-debug-graph1
+TESTS+= opt-debug-graph2
+TESTS+= opt-debug-graph3
+TESTS+= opt-debug-hash
+TESTS+= opt-debug-jobs
+TESTS+= opt-debug-lint
+TESTS+= opt-debug-loud
+TESTS+= opt-debug-meta
+TESTS+= opt-debug-making
+TESTS+= opt-debug-no-rm
+TESTS+= opt-debug-parse
+TESTS+= opt-debug-suff
+TESTS+= opt-debug-targets
+TESTS+= opt-debug-varraw
+TESTS+= opt-debug-var
+TESTS+= opt-debug-x-trace
TESTS+= opt-define
TESTS+= opt-env
TESTS+= opt-file
Index: src/usr.bin/make/unit-tests/archive.mk
diff -u src/usr.bin/make/unit-tests/archive.mk:1.6 src/usr.bin/make/unit-tests/archive.mk:1.7
--- src/usr.bin/make/unit-tests/archive.mk:1.6 Fri Sep 4 19:03:38 2020
+++ src/usr.bin/make/unit-tests/archive.mk Sat Sep 5 06:20:51 2020
@@ -1,21 +1,25 @@
-# $NetBSD: archive.mk,v 1.6 2020/09/04 19:03:38 rillig Exp $
+# $NetBSD: archive.mk,v 1.7 2020/09/05 06:20:51 rillig Exp $
#
# Very basic demonstration of handling archives, based on the description
# in PSD.doc/tutorial.ms.
+#
+# This test aims at covering the code, not at being an introduction to
+# archive handling. That's why it is more complicated and detailed than
+# strictly necessary.
-ARCHIVE= libprog.${EXT.a}
-FILES= archive.${EXT.mk} modmisc.${EXT.mk} varmisc.mk
-
-EXT.a= a
-EXT.mk= mk
+ARCHIVE= libprog.a
+FILES= archive.mk modmisc.mk varmisc.mk
MAKE_CMD= ${.MAKE} -f ${MAKEFILE}
RUN?= @set -eu;
all:
.if ${.PARSEDIR:tA} != ${.CURDIR:tA}
- @cd ${MAKEFILE:H} && cp [at]*.mk ${.CURDIR}
+ @cd ${MAKEFILE:H} && cp ${FILES} t*.mk ${.CURDIR}
.endif
+# The following targets are run in sub-makes to ensure that they get the
+# current state of the filesystem right, since they creating and removing
+# files.
${RUN} ${MAKE_CMD} remove-archive
${RUN} ${MAKE_CMD} create-archive
${RUN} ${MAKE_CMD} list-archive
@@ -25,7 +29,12 @@ all:
${RUN} ${MAKE_CMD} remove-archive
create-archive: ${ARCHIVE}
-${ARCHIVE}: ${ARCHIVE}(${FILES})
+
+# The indirect references with the $$ cover the code in Arch_ParseArchive
+# that calls Var_Parse. It's an esoteric scenario since at the point where
+# Arch_ParseArchive is called, the dependency line is already fully expanded.
+#
+${ARCHIVE}: $${:Ulibprog.a}(archive.mk modmisc.mk $${:Uvarmisc.mk})
ar cru ${.TARGET} ${.OODATE}
ranlib ${.TARGET}
Added files:
Index: src/usr.bin/make/unit-tests/opt-debug-all.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-all.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-all.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-all.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-all.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-all.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,10 @@
+# $NetBSD: opt-debug-all.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dA command line option, which enables all debug options
+# except for -dL (lint), since that option is not related to debug logging
+# but to static analysis.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-archive.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-archive.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-archive.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-archive.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-archive.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-archive.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-archive.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -da command line option, which adds debug logging for the
+# archive handling.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-cond.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-cond.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-cond.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-cond.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-cond.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-cond.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,10 @@
+# $NetBSD: opt-debug-cond.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dc command line option, which adds debug logging for the
+# evaluation of conditional expressions, such as in .if directives and
+# ${cond:?then:else} expressions.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-curdir.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-curdir.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-curdir.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-curdir.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-curdir.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-curdir.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,8 @@
+# $NetBSD: opt-debug-curdir.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dC command line option, which does nothing, as of 2020-09-05.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-dir.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-dir.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-dir.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-dir.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-dir.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-dir.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-dir.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dd command line option, which adds debug logging for
+# directory searching and caching.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-errors.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-errors.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-errors.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-errors.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-errors.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-errors.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-errors.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -de command line option, which adds debug logging for
+# failed commands and targets.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-file.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-file.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-file.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-file.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-file.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-file.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-file.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dF command line option, which redirects the debug log
+# to a file instead of writing it to stderr.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-for.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-for.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-for.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-for.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-for.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-for.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-for.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -df command line option, which adds debug logging for
+# parsing and evaluating .for loops.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-graph1.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-graph1.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph1.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-graph1.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-graph1.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph1.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-graph1.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dg1 command line option, which prints the input
+# graph before making anything.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-graph2.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-graph2.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph2.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-graph2.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-graph2.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph2.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-graph2.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dg2 command line option, which prints the input
+# graph after making everything, or before exiting on error.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-graph3.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-graph3.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph3.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-graph3.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-graph3.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph3.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-graph3.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dg3 command line option, which prints the input
+# graph before exiting on error.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-hash.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-hash.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-hash.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-hash.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-hash.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-hash.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,10 @@
+# $NetBSD: opt-debug-hash.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dh command line option, which adds debug logging for
+# hash tables. Even more detailed logging is available by compiling
+# make with -DDEBUG_HASH_LOOKUP.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-jobs.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-jobs.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-jobs.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-jobs.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-jobs.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-jobs.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-jobs.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -da command line option, which adds debug logging about
+# running jobs in multiple shells.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-lint.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-lint.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-lint.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-lint.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-lint.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-lint.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dL command line option, which runs additional checks
+# to catch common mistakes, such as unclosed variable expressions.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-loud.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-loud.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-loud.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-loud.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-loud.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-loud.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,13 @@
+# $NetBSD: opt-debug-loud.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dl command line option, which prints the commands before
+# running them, ignoring the command line option for silent mode (-s) as
+# well as the .SILENT special source and target, as well as the '@' prefix
+# for shell commands.
+
+# TODO: Implementation
+
+# TODO: What about ${:!cmd!}?
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-making.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-making.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-making.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-making.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-making.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-making.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-making.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dm command line option, which adds debug logging about
+# making targets, including modification dates.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-meta.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-meta.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-meta.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-meta.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-meta.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-meta.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-meta.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dM command line option, which adds debug logging about
+# "meta" mode decisions about targets.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-no-rm.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-no-rm.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-no-rm.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-no-rm.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-no-rm.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-no-rm.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,13 @@
+# $NetBSD: opt-debug-no-rm.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dn command line option, which prevents the temporary
+# command scripts from being removed from the temporary directory.
+
+# TODO: Implementation
+
+# TODO: Does this apply to non-jobs mode?
+# TODO: Does this apply to jobs mode?
+# TODO: Are the generated filenames predictable?
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-parse.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-parse.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-parse.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-parse.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-parse.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-parse.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-parse.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dp command line option, which adds debug logging about
+# makefile parsing.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-suff.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-suff.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-suff.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-suff.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-suff.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-suff.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,11 @@
+# $NetBSD: opt-debug-suff.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -ds command line option, which adds debug logging about
+# suffix-transformation rules such as .c.o.
+
+# TODO: Implementation
+
+# TODO: What about %.o: %.c?
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-targets.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-targets.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-targets.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-targets.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-targets.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-targets.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,11 @@
+# $NetBSD: opt-debug-targets.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dt command line option, which adds debug logging about
+# target list maintenance.
+#
+# TODO: What exactly does "maintenance" mean?
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-var.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-var.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-var.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-var.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-var.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-var.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,9 @@
+# $NetBSD: opt-debug-var.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dv command line option, which adds debug logging about
+# variable assignment and evaluation.
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-varraw.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-varraw.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-varraw.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-varraw.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-varraw.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-varraw.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,12 @@
+# $NetBSD: opt-debug-varraw.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dV command line option, which forces the -V option to
+# print the raw values of variables.
+
+# TODO: Does this make -V and -v equivalent, or are there any other subtle
+# differences?
+
+# TODO: Implementation
+
+all:
+ @:;
Index: src/usr.bin/make/unit-tests/opt-debug-x-trace.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-x-trace.exp:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-x-trace.exp Sat Sep 5 06:20:51 2020
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-x-trace.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-x-trace.mk:1.1
--- /dev/null Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-x-trace.mk Sat Sep 5 06:20:51 2020
@@ -0,0 +1,10 @@
+# $NetBSD: opt-debug-x-trace.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+#
+# Tests for the -dx command line option, which runs shell commands with
+# the -x option, thereby printing the actual commands as they are
+# executed.
+
+# TODO: Implementation
+
+all:
+ @:;