Module Name: src
Committed By: rillig
Date: Sat Oct 3 15:38:13 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: shell-csh.exp shell-csh.mk
Log Message:
make(1): demonstrate naive output filtering with csh in parallel mode
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/shell-csh.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/shell-csh.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/shell-csh.exp
diff -u src/usr.bin/make/unit-tests/shell-csh.exp:1.4 src/usr.bin/make/unit-tests/shell-csh.exp:1.5
--- src/usr.bin/make/unit-tests/shell-csh.exp:1.4 Sat Oct 3 15:28:37 2020
+++ src/usr.bin/make/unit-tests/shell-csh.exp Sat Oct 3 15:38:13 2020
@@ -5,4 +5,5 @@ echo always
always
echo ignore errors
ignore errors
+They chatted in the sy.
exit status 0
Index: src/usr.bin/make/unit-tests/shell-csh.mk
diff -u src/usr.bin/make/unit-tests/shell-csh.mk:1.3 src/usr.bin/make/unit-tests/shell-csh.mk:1.4
--- src/usr.bin/make/unit-tests/shell-csh.mk:1.3 Sat Oct 3 15:23:42 2020
+++ src/usr.bin/make/unit-tests/shell-csh.mk Sat Oct 3 15:38:13 2020
@@ -1,12 +1,17 @@
-# $NetBSD: shell-csh.mk,v 1.3 2020/10/03 15:23:42 rillig Exp $
+# $NetBSD: shell-csh.mk,v 1.4 2020/10/03 15:38:13 rillig Exp $
#
# Tests for using a C shell for running the commands.
+# The shell path must be an absolute path.
+# This is only obvious in parallel mode since in compat mode,
+# simple commands are executed via execve directly.
.SHELL: name="csh" path="${:!which csh!}"
-# The -j option is needed to cover the code in JobOutput.
+# In parallel mode, the commandShell->noPrint command is filtered from
+# the output, rather naively (in JobOutput).
#
-# FIXME: The "se " does not belong in the output.
+# Until 2020-10-03, the output in parallel mode was garbled because
+# the definition of the csh had been wrong since 1993 at least.
.MAKEFLAGS: -j1
all:
@@ -21,3 +26,7 @@ all:
# This command is both printed and executed.
-echo ignore errors
+
+ # In the C shell, "unset verbose" is set as the noPrint command.
+ # Therefore it is filtered from the output, rather naively.
+ @echo 'They chatted in the sunset verbosely.'