Module Name: src
Committed By: rillig
Date: Tue Feb 2 17:27:35 UTC 2021
Modified Files:
src/usr.bin/make/unit-tests: Makefile opt-debug-graph2.exp
opt-debug-graph2.mk opt-debug-graph3.exp opt-debug-graph3.mk
Log Message:
make: demonstrate that neither -dg2 nor -dg3 produces debug output
To generate a diff of this commit:
cvs rdiff -u -r1.265 -r1.266 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.1 -r1.2 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
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.265 src/usr.bin/make/unit-tests/Makefile:1.266
--- src/usr.bin/make/unit-tests/Makefile:1.265 Mon Feb 1 20:31:41 2021
+++ src/usr.bin/make/unit-tests/Makefile Tue Feb 2 17:27:35 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.265 2021/02/01 20:31:41 rillig Exp $
+# $NetBSD: Makefile,v 1.266 2021/02/02 17:27:35 rillig Exp $
#
# Unit tests for make(1)
#
@@ -488,6 +488,8 @@ SED_CMDS.job-output-long-lines= \
-e '/^bb*--- job-a ---$$/d'
SED_CMDS.objdir-writable= -e 's,${RO_OBJDIR},OBJDIR/roobj,g'
SED_CMDS.opt-debug-graph1= ${STD_SED_CMDS.dg1}
+SED_CMDS.opt-debug-graph2= ${STD_SED_CMDS.dg2}
+SED_CMDS.opt-debug-graph3= ${STD_SED_CMDS.dg3}
SED_CMDS.opt-debug-jobs= -e 's,([0-9][0-9]*),(<pid>),'
SED_CMDS.opt-debug-jobs+= -e 's,pid [0-9][0-9]*,pid <pid>,'
SED_CMDS.opt-debug-jobs+= -e 's,Process [0-9][0-9]*,Process <pid>,'
@@ -539,6 +541,11 @@ STD_SED_CMDS.dg1+= -e 's,^\(\.MAKE *=\)
STD_SED_CMDS.dg1+= -e 's,^\(\.MAKE\.[A-Z_]* *=\) .*,\1 <details omitted>,'
STD_SED_CMDS.dg1+= -e 's,^\(MACHINE[_ARCH]* *=\) .*,\1 <details omitted>,'
STD_SED_CMDS.dg1+= -e 's,^\(MAKE *=\) .*,\1 <details omitted>,'
+STD_SED_CMDS.dg1+= -e 's,^\(\.SHELL *=\) .*,\1 <details omitted>,'
+
+STD_SED_CMDS.dg2= ${STD_SED_CMDS.dg1}
+STD_SED_CMDS.dg2+= -e 's,\(last modified\) ..:..:.. ... ..\, ....,\1 <timestamp>,'
+STD_SED_CMDS.dg3= ${STD_SED_CMDS.dg2}
# Omit details such as process IDs from the output of the -dj option.
STD_SED_CMDS.dj= \
Index: src/usr.bin/make/unit-tests/opt-debug-graph2.exp
diff -u src/usr.bin/make/unit-tests/opt-debug-graph2.exp:1.1 src/usr.bin/make/unit-tests/opt-debug-graph2.exp:1.2
--- src/usr.bin/make/unit-tests/opt-debug-graph2.exp:1.1 Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph2.exp Tue Feb 2 17:27:35 2021
@@ -1 +1,10 @@
-exit status 0
+: 'Making made-target.'
+false
+*** Error code 1 (continuing)
+false
+*** Error code 1 (continuing)
+`all' not remade because of errors.
+
+Stop.
+make: stopped in unit-tests
+exit status 1
Index: src/usr.bin/make/unit-tests/opt-debug-graph2.mk
diff -u src/usr.bin/make/unit-tests/opt-debug-graph2.mk:1.1 src/usr.bin/make/unit-tests/opt-debug-graph2.mk:1.2
--- src/usr.bin/make/unit-tests/opt-debug-graph2.mk:1.1 Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph2.mk Tue Feb 2 17:27:35 2021
@@ -1,9 +1,23 @@
-# $NetBSD: opt-debug-graph2.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+# $NetBSD: opt-debug-graph2.mk,v 1.2 2021/02/02 17:27:35 rillig Exp $
#
# Tests for the -dg2 command line option, which prints the input
# graph after making everything, or before exiting on error.
+#
+# FIXME: The documentation is wrong. There is no debug output despite
+# the error.
+
+.MAKEFLAGS: -dg2
+
+.MAIN: all
+
+made-target: .PHONY
+ : 'Making $@.'
+
+error-target: .PHONY
+ false
-# TODO: Implementation
+aborted-target: .PHONY aborted-target-dependency
+aborted-target-dependency: .PHONY
+ false
-all:
- @:;
+all: made-target error-target aborted-target
Index: src/usr.bin/make/unit-tests/opt-debug-graph3.exp
diff -u src/usr.bin/make/unit-tests/opt-debug-graph3.exp:1.1 src/usr.bin/make/unit-tests/opt-debug-graph3.exp:1.2
--- src/usr.bin/make/unit-tests/opt-debug-graph3.exp:1.1 Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph3.exp Tue Feb 2 17:27:35 2021
@@ -1 +1,10 @@
-exit status 0
+: 'Making made-target.'
+false
+*** Error code 1 (continuing)
+false
+*** Error code 1 (continuing)
+`all' not remade because of errors.
+
+Stop.
+make: stopped in unit-tests
+exit status 1
Index: src/usr.bin/make/unit-tests/opt-debug-graph3.mk
diff -u src/usr.bin/make/unit-tests/opt-debug-graph3.mk:1.1 src/usr.bin/make/unit-tests/opt-debug-graph3.mk:1.2
--- src/usr.bin/make/unit-tests/opt-debug-graph3.mk:1.1 Sat Sep 5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph3.mk Tue Feb 2 17:27:35 2021
@@ -1,9 +1,23 @@
-# $NetBSD: opt-debug-graph3.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+# $NetBSD: opt-debug-graph3.mk,v 1.2 2021/02/02 17:27:35 rillig Exp $
#
# Tests for the -dg3 command line option, which prints the input
# graph before exiting on error.
+#
+# FIXME: The documentation is wrong. There is no debug output despite
+# the error.
+
+.MAKEFLAGS: -dg3
+
+.MAIN: all
+
+made-target: .PHONY
+ : 'Making $@.'
+
+error-target: .PHONY
+ false
-# TODO: Implementation
+aborted-target: .PHONY aborted-target-dependency
+aborted-target-dependency: .PHONY
+ false
-all:
- @:;
+all: made-target error-target aborted-target