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 error in depen...



details:   https://anonhg.NetBSD.org/src/rev/5c37ee6d506e
branches:  trunk
changeset: 1016581:5c37ee6d506e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Nov 24 17:59:42 2020 +0000

description:
make(1): add test for error in dependency of .END node in -k mode

diffstat:

 distrib/sets/lists/tests/mi                          |   4 +++-
 usr.bin/make/unit-tests/Makefile                     |   3 ++-
 usr.bin/make/unit-tests/deptgt-end-fail-indirect.exp |   4 ++++
 usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk  |  15 +++++++++++++++
 usr.bin/make/unit-tests/deptgt-end-fail.mk           |   6 +++---
 5 files changed, 27 insertions(+), 5 deletions(-)

diffs (79 lines):

diff -r 97274c983cb8 -r 5c37ee6d506e distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Tue Nov 24 17:42:31 2020 +0000
+++ b/distrib/sets/lists/tests/mi       Tue Nov 24 17:59:42 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.976 2020/11/24 15:36:51 rillig Exp $
+# $NetBSD: mi,v 1.977 2020/11/24 17:59:42 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4961,6 +4961,8 @@
 ./usr/tests/usr.bin/make/unit-tests/deptgt-default.mk                          tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/deptgt-delete_on_error.exp                 tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/deptgt-delete_on_error.mk                  tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/deptgt-end-fail-indirect.exp               tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk                        tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/deptgt-end-fail.exp                                tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/deptgt-end-fail.mk                         tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/deptgt-end-jobs.exp                                tests-usr.bin-tests     compattestfile,atf
diff -r 97274c983cb8 -r 5c37ee6d506e usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Tue Nov 24 17:42:31 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Tue Nov 24 17:59:42 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.222 2020/11/24 15:36:51 rillig Exp $
+# $NetBSD: Makefile,v 1.223 2020/11/24 17:59:42 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -113,6 +113,7 @@
 TESTS+=                deptgt-delete_on_error
 TESTS+=                deptgt-end
 TESTS+=                deptgt-end-fail
+TESTS+=                deptgt-end-fail-indirect
 TESTS+=                deptgt-end-jobs
 TESTS+=                deptgt-error
 TESTS+=                deptgt-ignore
diff -r 97274c983cb8 -r 5c37ee6d506e usr.bin/make/unit-tests/deptgt-end-fail-indirect.exp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/deptgt-end-fail-indirect.exp      Tue Nov 24 17:59:42 2020 +0000
@@ -0,0 +1,4 @@
+: all
+false
+*** Error code 1 (continuing)
+exit status 0
diff -r 97274c983cb8 -r 5c37ee6d506e usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk       Tue Nov 24 17:59:42 2020 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: deptgt-end-fail-indirect.mk,v 1.1 2020/11/24 17:59:42 rillig Exp $
+#
+# Tests for an error in a dependency of the .END node.
+#
+# Before 2020-11-25, an error in the .END target did not print the "Stop."
+# and exited with status 0.  The cause for this was a missing condition in
+# Compat_Run in the handling of the .END node.
+
+all:
+       : $@
+
+.END: failing
+
+failing: .PHONY
+       false
diff -r 97274c983cb8 -r 5c37ee6d506e usr.bin/make/unit-tests/deptgt-end-fail.mk
--- a/usr.bin/make/unit-tests/deptgt-end-fail.mk        Tue Nov 24 17:42:31 2020 +0000
+++ b/usr.bin/make/unit-tests/deptgt-end-fail.mk        Tue Nov 24 17:59:42 2020 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: deptgt-end-fail.mk,v 1.1 2020/11/24 15:36:51 rillig Exp $
+# $NetBSD: deptgt-end-fail.mk,v 1.2 2020/11/24 17:59:42 rillig Exp $
 #
 # Tests for an error in the .END node.
 #
 # Before 2020-11-25, an error in the .END target did not print the "Stop.",
-# even though this was intended.  The cause for this was a simple typo in
-# a variable name.
+# even though this was intended.  The cause for this was a missing condition
+# in Compat_Run, in the code handling the .END node.
 
 all:
        : $@



Home | Main Index | Thread Index | Old Index