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 tests/make: cover a debug log file t...



details:   https://anonhg.NetBSD.org/src/rev/8a579528fe3c
branches:  trunk
changeset: 1029215:8a579528fe3c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Dec 27 22:04:20 2021 +0000

description:
tests/make: cover a debug log file that cannot be opened

diffstat:

 usr.bin/make/unit-tests/opt-debug-file.exp |  7 ++++++-
 usr.bin/make/unit-tests/opt-debug-file.mk  |  8 ++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r f07108244dc8 -r 8a579528fe3c usr.bin/make/unit-tests/opt-debug-file.exp
--- a/usr.bin/make/unit-tests/opt-debug-file.exp        Mon Dec 27 21:27:25 2021 +0000
+++ b/usr.bin/make/unit-tests/opt-debug-file.exp        Mon Dec 27 22:04:20 2021 +0000
@@ -1,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
diff -r f07108244dc8 -r 8a579528fe3c usr.bin/make/unit-tests/opt-debug-file.mk
--- a/usr.bin/make/unit-tests/opt-debug-file.mk Mon Dec 27 21:27:25 2021 +0000
+++ b/usr.bin/make/unit-tests/opt-debug-file.mk Mon Dec 27 22:04:20 2021 +0000
@@ -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 @@
 .  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:
-       @:;



Home | Main Index | Thread Index | Old Index