Bug 284387 - Mk/Uses/go.mk: TEST_ENV is not passed to test build
Summary: Mk/Uses/go.mk: TEST_ENV is not passed to test build
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-27 12:54 UTC by Ronald Klop
Modified: 2025-02-04 10:18 UTC (History)
2 users (show)

See Also:
ronald: maintainer-feedback? (portmgr)


Attachments
git diff of Mk/Uses/go.mk (466 bytes, patch)
2025-01-27 12:57 UTC, Ronald Klop
no flags Details | Diff
git diff of Mk/Uses/go.mk (975 bytes, patch)
2025-01-27 20:10 UTC, Ronald Klop
ronald: maintainer-approval? (portmgr)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald Klop freebsd_committer freebsd_triage 2025-01-27 12:54:28 UTC
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
Comment 1 Ronald Klop freebsd_committer freebsd_triage 2025-01-27 12:57:13 UTC
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.
Comment 2 Ronald Klop freebsd_committer freebsd_triage 2025-01-27 13:02:40 UTC
(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.
Comment 3 Ronald Klop freebsd_committer freebsd_triage 2025-01-27 20:10:31 UTC
Created attachment 257050 [details]
git diff of Mk/Uses/go.mk

Add a text for /usr/ports/CHANGES.