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): demonstrate naive output fi...



details:   https://anonhg.NetBSD.org/src/rev/53b929abad88
branches:  trunk
changeset: 1014801:53b929abad88
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 03 15:38:13 2020 +0000

description:
make(1): demonstrate naive output filtering with csh in parallel mode

diffstat:

 usr.bin/make/unit-tests/shell-csh.exp |   1 +
 usr.bin/make/unit-tests/shell-csh.mk  |  15 ++++++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r f854c7696b7b -r 53b929abad88 usr.bin/make/unit-tests/shell-csh.exp
--- a/usr.bin/make/unit-tests/shell-csh.exp     Sat Oct 03 15:28:37 2020 +0000
+++ b/usr.bin/make/unit-tests/shell-csh.exp     Sat Oct 03 15:38:13 2020 +0000
@@ -5,4 +5,5 @@
 always
 echo ignore errors
 ignore errors
+They chatted in the sy.
 exit status 0
diff -r f854c7696b7b -r 53b929abad88 usr.bin/make/unit-tests/shell-csh.mk
--- a/usr.bin/make/unit-tests/shell-csh.mk      Sat Oct 03 15:28:37 2020 +0000
+++ b/usr.bin/make/unit-tests/shell-csh.mk      Sat Oct 03 15:38:13 2020 +0000
@@ -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 @@
 
        # 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.'



Home | Main Index | Thread Index | Old Index