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): ignore system-specific erro...



details:   https://anonhg.NetBSD.org/src/rev/908b37f4ec49
branches:  trunk
changeset: 935533:908b37f4ec49
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jul 04 22:17:09 2020 +0000

description:
make(1): ignore system-specific error message from regcomp in test

NetBSD 8 has: repetition-operator operand invalid
Ubuntu has: Invalid preceding regular expression

diffstat:

 usr.bin/make/unit-tests/Makefile    |  12 +++++++-----
 usr.bin/make/unit-tests/modmisc.exp |   2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)

diffs (51 lines):

diff -r a4adb07e5643 -r 908b37f4ec49 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Sat Jul 04 22:01:10 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Sat Jul 04 22:17:09 2020 +0000
@@ -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.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 @@
          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}} \
diff -r a4adb07e5643 -r 908b37f4ec49 usr.bin/make/unit-tests/modmisc.exp
--- a/usr.bin/make/unit-tests/modmisc.exp       Sat Jul 04 22:01:10 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.exp       Sat Jul 04 22:17:09 2020 +0000
@@ -25,7 +25,7 @@
 :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:



Home | Main Index | Thread Index | Old Index