Module Name:    src
Committed By:   rillig
Date:           Mon Nov 23 16:01:59 UTC 2020

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

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


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.5 -r1.6 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.220 src/usr.bin/make/unit-tests/Makefile:1.221
--- src/usr.bin/make/unit-tests/Makefile:1.220	Mon Nov 23 15:00:32 2020
+++ src/usr.bin/make/unit-tests/Makefile	Mon Nov 23 16:01:59 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.220 2020/11/23 15:00:32 rillig Exp $
+# $NetBSD: Makefile,v 1.221 2020/11/23 16:01:59 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -475,8 +475,8 @@ SED_CMDS.varname-dot-shell+=	-e 's,\[/[^
 # Some tests need an additional round of postprocessing.
 POSTPROC.deptgt-suffixes= awk '/^\#\*\*\* Suffixes/,/^never-stop/'
 POSTPROC.gnode-submake=	awk '/Input graph/, /^$$/'
+POSTPROC.opt-debug-graph1=	${STD_POSTPROC.dg1}
 POSTPROC.varname-empty=	${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p'
-# The directory cache contains the hard-coded '/usr/share/mk'.
 POSTPROC.suff-main-several=	${STD_POSTPROC.dg1}
 POSTPROC.suff-transform-debug=	${STD_POSTPROC.dg1}
 
@@ -495,6 +495,9 @@ 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>,'
+
+# The layout of the lines in the directory cache vary depending on the path
+# length, which cannot be predicted.  Therefore omit these lines.
 STD_POSTPROC.dg1=	awk '/Directory Cache/,/^$$/ { next } { print }'
 
 # End of the configuration helpers section.

Index: src/usr.bin/make/unit-tests/opt-debug-graph1.exp
diff -u src/usr.bin/make/unit-tests/opt-debug-graph1.exp:1.5 src/usr.bin/make/unit-tests/opt-debug-graph1.exp:1.6
--- src/usr.bin/make/unit-tests/opt-debug-graph1.exp:1.5	Sun Nov 22 18:25:43 2020
+++ src/usr.bin/make/unit-tests/opt-debug-graph1.exp	Mon Nov 23 16:01:59 2020
@@ -41,13 +41,6 @@ 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