From nobody Fri Jan 24 13:13:22 2025 X-Original-To: freebsd-go@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YfdY1168Yz5lP6r; Fri, 24 Jan 2025 13:13:25 +0000 (UTC) (envelope-from SRS0=7psq=UQ=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4YfdY02kJSz3K0R; Fri, 24 Jan 2025 13:13:24 +0000 (UTC) (envelope-from SRS0=7psq=UQ=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=rw2 header.b=Y0VqyaBD; spf=pass (mx1.freebsd.org: domain of "SRS0=7psq=UQ=klop.ws=ronald-lists@realworks.nl" designates 194.109.157.24 as permitted sender) smtp.mailfrom="SRS0=7psq=UQ=klop.ws=ronald-lists@realworks.nl"; dmarc=pass (policy=quarantine) header.from=klop.ws Date: Fri, 24 Jan 2025 14:13:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1737724402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=pwqBCLpcpkpGFQnPtoyjbxLCdvfSo0Xg11rNhNtWDso=; b=Y0VqyaBD97tABMCb+wAVxug+IX363kLAjGrj4Gmbzm7Nu+z5tT/JM/p698y9iG/rgaiZuL AibnpdX0XSSRS4HQ1PWtKFva6F21JyOWUzocgdG4LMxBD+cFofI/FWYqPudgyAieDqwagF mIBmovqR9IWeWwhu/fz+2ze6S+U/pR1eGFlAxzH0kaMcYlRggRgJOS/cGOCxm+Ap+zyWh6 IMg8n6oJzB5nWcbCMs9arRYk7D2XIqhIGcr/nwMKExxcN7xjmCT465TDQGeSpuwhPhWDSq 7TdtZPNaHQ101C7UQp331AX5o0n9YkOeWmayjVVWX7NTaM5/yKhabD5b+Ve3Gg== From: Ronald Klop To: freebsd-ports@freebsd.org, freebsd-go@freebsd.org Message-ID: <2089837519.5773.1737724402470@localhost> Subject: Mk/Uses/go.mk: TEST_ENV is not passed to test build List-Id: Go language ports maintenance List-Archive: https://lists.freebsd.org/archives/freebsd-go List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-go@freebsd.org Sender: owner-freebsd-go@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5772_1200877634.1737724402466" X-Mailer: Realworks (735.120) Importance: Normal X-Priority: 3 (Normal) X-Spamd-Result: default: False [-4.08 / 15.00]; RBL_SENDERSCORE_REPUT_9(-1.00)[194.109.157.24:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.985]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,quarantine]; FORGED_SENDER(0.30)[ronald-lists@klop.ws,SRS0=7psq=UQ=klop.ws=ronald-lists@realworks.nl]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; R_DKIM_ALLOW(-0.20)[klop.ws:s=rw2]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ONCE_RECEIVED(0.10)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[194.109.157.24:from]; FROM_NEQ_ENVFROM(0.00)[ronald-lists@klop.ws,SRS0=7psq=UQ=klop.ws=ronald-lists@realworks.nl]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; HAS_X_PRIO_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; MLMMJ_DEST(0.00)[freebsd-go@freebsd.org,freebsd-ports@freebsd.org]; DKIM_TRACE(0.00)[klop.ws:+] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4YfdY02kJSz3K0R ------=_Part_5772_1200877634.1737724402466 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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. A small diff fixes this. diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index d7e932daee73..2a4ff76db199 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -276,7 +276,7 @@ do-test: (cd ${GO_WRKSRC}; \ for t in ${GO_TESTTARGET}; do \ ${ECHO_MSG} "===> Testing $${t}"; \ - ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \ + ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \ done) . endif Just a question. In bsd.port.mk the line TEST_ENV?=${MAKE_ENV} copies MAKE_ENV into TEST_ENV, unless you set TEST_ENV yourself in the ports Makefile. 1. Should I replace MAKE_ENV with TEST_ENV in go.mk (see diff above)? This looks like how cmake.mk, perl5.mk and python.mk pass TEST_ENV. This might break the test target in existing ports which do no add MAKE_ENV to TEST_ENV themselves. 2. Or should I add TEST_ENV to the line above together with MAKE_ENV which might duplicate the env variables because TEST_ENV=MAKE_ENV in bsd.port.mk? I would prefer 1 and document the change in /usr/ports/CHANGES as it is more in line with the other languages. What do you think? Regards, Ronald. ------=_Part_5772_1200877634.1737724402466 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 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.

A small diff fixes this.
diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk
index d7e932daee73..2a4ff76db199 100644
--- a/Mk/Uses/go.mk
+++ b/Mk/Uses/go.mk
@@ -276,7 +276,7 @@ do-test:
        (cd ${GO_WRKSRC}; \
        for t in ${GO_TESTTARGET}; do \
                ${ECHO_MSG} "===>  Testing $${t}"; \
-               ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \
+               ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \
        done)
 .  endif


Just a question.
In bsd.port.mk the line TEST_ENV?=${MAKE_ENV} copies MAKE_ENV into TEST_ENV, unless you set TEST_ENV yourself in the ports Makefile.

1. Should I replace MAKE_ENV with TEST_ENV in go.mk (see diff above)? This looks like how cmake.mk, perl5.mk and python.mk pass TEST_ENV. This might break the test target in existing ports which do no add MAKE_ENV to TEST_ENV themselves.
2. Or should I add TEST_ENV to the line above together with MAKE_ENV which might duplicate the env variables because TEST_ENV=MAKE_ENV in bsd.port.mk?

I would prefer 1 and document the change in /usr/ports/CHANGES as it is more in line with the other languages.

What do you think?

Regards,
Ronald.
  ------=_Part_5772_1200877634.1737724402466--