Module Name: src
Committed By: rillig
Date: Fri Sep 4 19:03:38 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: Makefile archive.mk
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/archive.mk
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.132 src/usr.bin/make/unit-tests/Makefile:1.133
--- src/usr.bin/make/unit-tests/Makefile:1.132 Fri Sep 4 17:05:39 2020
+++ src/usr.bin/make/unit-tests/Makefile Fri Sep 4 19:03:38 2020
@@ -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 @@ ENV.varmisc+= FROM_ENV_AFTER=env
# 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
Index: src/usr.bin/make/unit-tests/archive.mk
diff -u src/usr.bin/make/unit-tests/archive.mk:1.5 src/usr.bin/make/unit-tests/archive.mk:1.6
--- src/usr.bin/make/unit-tests/archive.mk:1.5 Sun Aug 23 17:51:24 2020
+++ src/usr.bin/make/unit-tests/archive.mk Fri Sep 4 19:03:38 2020
@@ -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 @@ MAKE_CMD= ${.MAKE} -f ${MAKEFILE}
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