Module Name: src
Committed By: rillig
Date: Fri Oct 23 05:44:02 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: varname-make_print_var_on_error.exp
varname-make_print_var_on_error.mk
Log Message:
make(1): add test for MAKE_PRINT_VAR_ON_ERROR
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/usr.bin/make/unit-tests/varname-make_print_var_on_error.exp
cvs rdiff -u -r1.2 -r1.3 \
src/usr.bin/make/unit-tests/varname-make_print_var_on_error.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/varname-make_print_var_on_error.exp
diff -u src/usr.bin/make/unit-tests/varname-make_print_var_on_error.exp:1.1 src/usr.bin/make/unit-tests/varname-make_print_var_on_error.exp:1.2
--- src/usr.bin/make/unit-tests/varname-make_print_var_on_error.exp:1.1 Sun Aug 16 12:07:52 2020
+++ src/usr.bin/make/unit-tests/varname-make_print_var_on_error.exp Fri Oct 23 05:44:02 2020
@@ -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
Index: src/usr.bin/make/unit-tests/varname-make_print_var_on_error.mk
diff -u src/usr.bin/make/unit-tests/varname-make_print_var_on_error.mk:1.2 src/usr.bin/make/unit-tests/varname-make_print_var_on_error.mk:1.3
--- src/usr.bin/make/unit-tests/varname-make_print_var_on_error.mk:1.2 Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/varname-make_print_var_on_error.mk Fri Oct 23 05:44:02 2020
@@ -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.