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 job command flags
details: https://anonhg.NetBSD.org/src/rev/bcfab78c219d
branches: trunk
changeset: 945793:bcfab78c219d
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Nov 07 20:01:17 2020 +0000
description:
make(1): add test for job command flags
diffstat:
distrib/sets/lists/tests/mi | 4 +++-
usr.bin/make/unit-tests/Makefile | 3 ++-
usr.bin/make/unit-tests/job-flags.exp | 8 ++++++++
usr.bin/make/unit-tests/job-flags.mk | 23 +++++++++++++++++++++++
4 files changed, 36 insertions(+), 2 deletions(-)
diffs (74 lines):
diff -r 8d3d3657000d -r bcfab78c219d distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Sat Nov 07 18:12:16 2020 +0000
+++ b/distrib/sets/lists/tests/mi Sat Nov 07 20:01:17 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.961 2020/11/04 04:24:57 rillig Exp $
+# $NetBSD: mi,v 1.962 2020/11/07 20:01:17 rillig Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -5097,6 +5097,8 @@
./usr/tests/usr.bin/make/unit-tests/include-main.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/include-sub.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/include-subsub.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/job-flags.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/job-flags.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/job-output-long-lines.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/job-output-long-lines.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/lint.exp tests-usr.bin-tests compattestfile,atf
diff -r 8d3d3657000d -r bcfab78c219d usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile Sat Nov 07 18:12:16 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile Sat Nov 07 20:01:17 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.188 2020/11/04 04:24:57 rillig Exp $
+# $NetBSD: Makefile,v 1.189 2020/11/07 20:01:17 rillig Exp $
#
# Unit tests for make(1)
#
@@ -175,6 +175,7 @@
TESTS+= hanoi-include
TESTS+= impsrc
TESTS+= include-main
+TESTS+= job-flags
TESTS+= job-output-long-lines
TESTS+= lint
TESTS+= make-exported
diff -r 8d3d3657000d -r bcfab78c219d usr.bin/make/unit-tests/job-flags.exp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/job-flags.exp Sat Nov 07 20:01:17 2020 +0000
@@ -0,0 +1,8 @@
+.BEGIN
+silent
+ignore
+true in ignore
+false in ignore
+*** [ignore] Error code 1 (ignored)
+.END
+exit status 0
diff -r 8d3d3657000d -r bcfab78c219d usr.bin/make/unit-tests/job-flags.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/job-flags.mk Sat Nov 07 20:01:17 2020 +0000
@@ -0,0 +1,23 @@
+# $NetBSD: job-flags.mk,v 1.1 2020/11/07 20:01:17 rillig Exp $
+#
+# Tests for Job.flags, which are controlled by special source dependencies
+# like .SILENT or .IGNORE, as well as the command line options -s or -i.
+
+.MAKEFLAGS: -j1
+
+all: silent .WAIT ignore
+
+.BEGIN:
+ @echo $@
+
+silent: .SILENT
+ echo $@
+
+ignore: .IGNORE
+ @echo $@
+ true in $@
+ false in $@
+ @echo 'Still there in $@'
+
+.END:
+ @echo $@
Home |
Main Index |
Thread Index |
Old Index