Module Name:    src
Committed By:   rillig
Date:           Tue Apr  2 15:05:15 UTC 2024

Modified Files:
        src/usr.bin/make/unit-tests: opt-keep-going-indirect.mk

Log Message:
tests/make: pass PATH onto child processes

This fixes the tests on some Cygwin variant where the shell does not
initialize the PATH environment variable when it's missing.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
    src/usr.bin/make/unit-tests/opt-keep-going-indirect.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/opt-keep-going-indirect.mk
diff -u src/usr.bin/make/unit-tests/opt-keep-going-indirect.mk:1.2 src/usr.bin/make/unit-tests/opt-keep-going-indirect.mk:1.3
--- src/usr.bin/make/unit-tests/opt-keep-going-indirect.mk:1.2	Sat Feb 12 20:05:36 2022
+++ src/usr.bin/make/unit-tests/opt-keep-going-indirect.mk	Tue Apr  2 15:05:15 2024
@@ -1,4 +1,4 @@
-# $NetBSD: opt-keep-going-indirect.mk,v 1.2 2022/02/12 20:05:36 rillig Exp $
+# $NetBSD: opt-keep-going-indirect.mk,v 1.3 2024/04/02 15:05:15 rillig Exp $
 #
 # Tests for the -k command line option, which stops building a target as soon
 # as an error is detected, but continues building the other, independent
@@ -49,19 +49,19 @@
 # to the child processes.
 all:
 	@echo 'direct compat'
-	@set +e; env -i ${MAKE} -r -f ${MAKEFILE} -k direct; echo "exited $$?"
+	@set +e; env -i "PATH=$$PATH" ${MAKE} -r -f ${MAKEFILE} -k direct; echo "exited $$?"
 	@echo
 
 	@echo 'direct jobs'
-	@set +e; env -i ${MAKE} -r -f ${MAKEFILE} -k direct -j1; echo "exited $$?"
+	@set +e; env -i "PATH=$$PATH" ${MAKE} -r -f ${MAKEFILE} -k direct -j1; echo "exited $$?"
 	@echo
 
 	@echo 'indirect compat'
-	@set +e; env -i ${MAKE} -r -f ${MAKEFILE} -k indirect; echo "exited $$?"
+	@set +e; env -i "PATH=$$PATH" ${MAKE} -r -f ${MAKEFILE} -k indirect; echo "exited $$?"
 	@echo
 
 	@echo 'indirect jobs'
-	@set +e; env -i ${MAKE} -r -f ${MAKEFILE} -k indirect -j1; echo "exited $$?"
+	@set +e; env -i "PATH=$$PATH" ${MAKE} -r -f ${MAKEFILE} -k indirect -j1; echo "exited $$?"
 	@echo
 
 indirect: direct

Reply via email to