Module Name: src Committed By: rillig Date: Mon Dec 27 22:04:21 UTC 2021
Modified Files: src/usr.bin/make/unit-tests: opt-debug-file.exp opt-debug-file.mk Log Message: tests/make: cover a debug log file that cannot be opened To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/opt-debug-file.exp cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/opt-debug-file.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/unit-tests/opt-debug-file.exp diff -u src/usr.bin/make/unit-tests/opt-debug-file.exp:1.1 src/usr.bin/make/unit-tests/opt-debug-file.exp:1.2 --- src/usr.bin/make/unit-tests/opt-debug-file.exp:1.1 Sat Sep 5 06:20:51 2020 +++ src/usr.bin/make/unit-tests/opt-debug-file.exp Mon Dec 27 22:04:20 2021 @@ -1 +1,6 @@ -exit status 0 +Cannot open debug file opt-debug-file.debuglog/file +usage: make [-BeikNnqrSstWwX] + [-C directory] [-D variable] [-d flags] [-f makefile] + [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file] + [-V variable] [-v variable] [variable=value] [target ...] +exit status 2 Index: src/usr.bin/make/unit-tests/opt-debug-file.mk diff -u src/usr.bin/make/unit-tests/opt-debug-file.mk:1.4 src/usr.bin/make/unit-tests/opt-debug-file.mk:1.5 --- src/usr.bin/make/unit-tests/opt-debug-file.mk:1.4 Mon Oct 5 19:27:48 2020 +++ src/usr.bin/make/unit-tests/opt-debug-file.mk Mon Dec 27 22:04:20 2021 @@ -1,4 +1,4 @@ -# $NetBSD: opt-debug-file.mk,v 1.4 2020/10/05 19:27:48 rillig Exp $ +# $NetBSD: opt-debug-file.mk,v 1.5 2021/12/27 22:04:20 rillig Exp $ # # Tests for the -dF command line option, which redirects the debug log # to a file instead of writing it to stderr. @@ -31,7 +31,11 @@ DEBUG_OUTPUT:= ${:!cat opt-debug-file.de . error .endif + +# If the debug log file cannot be opened, make prints an error message. +.MAKEFLAGS: -dFopt-debug-file.debuglog/file + +# Clean up _!= rm opt-debug-file.debuglog all: - @:;