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): remove debug output from co...
details: https://anonhg.NetBSD.org/src/rev/44e20a1ec085
branches: trunk
changeset: 1014454:44e20a1ec085
user: rillig <rillig%NetBSD.org@localhost>
date: Wed Sep 23 07:54:08 2020 +0000
description:
make(1): remove debug output from counter tests
Now that the tests work as intended, the debug information is no longer
necessary. It was only intended to track down the cause of the
unexpected behavior.
diffstat:
usr.bin/make/unit-tests/Makefile | 5 +-
usr.bin/make/unit-tests/counter-append.exp | 65 ----------------------------
usr.bin/make/unit-tests/counter-append.mk | 4 +-
usr.bin/make/unit-tests/counter.exp | 68 ------------------------------
usr.bin/make/unit-tests/counter.mk | 4 +-
5 files changed, 3 insertions(+), 143 deletions(-)
diffs (200 lines):
diff -r 5e0c70a53779 -r 44e20a1ec085 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile Wed Sep 23 07:50:58 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile Wed Sep 23 07:54:08 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.147 2020/09/23 03:33:55 rillig Exp $
+# $NetBSD: Makefile,v 1.148 2020/09/23 07:54:08 rillig Exp $
#
# Unit tests for make(1)
#
@@ -397,9 +397,6 @@
SED_CMDS.varname-dot-shell+= -e 's,\[/[^]]*\],[(details omitted)],'
# Some tests need an additional round of postprocessing.
-POSTPROC.counter= ${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p'
-POSTPROC.counter-append= ${POSTPROC.counter}
-
POSTPROC.deptgt-suffixes= \
${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p'
POSTPROC.vardebug= ${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p'
diff -r 5e0c70a53779 -r 44e20a1ec085 usr.bin/make/unit-tests/counter-append.exp
--- a/usr.bin/make/unit-tests/counter-append.exp Wed Sep 23 07:50:58 2020 +0000
+++ b/usr.bin/make/unit-tests/counter-append.exp Wed Sep 23 07:54:08 2020 +0000
@@ -1,67 +1,2 @@
-Global:RELEVANT = yes (load-time part)
-Global:COUNTER =
-Global:NEXT = ${COUNTER::+=a}${COUNTER:[#]}
-Global:A =
-Var_Parse: ${NEXT} with VARE_WANTRES|VARE_ASSIGN
-Var_Parse: ${COUNTER::+=a}${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER::...} to "" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Modifier part: "a"
-Global:COUNTER = a
-Result of ${COUNTER::+=a} is "" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Var_Parse: ${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER:[...} to " a" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Modifier part: "#"
-Result of ${COUNTER:[#]} is "1" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Global:A = 1
-Global:B =
-Var_Parse: ${NEXT} with VARE_WANTRES|VARE_ASSIGN
-Var_Parse: ${COUNTER::+=a}${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER::...} to " a" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Modifier part: "a"
-Global:COUNTER = a a
-Result of ${COUNTER::+=a} is "" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Var_Parse: ${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER:[...} to " a a" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Modifier part: "#"
-Result of ${COUNTER:[#]} is "2" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Global:B = 2
-Global:C =
-Var_Parse: ${NEXT} with VARE_WANTRES|VARE_ASSIGN
-Var_Parse: ${COUNTER::+=a}${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER::...} to " a a" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Modifier part: "a"
-Global:COUNTER = a a a
-Result of ${COUNTER::+=a} is "" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Var_Parse: ${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER:[...} to " a a a" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Modifier part: "#"
-Result of ${COUNTER:[#]} is "3" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Global:C = 3
-Global:RELEVANT = no
-Global:RELEVANT = yes (run-time part)
-Result of ${RELEVANT::=yes (run-time part)} is "" (VARE_WANTRES, none, none)
-Var_Parse: ${A:Q} B=${B:Q} C=${C:Q} COUNTER=${COUNTER:[#]:Q} with VARE_WANTRES
-Applying ${A:Q} to "1" (VARE_WANTRES, none, none)
-QuoteMeta: [1]
-Result of ${A:Q} is "1" (VARE_WANTRES, none, none)
-Var_Parse: ${B:Q} C=${C:Q} COUNTER=${COUNTER:[#]:Q} with VARE_WANTRES
-Applying ${B:Q} to "2" (VARE_WANTRES, none, none)
-QuoteMeta: [2]
-Result of ${B:Q} is "2" (VARE_WANTRES, none, none)
-Var_Parse: ${C:Q} COUNTER=${COUNTER:[#]:Q} with VARE_WANTRES
-Applying ${C:Q} to "3" (VARE_WANTRES, none, none)
-QuoteMeta: [3]
-Result of ${C:Q} is "3" (VARE_WANTRES, none, none)
-Var_Parse: ${COUNTER:[#]:Q} with VARE_WANTRES
-Applying ${COUNTER:[...} to " a a a" (VARE_WANTRES, none, none)
-Modifier part: "#"
-Result of ${COUNTER:[#]} is "3" (VARE_WANTRES, none, none)
-Applying ${COUNTER:Q} to "3" (VARE_WANTRES, none, none)
-QuoteMeta: [3]
-Result of ${COUNTER:Q} is "3" (VARE_WANTRES, none, none)
A=1 B=2 C=3 COUNTER=3
-Var_Parse: ${RELEVANT::=no} with VARE_WANTRES
-Applying ${RELEVANT::...} to "yes (run-time part)" (VARE_WANTRES, none, none)
-Modifier part: "no"
-Global:RELEVANT = no
exit status 0
diff -r 5e0c70a53779 -r 44e20a1ec085 usr.bin/make/unit-tests/counter-append.mk
--- a/usr.bin/make/unit-tests/counter-append.mk Wed Sep 23 07:50:58 2020 +0000
+++ b/usr.bin/make/unit-tests/counter-append.mk Wed Sep 23 07:54:08 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: counter-append.mk,v 1.2 2020/09/23 07:50:58 rillig Exp $
+# $NetBSD: counter-append.mk,v 1.3 2020/09/23 07:54:08 rillig Exp $
#
# Demonstrates how to let make count the number of times a variable
# is actually accessed, using the ::+= variable modifier.
@@ -6,8 +6,6 @@
# This works since 2020-09-23. Before that, the counter ended up at having
# 6 words, even though the NEXT variable was only accessed 3 times.
-.MAKEFLAGS: -dv
-
RELEVANT= yes (load-time part) # just to filter the output
COUNTER= # zero
diff -r 5e0c70a53779 -r 44e20a1ec085 usr.bin/make/unit-tests/counter.exp
--- a/usr.bin/make/unit-tests/counter.exp Wed Sep 23 07:50:58 2020 +0000
+++ b/usr.bin/make/unit-tests/counter.exp Wed Sep 23 07:54:08 2020 +0000
@@ -1,70 +1,2 @@
-Global:RELEVANT = yes (load-time part)
-Global:COUNTER =
-Global:NEXT = ${COUNTER::=${COUNTER} a}${COUNTER:[#]}
-Global:A =
-Var_Parse: ${NEXT} with VARE_WANTRES|VARE_ASSIGN
-Var_Parse: ${COUNTER::=${COUNTER} a}${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER::...} to "" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Var_Parse: ${COUNTER} a}${COUNTER:[#]} with VARE_WANTRES
-Modifier part: " a"
-Global:COUNTER = a
-Result of ${COUNTER::=${COUNTER} a} is "" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Var_Parse: ${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER:[...} to " a" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Modifier part: "#"
-Result of ${COUNTER:[#]} is "1" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Global:A = 1
-Global:B =
-Var_Parse: ${NEXT} with VARE_WANTRES|VARE_ASSIGN
-Var_Parse: ${COUNTER::=${COUNTER} a}${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER::...} to " a" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Var_Parse: ${COUNTER} a}${COUNTER:[#]} with VARE_WANTRES
-Modifier part: " a a"
-Global:COUNTER = a a
-Result of ${COUNTER::=${COUNTER} a} is "" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Var_Parse: ${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER:[...} to " a a" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Modifier part: "#"
-Result of ${COUNTER:[#]} is "2" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Global:B = 2
-Global:C =
-Var_Parse: ${NEXT} with VARE_WANTRES|VARE_ASSIGN
-Var_Parse: ${COUNTER::=${COUNTER} a}${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER::...} to " a a" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Var_Parse: ${COUNTER} a}${COUNTER:[#]} with VARE_WANTRES
-Modifier part: " a a a"
-Global:COUNTER = a a a
-Result of ${COUNTER::=${COUNTER} a} is "" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Var_Parse: ${COUNTER:[#]} with VARE_WANTRES|VARE_ASSIGN
-Applying ${COUNTER:[...} to " a a a" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Modifier part: "#"
-Result of ${COUNTER:[#]} is "3" (VARE_WANTRES|VARE_ASSIGN, none, none)
-Global:C = 3
-Global:RELEVANT = no
-Global:RELEVANT = yes (run-time part)
-Result of ${RELEVANT::=yes (run-time part)} is "" (VARE_WANTRES, none, none)
-Var_Parse: ${A:Q} B=${B:Q} C=${C:Q} COUNTER=${COUNTER:[#]:Q} with VARE_WANTRES
-Applying ${A:Q} to "1" (VARE_WANTRES, none, none)
-QuoteMeta: [1]
-Result of ${A:Q} is "1" (VARE_WANTRES, none, none)
-Var_Parse: ${B:Q} C=${C:Q} COUNTER=${COUNTER:[#]:Q} with VARE_WANTRES
-Applying ${B:Q} to "2" (VARE_WANTRES, none, none)
-QuoteMeta: [2]
-Result of ${B:Q} is "2" (VARE_WANTRES, none, none)
-Var_Parse: ${C:Q} COUNTER=${COUNTER:[#]:Q} with VARE_WANTRES
-Applying ${C:Q} to "3" (VARE_WANTRES, none, none)
-QuoteMeta: [3]
-Result of ${C:Q} is "3" (VARE_WANTRES, none, none)
-Var_Parse: ${COUNTER:[#]:Q} with VARE_WANTRES
-Applying ${COUNTER:[...} to " a a a" (VARE_WANTRES, none, none)
-Modifier part: "#"
-Result of ${COUNTER:[#]} is "3" (VARE_WANTRES, none, none)
-Applying ${COUNTER:Q} to "3" (VARE_WANTRES, none, none)
-QuoteMeta: [3]
-Result of ${COUNTER:Q} is "3" (VARE_WANTRES, none, none)
A=1 B=2 C=3 COUNTER=3
-Var_Parse: ${RELEVANT::=no} with VARE_WANTRES
-Applying ${RELEVANT::...} to "yes (run-time part)" (VARE_WANTRES, none, none)
-Modifier part: "no"
-Global:RELEVANT = no
exit status 0
diff -r 5e0c70a53779 -r 44e20a1ec085 usr.bin/make/unit-tests/counter.mk
--- a/usr.bin/make/unit-tests/counter.mk Wed Sep 23 07:50:58 2020 +0000
+++ b/usr.bin/make/unit-tests/counter.mk Wed Sep 23 07:54:08 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: counter.mk,v 1.3 2020/09/23 07:50:58 rillig Exp $
+# $NetBSD: counter.mk,v 1.4 2020/09/23 07:54:08 rillig Exp $
#
# Demonstrates how to let make count the number of times a variable
# is actually accessed, using the ::= variable modifier.
@@ -6,8 +6,6 @@
# This works since 2020-09-23. Before that, the counter ended up at having
# 4 words, even though the NEXT variable was only accessed 3 times.
-.MAKEFLAGS: -dv
-
RELEVANT= yes (load-time part) # just to filter the output
COUNTER= # zero
Home |
Main Index |
Thread Index |
Old Index