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): fix archive test



details:   https://anonhg.NetBSD.org/src/rev/26bc98ce0fc2
branches:  trunk
changeset: 974910:26bc98ce0fc2
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Aug 16 14:39:50 2020 +0000

description:
make(1): fix archive test

At the beginning of that test, the library archive obviously does not
exist yet.

This test failure is a bit hard to detect since the test is disabled in
usr.bin/make, but not in tests/usr.bin/make.  This is because the latter
just runs all .mk files as tests, no matter whether they are commented
out or not.

diffstat:

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

diffs (30 lines):

diff -r 86ea74c91b7a -r 26bc98ce0fc2 usr.bin/make/unit-tests/archive.exp
--- a/usr.bin/make/unit-tests/archive.exp       Sun Aug 16 14:25:16 2020 +0000
+++ b/usr.bin/make/unit-tests/archive.exp       Sun Aug 16 14:39:50 2020 +0000
@@ -1,3 +1,4 @@
+rm -f libprog.a
 ar cru libprog.a archive.mk modmisc.mk varmisc.mk
 ranlib libprog.a
 ar t libprog.a
@@ -6,5 +7,5 @@
 varmisc.mk
 depend-on-existing-member
 `depend-on-nonexistent-member' is up to date.
-rm libprog.a
+rm -f libprog.a
 exit status 0
diff -r 86ea74c91b7a -r 26bc98ce0fc2 usr.bin/make/unit-tests/archive.mk
--- a/usr.bin/make/unit-tests/archive.mk        Sun Aug 16 14:25:16 2020 +0000
+++ b/usr.bin/make/unit-tests/archive.mk        Sun Aug 16 14:39:50 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: archive.mk,v 1.2 2020/08/15 01:49:07 rillig Exp $
+# $NetBSD: archive.mk,v 1.3 2020/08/16 14:39:50 rillig Exp $
 #
 # Very basic demonstration of handling archives, based on the description
 # in PSD.doc/tutorial.ms.
@@ -35,4 +35,4 @@
        ${RUN} echo $@
 
 remove-archive:
-       rm ${ARCHIVE}
+       rm -f ${ARCHIVE}



Home | Main Index | Thread Index | Old Index