bug#81498: automake test t/tap-stderr-prefix.tap fails due to a sed command that does not work on macOS (all BSD?)
Karl Berry <[email protected]> Sun, 26 Jul 2026 14:39:42 -0600
| Newsgroups | gmane.comp.sysutils.automake.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi Erik,
The automake test "t/tap-stderr-prefix.tap"
...
macOS (BSD-based) sed (at least as of Tahoe 26.5.2) is stricter and
requires the concluding semicolon after the "p"
sed -n -e '/^\('"$1"'\)$/,${/^\('"$2"'\)$/p;}' all.log
Thanks. I inserted the semicolon.
Also, a note that a bunch of the python-related tests fail with the
default python3 on macOS
Thanks for that report too.
(because it puts compiled bytecode .pyc
files in ~/Library/Caches/com.apple.python
I surmise that directory might be a moving target. Systems love to
change cache locations.
instead of in ./__pycache__ like the standard python3).
I admit I have no good ideas for dealing with this. If you or anyone
can propose a patch, let's consider. --thanks, karl.
-----------------------------------------------------------------------------
test: add ; for sed portability
From https://bugs.gnu.org/81498 (Erik A Johnson).
* t/tap-stderr-prefix.tap (check_log_line_order): add ; to sed
command for portability to macOS (BSD-based) sed (at least as of
Tahoe 26.5.2).
diff --git a/t/tap-stderr-prefix.tap b/t/tap-stderr-prefix.tap
index ac2924e95..fb85d2a66 100644
--- a/t/tap-stderr-prefix.tap
+++ b/t/tap-stderr-prefix.tap
@@ -149,7 +149,7 @@ check_log_line_order() {
{
grep -xe "$1" all.log
grep -xe "$2" all.log
- sed -n -e '/^\('"$1"'\)$/,${/^\('"$2"'\)$/p}' all.log | grep -xe "$2"
+ sed -n -e '/^\('"$1"'\)$/,${/^\('"$2"'\)$/p;}' all.log | grep -xe "$2"
} >&2 # Write to stderr in case $1 or $2 looks like a TAP directive.
}
compile finished at Sun Jul 26 13:38:40 2026