Module Name: src Committed By: rillig Date: Sun Dec 6 21:22:04 UTC 2020
Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile deptgt-end-fail-indirect.mk deptgt-end-fail.exp deptgt-end-fail.mk Added Files: src/usr.bin/make/unit-tests: deptgt-end-fail-all.exp deptgt-end-fail-all.mk Log Message: make(1): add test for .END after failed main node To generate a diff of this commit: cvs rdiff -u -r1.982 -r1.983 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.236 -r1.237 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/deptgt-end-fail-all.exp \ src/usr.bin/make/unit-tests/deptgt-end-fail-all.mk cvs rdiff -u -r1.1 -r1.2 \ src/usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-end-fail.exp \ src/usr.bin/make/unit-tests/deptgt-end-fail.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.982 src/distrib/sets/lists/tests/mi:1.983 --- src/distrib/sets/lists/tests/mi:1.982 Tue Dec 1 22:16:36 2020 +++ src/distrib/sets/lists/tests/mi Sun Dec 6 21:22:04 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.982 2020/12/01 22:16:36 rillig Exp $ +# $NetBSD: mi,v 1.983 2020/12/06 21:22:04 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -4965,6 +4965,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-all.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/deptgt-end-fail-all.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 Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.236 src/usr.bin/make/unit-tests/Makefile:1.237 --- src/usr.bin/make/unit-tests/Makefile:1.236 Sat Dec 5 03:42:15 2020 +++ src/usr.bin/make/unit-tests/Makefile Sun Dec 6 21:22:04 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.236 2020/12/05 03:42:15 sjg Exp $ +# $NetBSD: Makefile,v 1.237 2020/12/06 21:22:04 rillig Exp $ # # Unit tests for make(1) # @@ -115,6 +115,7 @@ TESTS+= deptgt-default TESTS+= deptgt-delete_on_error TESTS+= deptgt-end TESTS+= deptgt-end-fail +TESTS+= deptgt-end-fail-all TESTS+= deptgt-end-fail-indirect TESTS+= deptgt-end-jobs TESTS+= deptgt-error Index: src/usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk diff -u src/usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk:1.1 src/usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk:1.2 --- src/usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk:1.1 Tue Nov 24 17:59:42 2020 +++ src/usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk Sun Dec 6 21:22:04 2020 @@ -1,4 +1,4 @@ -# $NetBSD: deptgt-end-fail-indirect.mk,v 1.1 2020/11/24 17:59:42 rillig Exp $ +# $NetBSD: deptgt-end-fail-indirect.mk,v 1.2 2020/12/06 21:22:04 rillig Exp $ # # Tests for an error in a dependency of the .END node. # @@ -10,6 +10,7 @@ all: : $@ .END: failing + : Making ${.TARGET} from ${.ALLSRC}. failing: .PHONY false Index: src/usr.bin/make/unit-tests/deptgt-end-fail.exp diff -u src/usr.bin/make/unit-tests/deptgt-end-fail.exp:1.2 src/usr.bin/make/unit-tests/deptgt-end-fail.exp:1.3 --- src/usr.bin/make/unit-tests/deptgt-end-fail.exp:1.2 Tue Nov 24 15:59:18 2020 +++ src/usr.bin/make/unit-tests/deptgt-end-fail.exp Sun Dec 6 21:22:04 2020 @@ -1,4 +1,5 @@ : all +: Making .END out of nothing. false *** Error code 1 (continuing) Index: src/usr.bin/make/unit-tests/deptgt-end-fail.mk diff -u src/usr.bin/make/unit-tests/deptgt-end-fail.mk:1.2 src/usr.bin/make/unit-tests/deptgt-end-fail.mk:1.3 --- src/usr.bin/make/unit-tests/deptgt-end-fail.mk:1.2 Tue Nov 24 17:59:42 2020 +++ src/usr.bin/make/unit-tests/deptgt-end-fail.mk Sun Dec 6 21:22:04 2020 @@ -1,4 +1,4 @@ -# $NetBSD: deptgt-end-fail.mk,v 1.2 2020/11/24 17:59:42 rillig Exp $ +# $NetBSD: deptgt-end-fail.mk,v 1.3 2020/12/06 21:22:04 rillig Exp $ # # Tests for an error in the .END node. # @@ -10,4 +10,5 @@ all: : $@ .END: + : Making ${.TARGET} out of nothing. false Added files: Index: src/usr.bin/make/unit-tests/deptgt-end-fail-all.exp diff -u /dev/null src/usr.bin/make/unit-tests/deptgt-end-fail-all.exp:1.1 --- /dev/null Sun Dec 6 21:22:05 2020 +++ src/usr.bin/make/unit-tests/deptgt-end-fail-all.exp Sun Dec 6 21:22:04 2020 @@ -0,0 +1,10 @@ +: Making all out of nothing. +false +*** Error code 1 (continuing) +: Making .END out of nothing. +false +*** Error code 1 (continuing) + +Stop. +make: stopped in unit-tests +exit status 1 Index: src/usr.bin/make/unit-tests/deptgt-end-fail-all.mk diff -u /dev/null src/usr.bin/make/unit-tests/deptgt-end-fail-all.mk:1.1 --- /dev/null Sun Dec 6 21:22:05 2020 +++ src/usr.bin/make/unit-tests/deptgt-end-fail-all.mk Sun Dec 6 21:22:04 2020 @@ -0,0 +1,13 @@ +# $NetBSD: deptgt-end-fail-all.mk,v 1.1 2020/12/06 21:22:04 rillig Exp $ +# +# Test whether the commands from the .END target are run even if there is +# an error before. The manual page says "after everything else is done", +# which leaves room for interpretation. + +all: .PHONY + : Making ${.TARGET} out of nothing. + false + +.END: + : Making ${.TARGET} out of nothing. + false