Module Name: src Committed By: rillig Date: Thu Aug 18 05:37:05 UTC 2022
Modified Files: src/usr.bin/make/unit-tests: opt-query.mk Log Message: tests/make: fix test for option '-q' in ATF mode When running 'make test' in usr.bin/make, MAKE is set to '$PWD/make', and when that file is used as a dependency, everything works as expected. When running the tests via ATF, MAKE is set to simply 'make', based on argv[0]. Using 'make' as a dependency searches in the current directory but not in /usr/bin, so the file is not found, which makes the "up-to-date" target out of date. Switch the dependeny from ${MAKE} to ${MAKEFILE}, as that file does not involve any $PATH magic and is also guaranteed to be older than the 'up-to-date' file that is created while running the test. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/opt-query.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-query.mk diff -u src/usr.bin/make/unit-tests/opt-query.mk:1.6 src/usr.bin/make/unit-tests/opt-query.mk:1.7 --- src/usr.bin/make/unit-tests/opt-query.mk:1.6 Wed Aug 17 20:10:29 2022 +++ src/usr.bin/make/unit-tests/opt-query.mk Thu Aug 18 05:37:05 2022 @@ -1,4 +1,4 @@ -# $NetBSD: opt-query.mk,v 1.6 2022/08/17 20:10:29 rillig Exp $ +# $NetBSD: opt-query.mk,v 1.7 2022/08/18 05:37:05 rillig Exp $ # # Tests for the -q command line option. # @@ -76,8 +76,8 @@ commands: .elif ${PART} == "variants" -opt-query-file.out-of-date: ${MAKE} -opt-query-file.up-to-date: ${MAKE} +opt-query-file.out-of-date: ${MAKEFILE} +opt-query-file.up-to-date: ${MAKEFILE} phony: .PHONY .else