Hi, According to bsd.port.mk TEST_ENV is passed as environment to the default make test target. I tried that in my databases/mongodb-tools port and it didn't work. Found that Mk/Uses/go.mk does not pass TEST_ENV to the test target. I mailed about it but got no reaction. https://lists.freebsd.org/archives/freebsd-go/2025-January/000642.html
Created attachment 257028 [details] git diff of Mk/Uses/go.mk A patch fixing the issue for my port. I propose to also add a comment to /usr/ports/CHANGES as this can impact existing ports.
(In reply to Ronald Klop from comment #1) NB: grep TEST_ENV Mk/Uses/* show that other languages like cmake.mk, python.mk and perl5.mk also pass TEST_ENV and don't pass MAKE_ENV. I think it is a good idea to be consistent. BTW: java.mk also passes MAKE_ENV instead of TEST_ENV.
Created attachment 257050 [details] git diff of Mk/Uses/go.mk Add a text for /usr/ports/CHANGES.