Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test running gazelle rule in another workspace #75

Closed
jayconrod opened this issue Jan 5, 2018 · 2 comments · Fixed by #1183
Closed

Test running gazelle rule in another workspace #75

jayconrod opened this issue Jan 5, 2018 · 2 comments · Fixed by #1183
Labels

Comments

@jayconrod
Copy link
Contributor

Test should:

  • Create a new workspace with a WORKSPACE file, BUILD.bazel file, and some trivial source files, using the recommended boilerplate code.
  • bazel run //:gazelle
  • bazel build a newly generated go_binary rule.

This test should work similarly to rules_go integration tests (see bazel_tests.bzl).

@achew22
Copy link
Member

achew22 commented Jan 5, 2018

I have done something like this in the iBazel project. I opted to just use sh_library in my examples but the same logic applies.

https://github.com/bazelbuild/bazel-watcher/blob/a2ceacd14ddf2cb7e1afe718f181441cc95162b3/e2e/simple/simple_test.go#L19-L31

It also has the added bonus of allowing you to verify against multiple versions of Bazel in unison by passing in a set of versions.

@jayconrod
Copy link
Contributor Author

@achew22 Thanks, that looks promising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants