Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): make output of test opt-deb...



details:   https://anonhg.NetBSD.org/src/rev/392585d7af30
branches:  trunk
changeset: 978514:392585d7af30
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Nov 23 16:01:59 2020 +0000

description:
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.

diffstat:

 usr.bin/make/unit-tests/Makefile             |  7 +++++--
 usr.bin/make/unit-tests/opt-debug-graph1.exp |  7 -------
 2 files changed, 5 insertions(+), 9 deletions(-)

diffs (46 lines):

diff -r 9cbbf27d199a -r 392585d7af30 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Mon Nov 23 15:00:32 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Mon Nov 23 16:01:59 2020 +0000
@@ -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 @@
 # 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\.[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.
diff -r 9cbbf27d199a -r 392585d7af30 usr.bin/make/unit-tests/opt-debug-graph1.exp
--- a/usr.bin/make/unit-tests/opt-debug-graph1.exp      Mon Nov 23 15:00:32 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-debug-graph1.exp      Mon Nov 23 16:01:59 2020 +0000
@@ -41,13 +41,6 @@
 #*** 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



Home | Main Index | Thread Index | Old Index