Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Use TEST_MAKE to run unit-tests
details: https://anonhg.NetBSD.org/src/rev/94d7a7068062
branches: trunk
changeset: 975171:94d7a7068062
user: sjg <sjg%NetBSD.org@localhost>
date: Sat Aug 22 20:50:43 2020 +0000
description:
Use TEST_MAKE to run unit-tests
This lets us take advantage of new features like ${.SHELL}
diffstat:
usr.bin/make/Makefile | 5 +++--
usr.bin/make/unit-tests/Makefile | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (44 lines):
diff -r bc415d0e2735 -r 94d7a7068062 usr.bin/make/Makefile
--- a/usr.bin/make/Makefile Sat Aug 22 20:31:50 2020 +0000
+++ b/usr.bin/make/Makefile Sat Aug 22 20:50:43 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.90 2020/08/19 06:30:37 rillig Exp $
+# $NetBSD: Makefile,v 1.91 2020/08/22 20:50:43 sjg Exp $
# @(#)Makefile 5.2 (Berkeley) 12/28/90
PROG= make
@@ -165,9 +165,10 @@
COPTS+= -Wdeclaration-after-statement
# A simple unit-test driver to help catch regressions
+TEST_MAKE ?= ${.OBJDIR}/${PROG:T}
test: .MAKE
cd ${.CURDIR}/unit-tests \
- && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
+ && MAKEFLAGS= ${TEST_MAKE} -r -m / TEST_MAKE=${TEST_MAKE} ${.TARGET}
.if ${USE_COVERAGE} == yes
${GCOV} ${GCOV_OPTS} ${SRCS}
sed -i 's,^\([^:]*\): *[0-9]*:,\1: ,' *.gcov
diff -r bc415d0e2735 -r 94d7a7068062 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile Sat Aug 22 20:31:50 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile Sat Aug 22 20:50:43 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.110 2020/08/22 20:23:14 rillig Exp $
+# $NetBSD: Makefile,v 1.111 2020/08/22 20:50:43 sjg Exp $
#
# Unit tests for make(1)
#
@@ -325,11 +325,11 @@
FLAGS.varmod-match-escape= -dv
# Some tests need extra post-processing.
-SED_CMDS.sh-dots+= -e '/not found/s,^.*sh: ,,'
+SED_CMDS.sh-dots+= -e 's,^${.SHELL}: ,,'
SED_CMDS.varmod-subst-regex+= \
-e 's,\(Regex compilation error:\).*,\1 (details omitted),'
SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,'
-SED_CMDS.varshell+= -e 's,^[a-z]*sh: ,,'
+SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,'
SED_CMDS.varshell+= -e '/command/s,No such.*,not found,'
# Some tests need an additional round of postprocessing.
Home |
Main Index |
Thread Index |
Old Index