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): re-enable the archive test



details:   https://anonhg.NetBSD.org/src/rev/62373231642f
branches:  trunk
changeset: 938228:62373231642f
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Sep 04 19:03:38 2020 +0000

description:
make(1): re-enable the archive test

The test had failed in the releng build because it assumed it were run
with .CURDIR == .PARSEDIR.  This assumption is true when the tests are
run directly from usr.bin/make, but not when they are run from
tests/usr.bin/make.

diffstat:

 usr.bin/make/unit-tests/Makefile   |  5 ++---
 usr.bin/make/unit-tests/archive.mk |  5 ++++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 49b4a0612791 -r 62373231642f usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Fri Sep 04 17:59:36 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Fri Sep 04 19:03:38 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.132 2020/09/04 17:05:39 rillig Exp $
+# $NetBSD: Makefile,v 1.133 2020/09/04 19:03:38 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -35,7 +35,7 @@
 # Keep the list sorted.
 # Any test that is commented out must be ignored in
 # src/tests/usr.bin/make/t_make.sh as well.
-TESTS+=                # archive       # broken on FreeBSD, enabled in t_make.sh
+TESTS+=                archive
 TESTS+=                archive-suffix
 TESTS+=                cmd-interrupt
 TESTS+=                cmdline
@@ -328,7 +328,6 @@
 # Override make flags for some of the tests; default is -k.
 # If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of
 # settings FLAGS.test=-dv here, since that is closer to the test code.
-FLAGS.archive=         -dA
 FLAGS.counter=         -dv
 FLAGS.directive-ifmake=        first second
 FLAGS.doterror=                # none
diff -r 49b4a0612791 -r 62373231642f usr.bin/make/unit-tests/archive.mk
--- a/usr.bin/make/unit-tests/archive.mk        Fri Sep 04 17:59:36 2020 +0000
+++ b/usr.bin/make/unit-tests/archive.mk        Fri Sep 04 19:03:38 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: archive.mk,v 1.5 2020/08/23 17:51:24 rillig Exp $
+# $NetBSD: archive.mk,v 1.6 2020/09/04 19:03:38 rillig Exp $
 #
 # Very basic demonstration of handling archives, based on the description
 # in PSD.doc/tutorial.ms.
@@ -13,6 +13,9 @@
 RUN?=          @set -eu;
 
 all:
+.if ${.PARSEDIR:tA} != ${.CURDIR:tA}
+       @cd ${MAKEFILE:H} && cp [at]*.mk ${.CURDIR}
+.endif
        ${RUN} ${MAKE_CMD} remove-archive
        ${RUN} ${MAKE_CMD} create-archive
        ${RUN} ${MAKE_CMD} list-archive



Home | Main Index | Thread Index | Old Index