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): force all tests to be run w...



details:   https://anonhg.NetBSD.org/src/rev/64e28c7cf3c6
branches:  trunk
changeset: 937365:64e28c7cf3c6
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Aug 16 18:17:17 2020 +0000

description:
make(1): force all tests to be run with the -r flag

Without that flag, <sys.mk> is loaded before the tests.  The tests are
not intended to either use or even test these rules and definitions,
therefore it is safe to omit this command line option.

If there should ever be tests for POSIX-conformance that need the
builtin rules and definitions, these tests can still ".include <sys.mk>"
at the beginning and be done with it, since the -m command line option
is not touched.  The system-default rules and definitions are still
available, they are just not active by default.

Suggested by sjg.

diffstat:

 usr.bin/make/unit-tests/Makefile |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r af5aa7285ce1 -r 64e28c7cf3c6 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Sun Aug 16 18:05:52 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Sun Aug 16 18:17:17 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.96 2020/08/16 18:04:33 rillig Exp $
+# $NetBSD: Makefile,v 1.97 2020/08/16 18:17:17 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -310,13 +310,13 @@
 ENV.varmisc+=          FROM_ENV_AFTER=env
 
 # Override make flags for some of the tests; default is -k.
-FLAGS.counter=         -r -dv
+FLAGS.counter=         -dv
 FLAGS.doterror=                # none
 FLAGS.envfirst=                -e
-FLAGS.export=          -r
+FLAGS.export=          # none
 FLAGS.lint=            -dL -k
 FLAGS.order=           -j1
-FLAGS.recursive=       -dL -r
+FLAGS.recursive=       -dL
 FLAGS.vardebug=                -k -dv FROM_CMDLINE=
 
 # Some tests need extra post-processing.
@@ -369,7 +369,7 @@
        @set -eu; \
        cd ${.OBJDIR}; \
        env ${ENV.${.TARGET:R}} ${TEST_MAKE} -C ${.CURDIR} \
-         ${FLAGS.${.TARGET:R}:U-k} -f ${.IMPSRC} \
+         -r ${FLAGS.${.TARGET:R}:U-k} -f ${.IMPSRC} \
          > ${.TARGET}.tmp 2>&1 \
        && status=$$? || status=$$?; \
        echo $$status > ${.TARGET:R}.status



Home | Main Index | Thread Index | Old Index