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): add test for the -dg1 option
details: https://anonhg.NetBSD.org/src/rev/ece838cd26cd
branches: trunk
changeset: 943145:ece838cd26cd
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Aug 27 19:00:17 2020 +0000
description:
make(1): add test for the -dg1 option
diffstat:
distrib/sets/lists/tests/mi | 4 +++-
usr.bin/make/unit-tests/Makefile | 7 ++++++-
usr.bin/make/unit-tests/opt-debug-g1.exp | 22 ++++++++++++++++++++++
usr.bin/make/unit-tests/opt-debug-g1.mk | 19 +++++++++++++++++++
4 files changed, 50 insertions(+), 2 deletions(-)
diffs (102 lines):
diff -r 8d881d258359 -r ece838cd26cd distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Thu Aug 27 18:51:20 2020 +0000
+++ b/distrib/sets/lists/tests/mi Thu Aug 27 19:00:17 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.909 2020/08/27 15:32:37 riastradh Exp $
+# $NetBSD: mi,v 1.910 2020/08/27 19:00:17 rillig Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -4804,6 +4804,8 @@
./usr/tests/usr.bin/make/unit-tests/opt-backwards.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-chdir.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-chdir.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-g1.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-debug-g1.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-debug.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-debug.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/opt-define.exp tests-usr.bin-tests compattestfile,atf
diff -r 8d881d258359 -r ece838cd26cd usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile Thu Aug 27 18:51:20 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile Thu Aug 27 19:00:17 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.119 2020/08/23 14:46:33 rillig Exp $
+# $NetBSD: Makefile,v 1.120 2020/08/27 19:00:17 rillig Exp $
#
# Unit tests for make(1)
#
@@ -168,6 +168,7 @@
TESTS+= opt-backwards
TESTS+= opt-chdir
TESTS+= opt-debug
+TESTS+= opt-debug-g1
TESTS+= opt-define
TESTS+= opt-env
TESTS+= opt-file
@@ -325,6 +326,7 @@
FLAGS.envfirst= -e
FLAGS.export= # none
FLAGS.lint= -dL -k
+FLAGS.opt-debug-g1= -dg1
FLAGS.opt-ignore= -i
FLAGS.opt-keep-going= -k
FLAGS.opt-no-action= -n
@@ -341,6 +343,9 @@
FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain'
# Some tests need extra post-processing.
+SED_CMDS.opt-debug-g1= -e 's,${.CURDIR},CURDIR,'
+SED_CMDS.opt-debug-g1+= -e 's,[/[a-z]*/share/mk,/.../share/mk,'
+SED_CMDS.opt-debug-g1+= -e '/Global Variables/,/Directory Cache/d'
SED_CMDS.sh-dots+= -e 's,^${.SHELL}: ,,' -e '/not found/s,command ,,'
SED_CMDS.varmod-subst-regex+= \
-e 's,\(Regex compilation error:\).*,\1 (details omitted),'
diff -r 8d881d258359 -r ece838cd26cd usr.bin/make/unit-tests/opt-debug-g1.exp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/opt-debug-g1.exp Thu Aug 27 19:00:17 2020 +0000
@@ -0,0 +1,22 @@
+#*** Input graph:
+# all, made UNMADE, type OP_DEPENDS, flags none
+# made-target, made UNMADE, type OP_DEPENDS, flags none
+# made-target-no-sources, made UNMADE, type OP_DEPENDS, flags none
+# made-source, made UNMADE, type OP_DEPENDS, flags none
+# unmade-target, made UNMADE, type OP_DEPENDS, flags none
+# unmade-sources, made UNMADE, type none, flags none
+# unmade-target-no-sources, made UNMADE, type OP_DEPENDS, flags none
+
+
+#
+# Files that are only sources:
+# unmade-sources [unmade-sources]
+# Stats: 0 hits 2 misses 0 near misses 0 losers (0%)
+# directory referenced hits
+# CURDIR 2 0
+# . 2 0
+# /.../share/mk 1 0
+
+#*** Suffixes:
+#*** Transformations:
+exit status 0
diff -r 8d881d258359 -r ece838cd26cd usr.bin/make/unit-tests/opt-debug-g1.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/opt-debug-g1.mk Thu Aug 27 19:00:17 2020 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: opt-debug-g1.mk,v 1.1 2020/08/27 19:00:17 rillig Exp $
+#
+# Tests for the -dg1 command line option, which prints the input
+# graph before making anything.
+
+all: made-target made-target-no-sources
+
+made-target: made-source
+
+made-source:
+
+made-target-no-sources:
+
+unmade-target: unmade-sources
+
+unmade-target-no-sources:
+
+all:
+ @:;
Home |
Main Index |
Thread Index |
Old Index