Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[.joined/src/trunk]: .joined/src/usr.bin/make/unit-tests tests/make: demonstr...
details: https://anonhg.NetBSD.org/.joined/src/rev/287bf12e103a
branches: trunk
changeset: 359399:287bf12e103a
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jan 02 03:23:55 2022 +0000
description:
tests/make: demonstrate bugs in PrintStackTrace
diffstat:
usr.bin/make/unit-tests/opt-debug-parse.exp | 9 +++++++++
usr.bin/make/unit-tests/opt-debug-parse.mk | 21 ++++++++++++++++++---
2 files changed, 27 insertions(+), 3 deletions(-)
diffs (45 lines):
diff -r 0f80af7c3171 -r 287bf12e103a usr.bin/make/unit-tests/opt-debug-parse.exp
--- a/usr.bin/make/unit-tests/opt-debug-parse.exp Sun Jan 02 02:57:39 2022 +0000
+++ b/usr.bin/make/unit-tests/opt-debug-parse.exp Sun Jan 02 03:23:55 2022 +0000
@@ -1,1 +1,10 @@
+Parse_PushInput: .for loop in opt-debug-parse.mk, line 16
+SetFilenameVars: ${.PARSEDIR} = `<curdir>' ${.PARSEFILE} = `opt-debug-parse.mk'
+Parsing line 17: .info trace with multi-line .for loop head
+make: "opt-debug-parse.mk" line 17: trace with multi-line .for loop head
+ in .include from opt-debug-parse.mk:18
+ParseEOF: returning to file opt-debug-parse.mk, line 18
+SetFilenameVars: ${.PARSEDIR} = `<curdir>' ${.PARSEFILE} = `opt-debug-parse.mk'
+Parsing line 22: .MAKEFLAGS: -d0
+ParseDependency(.MAKEFLAGS: -d0)
exit status 0
diff -r 0f80af7c3171 -r 287bf12e103a usr.bin/make/unit-tests/opt-debug-parse.mk
--- a/usr.bin/make/unit-tests/opt-debug-parse.mk Sun Jan 02 02:57:39 2022 +0000
+++ b/usr.bin/make/unit-tests/opt-debug-parse.mk Sun Jan 02 03:23:55 2022 +0000
@@ -1,9 +1,24 @@
-# $NetBSD: opt-debug-parse.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+# $NetBSD: opt-debug-parse.mk,v 1.2 2022/01/02 03:23:55 rillig Exp $
#
# Tests for the -dp command line option, which adds debug logging about
# makefile parsing.
+.MAKEFLAGS: -dp
+
# TODO: Implementation
-all:
- @:;
+# In PrintStackTrace, the line number of the .for loop is wrong. The actual
+# line number printed is the last line before the loop body, while it should
+# rather be the line number where the .for loop starts.
+.for \
+ var \
+ in \
+ value
+.info trace with multi-line .for loop head
+.endfor
+# FIXME: The .exp file says 'in .include from opt-debug-parse.mk:18', which is
+# completely wrong. It should rather say 'in .for loop from :13'.
+
+.MAKEFLAGS: -d0
+
+all: .PHONY
Home |
Main Index |
Thread Index |
Old Index