On Sat, Jan 03, 2026 at 08:20:50AM +0100, Sebastien Marie wrote:
> Hi,
> 
> The default do-test target for lang/go modules is defined as:
> 
>     MODGO_TEST_TARGET ?=    cd ${WRKSRC} && ${MODGO_CMD} ${ALL_TARGET}
> 
> but it also exists MODGO_TEST_CMD which takes care of ${MODGO_FLAGS} and
> ${MODGO_TEST_FLAGS}.
> 
> The main difference is ${MODGO_FLAGS} and ${MODGO_TEST_FLAGS} usage with
> MODGO_TEST_CMD (and nothing else).
> 
> I tested several ports (but not all), and it seems fine.
> 
> The usage of ALL_TARGET as (not overridable) default target for testing
> is also questionnable, but I would like to address it in separated
> discussion (lot of go modules are overriding do-test for defining custom
> target).
> 
> Comments or OK ?

Totally makes sense and I can't see a downside quite the opposite.

ok tb

> -- 
> Sebastien Marie
> 
> 
> diff --git a/lang/go/go.port.mk b/lang/go/go.port.mk
> index 8b58b6b048..48427c2576 100644
> --- a/lang/go/go.port.mk
> +++ b/lang/go/go.port.mk
> @@ -110,7 +110,7 @@
>  .  endif
>  .endif
>  
> -MODGO_TEST_TARGET ?= cd ${WRKSRC} && ${MODGO_CMD} test ${ALL_TARGET}
> +MODGO_TEST_TARGET ?= cd ${WRKSRC} && ${MODGO_TEST_CMD} ${ALL_TARGET}
>  
>  SEPARATE_BUILD ?=    Yes
>  
> 

Reply via email to