Skip to content

Commit

Permalink
maybe this is it
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgmiller committed Sep 10, 2024
1 parent 0571e73 commit 907dc64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/private/rules/test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ def _go_test_impl(ctx):
# before user code. See comment above the init function
# in bzltestutil/init.go.
test_gc_linkopts.extend(["-X", "+initfirst/github.com/bazelbuild/rules_go/go/tools/bzltestutil/chdir.RunDir=" + run_dir])

#post golang 1.23 testing.Testing is expected to be set for go tests
test_gc_linkopts.extend(["-X", "testing.Testing=1"])
# Now compile the test binary itself
test_library = GoLibrary(
name = go.label.name + "~testmain",
Expand Down Expand Up @@ -311,7 +312,6 @@ _go_test_kwargs = {
doc = """Map of defines to add to the go link command.
See [Defines and stamping] for examples of how to use these.
""",
"testing.testBinary" = "1",
),
"linkmode": attr.string(
default = "auto",
Expand Down

0 comments on commit 907dc64

Please sign in to comment.