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): fix test for command flags



details:   https://anonhg.NetBSD.org/src/rev/65a5122c3384
branches:  trunk
changeset: 957759:65a5122c3384
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Dec 10 17:55:30 2020 +0000

description:
make(1): fix test for command flags

The "false" is supposed to be run not only if the command has the '-'
flag, but also if the target is marked as .IGNORE or if the command line
option -i is given.

After the failed command, the remaining commands are skipped, therefore
the final echo for the empty line had to be moved up, at the beginning
of the target.

diffstat:

 usr.bin/make/unit-tests/sh-flags.exp |  2040 +++++++++++++++++++++++----------
 usr.bin/make/unit-tests/sh-flags.mk  |    20 +-
 2 files changed, 1449 insertions(+), 611 deletions(-)

diffs (truncated from 6058 to 300 lines):

diff -r a3f7978a3ca6 -r 65a5122c3384 usr.bin/make/unit-tests/sh-flags.exp
--- a/usr.bin/make/unit-tests/sh-flags.exp      Thu Dec 10 17:06:13 2020 +0000
+++ b/usr.bin/make/unit-tests/sh-flags.exp      Thu Dec 10 17:55:30 2020 +0000
@@ -1,3 +1,4 @@
+
 opt-______-tgt-___-cmd-___
 echo running
 running
@@ -59,11 +60,13 @@
 *** Error code 1 (ignored)
 
 opt-______-tgt-_i_-cmd-___
-echo running
-running
+echo running; false
+running
+*** Error code 1 (ignored)
 
 opt-______-tgt-_i_-cmd-__s
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-_i_-cmd-_i_
 echo running; false
@@ -75,11 +78,13 @@
 *** Error code 1 (ignored)
 
 opt-______-tgt-_i_-cmd-a__
-echo running
-running
+echo running; false
+running
+*** Error code 1 (ignored)
 
 opt-______-tgt-_i_-cmd-a_s
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-_i_-cmd-ai_
 echo running; false
@@ -92,9 +97,11 @@
 
 opt-______-tgt-_is-cmd-___
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-_is-cmd-__s
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-_is-cmd-_i_
 running
@@ -106,9 +113,11 @@
 
 opt-______-tgt-_is-cmd-a__
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-_is-cmd-a_s
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-_is-cmd-ai_
 running
@@ -179,11 +188,13 @@
 *** Error code 1 (ignored)
 
 opt-______-tgt-ai_-cmd-___
-echo running
-running
+echo running; false
+running
+*** Error code 1 (ignored)
 
 opt-______-tgt-ai_-cmd-__s
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-ai_-cmd-_i_
 echo running; false
@@ -195,11 +206,13 @@
 *** Error code 1 (ignored)
 
 opt-______-tgt-ai_-cmd-a__
-echo running
-running
+echo running; false
+running
+*** Error code 1 (ignored)
 
 opt-______-tgt-ai_-cmd-a_s
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-ai_-cmd-ai_
 echo running; false
@@ -212,9 +225,11 @@
 
 opt-______-tgt-ais-cmd-___
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-ais-cmd-__s
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-ais-cmd-_i_
 running
@@ -226,9 +241,11 @@
 
 opt-______-tgt-ais-cmd-a__
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-ais-cmd-a_s
 running
+*** Error code 1 (ignored)
 
 opt-______-tgt-ais-cmd-ai_
 running
@@ -296,9 +313,11 @@
 
 opt-____s_-tgt-_i_-cmd-___
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-_i_-cmd-__s
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-_i_-cmd-_i_
 running
@@ -310,9 +329,11 @@
 
 opt-____s_-tgt-_i_-cmd-a__
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-_i_-cmd-a_s
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-_i_-cmd-ai_
 running
@@ -324,9 +345,11 @@
 
 opt-____s_-tgt-_is-cmd-___
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-_is-cmd-__s
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-_is-cmd-_i_
 running
@@ -338,9 +361,11 @@
 
 opt-____s_-tgt-_is-cmd-a__
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-_is-cmd-a_s
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-_is-cmd-ai_
 running
@@ -408,9 +433,11 @@
 
 opt-____s_-tgt-ai_-cmd-___
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-ai_-cmd-__s
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-ai_-cmd-_i_
 running
@@ -422,9 +449,11 @@
 
 opt-____s_-tgt-ai_-cmd-a__
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-ai_-cmd-a_s
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-ai_-cmd-ai_
 running
@@ -436,9 +465,11 @@
 
 opt-____s_-tgt-ais-cmd-___
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-ais-cmd-__s
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-ais-cmd-_i_
 running
@@ -450,9 +481,11 @@
 
 opt-____s_-tgt-ais-cmd-a__
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-ais-cmd-a_s
 running
+*** Error code 1 (ignored)
 
 opt-____s_-tgt-ais-cmd-ai_
 running
@@ -523,10 +556,10 @@
 *** Error code 1 (ignored)
 
 opt-___n__-tgt-_i_-cmd-___
-echo running
+echo running; false
 
 opt-___n__-tgt-_i_-cmd-__s
-echo running
+echo running; false
 
 opt-___n__-tgt-_i_-cmd-_i_
 echo running; false
@@ -535,12 +568,14 @@
 echo running; false
 
 opt-___n__-tgt-_i_-cmd-a__
-echo running
-running
+echo running; false
+running
+*** Error code 1 (ignored)
 
 opt-___n__-tgt-_i_-cmd-a_s
-echo running
-running
+echo running; false
+running
+*** Error code 1 (ignored)
 
 opt-___n__-tgt-_i_-cmd-ai_
 echo running; false
@@ -553,10 +588,10 @@
 *** Error code 1 (ignored)
 
 opt-___n__-tgt-_is-cmd-___
-echo running
+echo running; false
 
 opt-___n__-tgt-_is-cmd-__s
-echo running
+echo running; false
 
 opt-___n__-tgt-_is-cmd-_i_
 echo running; false
@@ -565,12 +600,14 @@
 echo running; false
 
 opt-___n__-tgt-_is-cmd-a__
-echo running
-running
+echo running; false
+running
+*** Error code 1 (ignored)
 
 opt-___n__-tgt-_is-cmd-a_s
-echo running
-running
+echo running; false
+running
+*** Error code 1 (ignored)
 
 opt-___n__-tgt-_is-cmd-ai_
 echo running; false
@@ -643,11 +680,13 @@
 *** Error code 1 (ignored)
 
 opt-___n__-tgt-ai_-cmd-___
-echo running
-running
+echo running; false
+running
+*** Error code 1 (ignored)
 
 opt-___n__-tgt-ai_-cmd-__s
 running
+*** Error code 1 (ignored)
 
 opt-___n__-tgt-ai_-cmd-_i_
 echo running; false
@@ -659,11 +698,13 @@
 *** Error code 1 (ignored)
 
 opt-___n__-tgt-ai_-cmd-a__



Home | Main Index | Thread Index | Old Index