{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/buck/issues/449","labels_url":"https://api.github.com/repos/facebook/buck/issues/449/labels{/name}","comments_url":"https://api.github.com/repos/facebook/buck/issues/449/comments","events_url":"https://api.github.com/repos/facebook/buck/issues/449/events","html_url":"https://github.com/facebook/buck/pull/449","id":109751442,"number":449,"title":"Add some support for running go tests.","user":{"login":"mikekap","id":43191,"avatar_url":"https://avatars.githubusercontent.com/u/43191?v=3","gravatar_id":"","url":"https://api.github.com/users/mikekap","html_url":"https://github.com/mikekap","followers_url":"https://api.github.com/users/mikekap/followers","following_url":"https://api.github.com/users/mikekap/following{/other_user}","gists_url":"https://api.github.com/users/mikekap/gists{/gist_id}","starred_url":"https://api.github.com/users/mikekap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikekap/subscriptions","organizations_url":"https://api.github.com/users/mikekap/orgs","repos_url":"https://api.github.com/users/mikekap/repos","events_url":"https://api.github.com/users/mikekap/events{/privacy}","received_events_url":"https://api.github.com/users/mikekap/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/buck/labels/CLA%20Signed","name":"CLA Signed","color":"009900"},{"url":"https://api.github.com/repos/facebook/buck/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-05T08:27:53Z","updated_at":"2015-10-24T00:03:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/buck/pulls/449","html_url":"https://github.com/facebook/buck/pull/449","diff_url":"https://github.com/facebook/buck/pull/449.diff","patch_url":"https://github.com/facebook/buck/pull/449.patch"},"body":"This isn't as complete as the `go test` command, mostly because `go test` \"magically\" recompiles the package under test. The closest\r\nyou can get to `go test`-like functionality is via duplication, as mentioned in the docs. It might be nice to make this easier via\r\nparam or different test rule (`go_internal_test`) that just does the src/dep copying for you. We may be able to make this even more\r\namazing via some sort of auto-discovery (we can easily tell if the test is external or internal at test main generation time) and\r\ncreate two different libs. But I digress; this is a v1.\r\n\r\nThis also fixes support for custom package names (was previously somewhat broken).\r\n\r\nThe slightly more controversial feature here is the test main generator. Particularly, the source (in go) is a) mostly ripped from\r\nhttps://github.com/golang/go/blob/master/src/cmd/go/test.go & b) checked in as the source. In order to actually use it at run-time, it\r\ncreates a \"fake\" test target //__internal_buck:go_test_main_gen. This is mostly to allow you to build buck without having go\r\ninstalled. I'm not sure of a better way to do this, so any ideas are appreciated.\r\n\r\nTested via the integration tests - they work :)"},"comment":{"url":"https://api.github.com/repos/facebook/buck/issues/comments/150723280","html_url":"https://github.com/facebook/buck/pull/449#issuecomment-150723280","issue_url":"https://api.github.com/repos/facebook/buck/issues/449","id":150723280,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T00:03:48Z","updated_at":"2015-10-24T00:03:48Z","body":"@mikekap updated the pull request."}}