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 MAKE_PRINT_VAR...
details: https://anonhg.NetBSD.org/src/rev/0838fef1eb39
branches: trunk
changeset: 956152:0838fef1eb39
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Oct 23 05:44:02 2020 +0000
description:
make(1): add test for MAKE_PRINT_VAR_ON_ERROR
diffstat:
usr.bin/make/unit-tests/varname-make_print_var_on_error.exp | 9 ++++++-
usr.bin/make/unit-tests/varname-make_print_var_on_error.mk | 15 +++++++++---
2 files changed, 19 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r 8693d6178978 -r 0838fef1eb39 usr.bin/make/unit-tests/varname-make_print_var_on_error.exp
--- a/usr.bin/make/unit-tests/varname-make_print_var_on_error.exp Fri Oct 23 05:27:33 2020 +0000
+++ b/usr.bin/make/unit-tests/varname-make_print_var_on_error.exp Fri Oct 23 05:44:02 2020 +0000
@@ -1,1 +1,8 @@
-exit status 0
+fail
+*** Error code 1 (continuing)
+
+Stop.
+make: stopped in unit-tests
+.ERROR_TARGET='all'
+.ERROR_CMD=''
+exit status 1
diff -r 8693d6178978 -r 0838fef1eb39 usr.bin/make/unit-tests/varname-make_print_var_on_error.mk
--- a/usr.bin/make/unit-tests/varname-make_print_var_on_error.mk Fri Oct 23 05:27:33 2020 +0000
+++ b/usr.bin/make/unit-tests/varname-make_print_var_on_error.mk Fri Oct 23 05:44:02 2020 +0000
@@ -1,8 +1,15 @@
-# $NetBSD: varname-make_print_var_on_error.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: varname-make_print_var_on_error.mk,v 1.3 2020/10/23 05:44:02 rillig Exp $
#
-# Tests for the special .MAKE.PRINT_VAR_ON_ERROR variable.
+# Tests for the special MAKE_PRINT_VAR_ON_ERROR variable, which prints the
+# values of selected variables on error.
-# TODO: Implementation
+MAKE_PRINT_VAR_ON_ERROR= .ERROR_TARGET .ERROR_CMD
all:
- @:;
+ @: command before
+ @echo fail; false
+ @: command after
+
+# XXX: As of 2020-10-23, the .ERROR_CMD variable seems pointless since at
+# that point, the first command in gn->commands has been set to NULL already.
+# And because of this, .ERROR_CMD stays an empty list.
Home |
Main Index |
Thread Index |
Old Index