Sat Aug 29 10:52:47 2020 UTC ()
make(1): fix test opt-debug-g1

Including the directory cache made the test output fragile.


(rillig)
diff -r1.124 -r1.125 src/usr.bin/make/unit-tests/Makefile
diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/opt-debug-g1.exp

cvs diff -r1.124 -r1.125 src/usr.bin/make/unit-tests/Makefile (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/Makefile 2020/08/28 15:40:53 1.124
+++ src/usr.bin/make/unit-tests/Makefile 2020/08/29 10:52:47 1.125
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.124 2020/08/28 15:40:53 rillig Exp $ 1# $NetBSD: Makefile,v 1.125 2020/08/29 10:52:47 rillig Exp $
2# 2#
3# Unit tests for make(1) 3# Unit tests for make(1)
4# 4#
5# The main targets are: 5# The main targets are:
6# 6#
7# all: 7# all:
8# run all the tests 8# run all the tests
9# test: 9# test:
10# run 'all', and compare to expected results 10# run 'all', and compare to expected results
11# accept: 11# accept:
12# move generated output to expected results 12# move generated output to expected results
13# 13#
14# Settable variables 14# Settable variables
@@ -340,27 +340,27 @@ FLAGS.opt-var-expanded= -v VAR -v VALUE @@ -340,27 +340,27 @@ FLAGS.opt-var-expanded= -v VAR -v VALUE
340FLAGS.opt-var-literal= -V VAR -V VALUE 340FLAGS.opt-var-literal= -V VAR -V VALUE
341FLAGS.opt-warnings-as-errors= -W 341FLAGS.opt-warnings-as-errors= -W
342FLAGS.order= -j1 342FLAGS.order= -j1
343FLAGS.recursive= -dL 343FLAGS.recursive= -dL
344FLAGS.sh-leading-plus= -n 344FLAGS.sh-leading-plus= -n
345FLAGS.vardebug= -k -dv FROM_CMDLINE= 345FLAGS.vardebug= -k -dv FROM_CMDLINE=
346FLAGS.varmod-match-escape= -dv 346FLAGS.varmod-match-escape= -dv
347FLAGS.varname-dot-shell= -dpv 347FLAGS.varname-dot-shell= -dpv
348FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain' 348FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain'
349 349
350# Some tests need extra post-processing. 350# Some tests need extra post-processing.
351SED_CMDS.opt-debug-g1= -e 's,${.CURDIR},CURDIR,' 351SED_CMDS.opt-debug-g1= -e 's,${.CURDIR},CURDIR,'
352SED_CMDS.opt-debug-g1+= -e 's,[/[a-z]*/share/mk,/.../share/mk,' 352SED_CMDS.opt-debug-g1+= -e 's,[/[a-z]*/share/mk,/.../share/mk,'
353SED_CMDS.opt-debug-g1+= -e '/Global Variables/,/Directory Cache/d' 353SED_CMDS.opt-debug-g1+= -e '/Global Variables:/,/Suffixes:/d'
354SED_CMDS.sh-dots+= -e 's,^${.SHELL}: ,,' -e '/not found/s,command ,,' 354SED_CMDS.sh-dots+= -e 's,^${.SHELL}: ,,' -e '/not found/s,command ,,'
355SED_CMDS.varmod-subst-regex+= \ 355SED_CMDS.varmod-subst-regex+= \
356 -e 's,\(Regex compilation error:\).*,\1 (details omitted),' 356 -e 's,\(Regex compilation error:\).*,\1 (details omitted),'
357SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,' 357SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,'
358SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,' 358SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,'
359SED_CMDS.varshell+= -e '/command/s,No such.*,not found,' 359SED_CMDS.varshell+= -e '/command/s,No such.*,not found,'
360SED_CMDS.varname-dot-shell= -e 's, = /.*, = (details omitted),' 360SED_CMDS.varname-dot-shell= -e 's, = /.*, = (details omitted),'
361SED_CMDS.varname-dot-shell+= -e 's,"/[^"]*","(details omitted)",' 361SED_CMDS.varname-dot-shell+= -e 's,"/[^"]*","(details omitted)",'
362SED_CMDS.varname-dot-shell+= -e 's,\[/[^]]*\],[(details omitted)],' 362SED_CMDS.varname-dot-shell+= -e 's,\[/[^]]*\],[(details omitted)],'
363 363
364# Some tests need an additional round of postprocessing. 364# Some tests need an additional round of postprocessing.
365POSTPROC.counter= ${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p' 365POSTPROC.counter= ${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p'
366POSTPROC.deptgt-suffixes= \ 366POSTPROC.deptgt-suffixes= \

cvs diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/Attic/opt-debug-g1.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/Attic/opt-debug-g1.exp 2020/08/27 19:00:17 1.1
+++ src/usr.bin/make/unit-tests/Attic/opt-debug-g1.exp 2020/08/29 10:52:47 1.2
@@ -1,22 +1,15 @@ @@ -1,22 +1,15 @@
1#*** Input graph: 1#*** Input graph:
2# all, made UNMADE, type OP_DEPENDS, flags none 2# all, made UNMADE, type OP_DEPENDS, flags none
3# made-target, made UNMADE, type OP_DEPENDS, flags none 3# made-target, made UNMADE, type OP_DEPENDS, flags none
4# made-target-no-sources, made UNMADE, type OP_DEPENDS, flags none 4# made-target-no-sources, made UNMADE, type OP_DEPENDS, flags none
5# made-source, made UNMADE, type OP_DEPENDS, flags none 5# made-source, made UNMADE, type OP_DEPENDS, flags none
6# unmade-target, made UNMADE, type OP_DEPENDS, flags none 6# unmade-target, made UNMADE, type OP_DEPENDS, flags none
7# unmade-sources, made UNMADE, type none, flags none 7# unmade-sources, made UNMADE, type none, flags none
8# unmade-target-no-sources, made UNMADE, type OP_DEPENDS, flags none 8# unmade-target-no-sources, made UNMADE, type OP_DEPENDS, flags none
9 9
10 10
11# 11#
12# Files that are only sources: 12# Files that are only sources:
13# unmade-sources [unmade-sources]  13# unmade-sources [unmade-sources]
14# Stats: 0 hits 2 misses 0 near misses 0 losers (0%) 
15# directory referenced hits 
16# CURDIR 2 0 
17# . 2 0 
18# /.../share/mk 1 0 
19 
20#*** Suffixes: 
21#*** Transformations: 14#*** Transformations:
22exit status 0 15exit status 0