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): switch some tests to line-b...
details: https://anonhg.NetBSD.org/src/rev/7f13c637a6a9
branches: trunk
changeset: 977228:7f13c637a6a9
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Oct 18 18:12:42 2020 +0000
description:
make(1): switch some tests to line-buffered stdout
On Alpine Linux, the output was not in the same order as on NetBSD,
at least since bmake-20200902.
The mixture of block-buffered output from child processes and make
itself was hard to predict anyway. Switching to line-buffered stdout
improves the stability of the tests.
diffstat:
usr.bin/make/unit-tests/opt-ignore.exp | 8 ++++----
usr.bin/make/unit-tests/opt-ignore.mk | 4 +++-
usr.bin/make/unit-tests/opt-keep-going.exp | 2 +-
usr.bin/make/unit-tests/opt-keep-going.mk | 4 +++-
usr.bin/make/unit-tests/sh-dots.exp | 4 ++--
usr.bin/make/unit-tests/sh-dots.mk | 4 +++-
6 files changed, 16 insertions(+), 10 deletions(-)
diffs (102 lines):
diff -r 6d0f2b162b05 -r 7f13c637a6a9 usr.bin/make/unit-tests/opt-ignore.exp
--- a/usr.bin/make/unit-tests/opt-ignore.exp Sun Oct 18 18:09:32 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-ignore.exp Sun Oct 18 18:12:42 2020 +0000
@@ -1,12 +1,12 @@
dependency 1
+*** Error code 1 (ignored)
dependency 2
+*** Error code 7 (ignored)
dependency 3
other 1
+*** Error code 1 (ignored)
other 2
main 1
+*** Error code 1 (ignored)
main 2
-*** Error code 1 (ignored)
-*** Error code 7 (ignored)
-*** Error code 1 (ignored)
-*** Error code 1 (ignored)
exit status 0
diff -r 6d0f2b162b05 -r 7f13c637a6a9 usr.bin/make/unit-tests/opt-ignore.mk
--- a/usr.bin/make/unit-tests/opt-ignore.mk Sun Oct 18 18:09:32 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-ignore.mk Sun Oct 18 18:12:42 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: opt-ignore.mk,v 1.3 2020/08/23 14:28:04 rillig Exp $
+# $NetBSD: opt-ignore.mk,v 1.4 2020/10/18 18:12:42 rillig Exp $
#
# Tests for the -i command line option, which ignores the exit status of the
# shell commands, and just continues with the next command, even from the same
@@ -10,6 +10,8 @@
# file, where they cannot be related to the individual shell commands that
# failed?
+.MAKEFLAGS: -d0 # switch stdout to being line-buffered
+
all: dependency other
dependency:
diff -r 6d0f2b162b05 -r 7f13c637a6a9 usr.bin/make/unit-tests/opt-keep-going.exp
--- a/usr.bin/make/unit-tests/opt-keep-going.exp Sun Oct 18 18:09:32 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-keep-going.exp Sun Oct 18 18:12:42 2020 +0000
@@ -1,6 +1,6 @@
dependency 1
+*** Error code 1 (continuing)
other 1
*** Error code 1 (continuing)
-*** Error code 1 (continuing)
`all' not remade because of errors.
exit status 0
diff -r 6d0f2b162b05 -r 7f13c637a6a9 usr.bin/make/unit-tests/opt-keep-going.mk
--- a/usr.bin/make/unit-tests/opt-keep-going.mk Sun Oct 18 18:09:32 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-keep-going.mk Sun Oct 18 18:12:42 2020 +0000
@@ -1,9 +1,11 @@
-# $NetBSD: opt-keep-going.mk,v 1.3 2020/08/23 14:28:04 rillig Exp $
+# $NetBSD: opt-keep-going.mk,v 1.4 2020/10/18 18:12:42 rillig Exp $
#
# Tests for the -k command line option, which stops building a target as soon
# as an error is detected, but continues building the other, independent
# targets, as far as possible.
+.MAKEFLAGS: -d0 # switch stdout to being line-buffered
+
all: dependency other
dependency:
diff -r 6d0f2b162b05 -r 7f13c637a6a9 usr.bin/make/unit-tests/sh-dots.exp
--- a/usr.bin/make/unit-tests/sh-dots.exp Sun Oct 18 18:09:32 2020 +0000
+++ b/usr.bin/make/unit-tests/sh-dots.exp Sun Oct 18 18:12:42 2020 +0000
@@ -1,15 +1,15 @@
first first
hidden hidden
make: exec(...) failed (No such file or directory)
+*** Error code 1 (ignored)
hidden delayed hidden
repeated repeated
commented commented
-*** Error code 1 (ignored)
... # Run the below commands later
<normalized: ...: not found>
+*** Error code 127 (ignored)
commented delayed commented
first delayed first
repeated delayed repeated
repeated delayed twice repeated
-*** Error code 127 (ignored)
exit status 0
diff -r 6d0f2b162b05 -r 7f13c637a6a9 usr.bin/make/unit-tests/sh-dots.mk
--- a/usr.bin/make/unit-tests/sh-dots.mk Sun Oct 18 18:09:32 2020 +0000
+++ b/usr.bin/make/unit-tests/sh-dots.mk Sun Oct 18 18:12:42 2020 +0000
@@ -1,9 +1,11 @@
-# $NetBSD: sh-dots.mk,v 1.1 2020/08/22 11:27:02 rillig Exp $
+# $NetBSD: sh-dots.mk,v 1.2 2020/10/18 18:12:42 rillig Exp $
#
# Tests for the special shell command line "...", which does not run the
# commands below it but appends them to the list of commands that are run
# at the end.
+.MAKEFLAGS: -d0 # switch stdout to being line-buffered
+
all: first hidden repeated commented
# The ${.TARGET} correctly expands to the target name, even though the
Home |
Main Index |
Thread Index |
Old Index