diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2015-12-22 12:59:41 +0000 |
---|---|---|
committer | Dmitry Lomov <dslomov@google.com> | 2015-12-22 13:07:52 +0000 |
commit | 72ae5e37ab6b1651bb55bb6508b4e4a2e4176494 (patch) | |
tree | 5d9e6dc81981ae40a69745d06298b9b831d20f67 /tools | |
parent | c934fad54ceb949084ab1c59254d1129febd89af (diff) |
Fix bazel_go_example_test. Changes:
* The go_prefix should be declared in the toplevel BUILD file as
//:go_prefix, rather than //external:go_prefix.
* Run set_up from the test methods.
* Update references to Darwin.
Tested:
bazel test src/test/shell/bazel/bazel_go_example_test
--
Change-Id: I89b2f5920100d27abdbc093437c7c051a24fad1e
Reviewed-on: https://bazel-review.googlesource.com/#/c/2561
MOS_MIGRATED_REVID=110762730
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build_rules/go/README.md | 3 | ||||
-rw-r--r-- | tools/build_rules/go/def.bzl | 7 |
2 files changed, 2 insertions, 8 deletions
diff --git a/tools/build_rules/go/README.md b/tools/build_rules/go/README.md index a7a7b8a83d..347aee621a 100644 --- a/tools/build_rules/go/README.md +++ b/tools/build_rules/go/README.md @@ -21,7 +21,6 @@ The rules should be considered experimental. They support: They currently do not support (in order of importance): -* Darwin * `//+build` tags * auto generated BUILD files. * C/C++ interoperation (cgo, swig etc.) @@ -70,7 +69,7 @@ They currently do not support (in order of importance): * In this case, import the library as `github.com/joe/project/lib`. * For vendored libraries, you may depend on - `//lib/vendor/github_com/user/project:go_default_library`. Vendored + `//lib/vendor/github.com/user/project:go_default_library`. Vendored libraries should have BUILD files like normal libraries. * To declare a test, diff --git a/tools/build_rules/go/def.bzl b/tools/build_rules/go/def.bzl index 4f4bfc98d9..2563e9ebd8 100644 --- a/tools/build_rules/go/def.bzl +++ b/tools/build_rules/go/def.bzl @@ -334,7 +334,7 @@ go_library_attrs = { ), "go_prefix": attr.label( providers = ["go_prefix"], - default = Label("//external:go_prefix"), + default = Label("//:go_prefix"), allow_files = False, cfg = HOST_CFG, ), @@ -380,12 +380,7 @@ go_test = rule( test = True, ) -# TODO(bazel-team): support darwin def go_repositories(): - native.bind(name = "go_prefix", - actual = "//:go_prefix", - ) - native.new_http_archive( name= "golang-linux-amd64", url = "https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz", |