Module Name:    src
Committed By:   rillig
Date:           Sun Nov 22 18:25:44 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: Makefile opt-debug-graph1.exp

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/opt-debug-graph1.exp

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.214 src/usr.bin/make/unit-tests/Makefile:1.215
--- src/usr.bin/make/unit-tests/Makefile:1.214	Sat Nov 21 21:41:27 2020
+++ src/usr.bin/make/unit-tests/Makefile	Sun Nov 22 18:25:43 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.214 2020/11/21 21:41:27 rillig Exp $
+# $NetBSD: Makefile,v 1.215 2020/11/22 18:25:43 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -445,12 +445,9 @@ SED_CMDS.job-output-long-lines= \
 	${:D marker should always be at the beginning of the line. } \
 	-e '/^aa*--- job-b ---$$/d' \
 	-e '/^bb*--- job-a ---$$/d'
-SED_CMDS.objdir-writable= -e 's,${RO_OBJDIR},OBJDIR/roobj,g'
-SED_CMDS.opt-debug-graph1= \
-			-e 's,${.CURDIR},CURDIR,'
-SED_CMDS.opt-debug-graph1+= \
-			-e '/Global Variables:/,/Suffixes:/d'
-SED_CMDS.sh-dots=	-e 's,^.*\.\.\.:.*,<normalized: ...: not found>,'
+SED_CMDS.objdir-writable=	-e 's,${RO_OBJDIR},OBJDIR/roobj,g'
+SED_CMDS.opt-debug-graph1=	${STD_SED_CMDS.dg1}
+SED_CMDS.sh-dots=		-e 's,^.*\.\.\.:.*,<normalized: ...: not found>,'
 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>,'
@@ -458,6 +455,7 @@ SED_CMDS.opt-debug-jobs+=	-e 's,JobFinis
 SED_CMDS.opt-debug-jobs+=	-e 's,Command: ${.SHELL:T},Command: <shell>,'
 # The "-q" may be there or not, see jobs.c, variable shells.
 SED_CMDS.opt-debug-jobs+=	-e 's,^\(.Command: <shell>\) -q,\1,'
+SED_CMDS.suff-main+=		${STD_SED_CMDS.dg1}
 SED_CMDS.var-op-shell+=	\
 	-e 's,^${.SHELL:T}: [ 0-9:]*,,' \
 	-e '/command/s,No such.*,not found,'
@@ -483,6 +481,17 @@ unexport-env.rawout: export.mk
 
 # End of the configuration section.
 
+# Some standard sed commands, to be used in the SED_CMDS above.
+
+# Omit details from the output of the -dg1 option such as process IDs.
+STD_SED_CMDS.dg1=	-e 's,${.CURDIR},<curdir>,'
+STD_SED_CMDS.dg1+=	-e 's,^\(\.MAKE *=\) .*,\1 <details omitted>,'
+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>,'
+
+# End of the configuration helpers section.
+
 .MAIN: all
 
 UNIT_TESTS:=	${.PARSEDIR}

Index: src/usr.bin/make/unit-tests/opt-debug-graph1.exp
diff -u src/usr.bin/make/unit-tests/opt-debug-graph1.exp:1.4 src/usr.bin/make/unit-tests/opt-debug-graph1.exp:1.5
--- src/usr.bin/make/unit-tests/opt-debug-graph1.exp:1.4	Fri Sep 25 23:30:16 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph1.exp	Sun Nov 22 18:25:43 2020
@@ -13,5 +13,41 @@
 #   Files that are only sources:
 #	unmade-sources [unmade-sources]
 #	unmade-silent-source [unmade-silent-source] .SILENT
+#*** Global Variables:
+.ALLTARGETS      =  all made-target made-target-no-sources made-source unmade-target unmade-sources unmade-silent-source unmade-target-no-sources
+.CURDIR          = <curdir>
+.INCLUDES        = 
+.LIBS            = 
+.MAKE            = <details omitted>
+.MAKE.DEPENDFILE = <details omitted>
+.MAKE.LEVEL      = <details omitted>
+.MAKE.MAKEFILES  = <details omitted>
+.MAKE.MAKEFILE_PREFERENCE = <details omitted>
+.MAKE.OS         = <details omitted>
+.MAKE.PATH_FILEMON = <details omitted>
+.MAKE.PID        = <details omitted>
+.MAKE.PPID       = <details omitted>
+.MAKEFLAGS       =  -r -k -d g1
+.MAKEOVERRIDES   = 
+.OBJDIR          = <curdir>
+.PATH            = . <curdir>
+.TARGETS         = 
+.newline         = 
+
+MACHINE          = <details omitted>
+MACHINE_ARCH     = <details omitted>
+MAKE             = <details omitted>
+MFLAGS           =   -r -k -d g1
+#*** Command-line Variables:
+.MAKE.LEVEL.ENV  = MAKELEVEL
+
+#*** Directory Cache:
+# Stats: 0 hits 2 misses 0 near misses 0 losers (0%)
+# directory            referenced	hits
+# <curdir>          2	   0
+# .                             2	   0
+# /usr/share/mk                 1	   0
+
+#*** Suffixes:
 #*** Transformations:
 exit status 0

Reply via email to