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 Do not trust that /nonexistent does ...
details: https://anonhg.NetBSD.org/src/rev/6ba75c78cac5
branches: trunk
changeset: 983363:6ba75c78cac5
user: sjg <sjg%NetBSD.org@localhost>
date: Tue May 18 17:05:45 2021 +0000
description:
Do not trust that /nonexistent does not exist
Use /nonexistent.${.MAKE.PID} to avoid failure when
/nonexistent actually exists.
diffstat:
usr.bin/make/unit-tests/Makefile | 3 ++-
usr.bin/make/unit-tests/opt-chdir.mk | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r dc149bfe6a9e -r 6ba75c78cac5 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile Tue May 18 15:21:41 2021 +0000
+++ b/usr.bin/make/unit-tests/Makefile Tue May 18 17:05:45 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.277 2021/04/27 16:20:06 rillig Exp $
+# $NetBSD: Makefile,v 1.278 2021/05/18 17:05:45 sjg Exp $
#
# Unit tests for make(1)
#
@@ -487,6 +487,7 @@
${:D marker should always be at the beginning of the line. } \
-e '/^aa*--- job-b ---$$/d' \
-e '/^bb*--- job-a ---$$/d'
+SED_CMDS.opt-chdir= -e 's,\(nonexistent\).[1-9][0-9]*,\1,'
SED_CMDS.opt-debug-graph1= ${STD_SED_CMDS.dg1}
SED_CMDS.opt-debug-graph2= ${STD_SED_CMDS.dg2}
SED_CMDS.opt-debug-graph3= ${STD_SED_CMDS.dg3}
diff -r dc149bfe6a9e -r 6ba75c78cac5 usr.bin/make/unit-tests/opt-chdir.mk
--- a/usr.bin/make/unit-tests/opt-chdir.mk Tue May 18 15:21:41 2021 +0000
+++ b/usr.bin/make/unit-tests/opt-chdir.mk Tue May 18 17:05:45 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: opt-chdir.mk,v 1.5 2020/11/15 05:43:56 sjg Exp $
+# $NetBSD: opt-chdir.mk,v 1.6 2021/05/18 17:05:45 sjg Exp $
#
# Tests for the -C command line option, which changes the directory at the
# beginning.
@@ -23,5 +23,7 @@
@MAKE_OBJDIR_CHECK_WRITABLE=no ${MAKE} -C / -V 'cwd: $${.CURDIR}'
# Trying to change to a nonexistent directory exits immediately.
+# Note: just because the whole point of /nonexistent is that it should
+# not exist - doesn't mean it doesn't.
chdir-nonexistent: .PHONY .IGNORE
- @${MAKE} -C /nonexistent
+ @${MAKE} -C /nonexistent.${.MAKE.PID}
Home |
Main Index |
Thread Index |
Old Index