diff --git a/.plzconfig b/.plzconfig index 80d8842..19800fb 100644 --- a/.plzconfig +++ b/.plzconfig @@ -1,5 +1,5 @@ [Please] -Version = >=17.21.0 +Version = >=17.31.0 [build] hashcheckers = sha256 @@ -20,7 +20,7 @@ Target = //plugins:cc [Plugin "e2e"] Target = //plugins:e2e -PleaseVersion = 17.21.0 +PleaseVersion = 17.31.0 [PluginDefinition] Name = go diff --git a/ChangeLog b/ChangeLog index b1b0625..b1c71eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Version 1.32.0 +-------------- + * Allow passing command-line arguments to go_test targets (#368) + Version 1.31.1 -------------- * Fix bug in 1.31.0 where the plugin was still referencing the last version of `please_go` diff --git a/VERSION b/VERSION index 6bae540..359c410 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.31.1 +1.32.0 diff --git a/build_defs/go.build_defs b/build_defs/go.build_defs index 59706f2..d565ac7 100644 --- a/build_defs/go.build_defs +++ b/build_defs/go.build_defs @@ -879,7 +879,7 @@ def go_test(name:str, srcs:list, resources:list=None, data:list|dict=None, deps: cmds, tools = _go_binary_cmds(name, static=static, definitions=definitions, gcov=cgo, test=True) - test_cmd = f'$TEST {flags} 2>&1 | tee $TMP_DIR/test.results' + test_cmd = f'$TEST {flags} __TEST_ARGS__ 2>&1 | tee $TMP_DIR/test.results' worker_cmd = f'$(worker {worker})' if worker else "" if worker_cmd: test_cmd = f'{worker_cmd} && {test_cmd} ' @@ -943,6 +943,7 @@ def go_test(name:str, srcs:list, resources:list=None, data:list|dict=None, deps: pre_build = _collect_linker_flags(static, definitions), env = env, provides = provides, + test_cmd_args_placeholder = "__TEST_ARGS__", )