Skip to content

Commit

Permalink
Accept goos and goarch in go_test rules, pass to binary rule (bazel-c…
Browse files Browse the repository at this point in the history
  • Loading branch information
kerinin authored and jayconrod committed Jun 29, 2018
1 parent 257d889 commit 89e85eb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions go/private/rules/test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ load(
"@io_bazel_rules_go//go/private:rules/rule.bzl",
"go_rule",
)
load(
"@io_bazel_rules_go//go/platform:list.bzl",
"GOARCH",
"GOOS",
)
load(
"@io_bazel_rules_go//go/private:mode.bzl",
"LINKMODE_NORMAL",
Expand Down Expand Up @@ -211,6 +216,14 @@ go_test = go_rule(
],
default = "auto",
),
"goos": attr.string(
values = GOOS.keys() + ["auto"],
default = "auto",
),
"goarch": attr.string(
values = GOARCH.keys() + ["auto"],
default = "auto",
),
"gc_goopts": attr.string_list(),
"gc_linkopts": attr.string_list(),
"rundir": attr.string(),
Expand Down

0 comments on commit 89e85eb

Please sign in to comment.