Module Name: src
Committed By: rillig
Date: Sat Jul 4 22:17:09 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: Makefile modmisc.exp
Log Message:
make(1): ignore system-specific error message from regcomp in test
NetBSD 8 has: repetition-operator operand invalid
Ubuntu has: Invalid preceding regular expression
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/modmisc.exp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.61 src/usr.bin/make/unit-tests/Makefile:1.62
--- src/usr.bin/make/unit-tests/Makefile:1.61 Sat Jul 4 22:01:10 2020
+++ src/usr.bin/make/unit-tests/Makefile Sat Jul 4 22:17:09 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.61 2020/07/04 22:01:10 rillig Exp $
+# $NetBSD: Makefile,v 1.62 2020/07/04 22:17:09 rillig Exp $
#
# Unit tests for make(1)
#
@@ -77,6 +77,7 @@ FLAGS.doterror= # none
FLAGS.order= -j1
# Some tests need extra post-processing.
+SED_CMDS.modmisc+= -e 's,\(substitution error:\).*,\1 (details omitted),'
SED_CMDS.varshell+= -e 's,^[a-z]*sh: ,,'
SED_CMDS.varshell+= -e '/command/s,No such.*,not found,'
@@ -119,16 +120,17 @@ LANG= C
2>&1 ; echo $$? >${.TARGET:R}.status ; } > ${.TARGET}.tmp
@mv ${.TARGET}.tmp ${.TARGET}
+# Post-process the test output so that the results can be compared.
+#
+# always pretend .MAKE was called 'make'
_SED_CMDS+= -e 's,^${TEST_MAKE:T:S,.,\\.,g}[][0-9]*:,make:,'
_SED_CMDS+= -e 's,${TEST_MAKE:S,.,\\.,g},make,'
+# replace anything after 'stopped in' with unit-tests
_SED_CMDS+= -e '/stopped/s, /.*, unit-tests,'
+# strip ${.CURDIR}/ from the output
_SED_CMDS+= -e 's,${.CURDIR:S,.,\\.,g}/,,g'
_SED_CMDS+= -e 's,${UNIT_TESTS:S,.,\\.,g}/,,g'
-# We always pretend .MAKE was called 'make'
-# and strip ${.CURDIR}/ from the output
-# and replace anything after 'stopped in' with unit-tests
-# so the results can be compared.
.rawout.out:
@echo postprocess ${.TARGET}
@${TOOL_SED} ${_SED_CMDS} ${SED_CMDS.${.TARGET:R}} \
Index: src/usr.bin/make/unit-tests/modmisc.exp
diff -u src/usr.bin/make/unit-tests/modmisc.exp:1.13 src/usr.bin/make/unit-tests/modmisc.exp:1.14
--- src/usr.bin/make/unit-tests/modmisc.exp:1.13 Sat Jul 4 18:54:18 2020
+++ src/usr.bin/make/unit-tests/modmisc.exp Sat Jul 4 22:17:09 2020
@@ -25,7 +25,7 @@ C:empty
:a b b c:
:a b b c:
: b c:
-make: RE substitution error: repetition-operator operand invalid
+make: RE substitution error: (details omitted)
make: Unclosed substitution for (, missing)
:C,word,____,:Q}:
:a c: