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): refine test for combining -...



details:   https://anonhg.NetBSD.org/src/rev/d145ed9b7529
branches:  trunk
changeset: 978960:d145ed9b7529
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Dec 09 07:24:52 2020 +0000

description:
make(1): refine test for combining -j1 and -n

diffstat:

 usr.bin/make/unit-tests/opt-jobs-no-action.exp |  22 +++++++++++++---------
 usr.bin/make/unit-tests/opt-jobs-no-action.mk  |  19 +++++++++++--------
 2 files changed, 24 insertions(+), 17 deletions(-)

diffs (112 lines):

diff -r 28ccb287c827 -r d145ed9b7529 usr.bin/make/unit-tests/opt-jobs-no-action.exp
--- a/usr.bin/make/unit-tests/opt-jobs-no-action.exp    Wed Dec 09 07:10:01 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-jobs-no-action.exp    Wed Dec 09 07:24:52 2020 +0000
@@ -22,51 +22,55 @@
 silent=no always=no ignerr=no
 # .echoOff
 # .errOnOrEcho
-echo "true"
+echo "echo running"
 # .errExit
-{ true 
+{ echo running 
 } || exit $?
 # .echoOn
 echo
 
 echo silent=no always=no ignerr=yes
 silent=no always=no ignerr=yes
-false
+echo running; false
 echo
 
 echo silent=no always=yes ignerr=no
 silent=no always=yes ignerr=no
-true
+echo running
+running
 echo
 
 echo silent=no always=yes ignerr=yes
 silent=no always=yes ignerr=yes
-false
+echo running; false
+running
 *** Error code 1 (ignored)
 echo
 
 echo silent=yes always=no ignerr=no
 silent=yes always=no ignerr=no
 # .errExit
-{ true 
+{ echo running 
 } || exit $?
 # .echoOn
 echo
 
 echo silent=yes always=no ignerr=yes
 silent=yes always=no ignerr=yes
-false
+echo running; false
 # .echoOn
 echo
 
 echo silent=yes always=yes ignerr=no
 silent=yes always=yes ignerr=no
-true
+echo running
+running
 echo
 
 echo silent=yes always=yes ignerr=yes
 silent=yes always=yes ignerr=yes
-false
+echo running; false
+running
 *** Error code 1 (ignored)
 echo
 
diff -r 28ccb287c827 -r d145ed9b7529 usr.bin/make/unit-tests/opt-jobs-no-action.mk
--- a/usr.bin/make/unit-tests/opt-jobs-no-action.mk     Wed Dec 09 07:10:01 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-jobs-no-action.mk     Wed Dec 09 07:24:52 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: opt-jobs-no-action.mk,v 1.2 2020/12/09 00:43:48 rillig Exp $
+# $NetBSD: opt-jobs-no-action.mk,v 1.3 2020/12/09 07:24:52 rillig Exp $
 #
 # Tests for the combination of the options -j and -n, which prints the
 # commands instead of actually running them.
@@ -30,13 +30,6 @@
        ignore="\# .errOffOrExecIgnore\n""%s\n" \
        errout="\# .errExit\n""{ %s \n} || exit $$?\n"
 
-SILENT.no=     # none
-SILENT.yes=    @
-ALWAYS.no=     # none
-ALWAYS.yes=    +
-IGNERR.no=     true
-IGNERR.yes=    -false
-
 all: documented combined
 .ORDER: documented combined
 
@@ -64,10 +57,20 @@
 
        @+echo
 
+
 # Test all combinations of the 3 RunFlags.
 #
 # TODO: Closely inspect the output whether it makes sense.
 # XXX: The output should not contain the 'echo silent=...' lines.
+# XXX: silent=no always=no ignerr={no,yes} should be almost the same.
+#
+SILENT.no=     # none
+SILENT.yes=    @
+ALWAYS.no=     # none
+ALWAYS.yes=    +
+IGNERR.no=     echo running
+IGNERR.yes=    -echo running; false
+#
 combined:
        @+echo 'begin $@'
        @+echo



Home | Main Index | Thread Index | Old Index