{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/comments/65011520","id":65011520,"diff_hunk":"@@ -7,6 +7,9 @@\n #:     If `--new-issue` is passed, automatically create a new issue in the appropriate\n #:     GitHub repository as well as creating the Gist.\n #:\n+#:     If `--test-logs` is passed, uploads the logs for the formula's last test run, instead\n+#:     of the build logs.","path":"Library/Homebrew/cmd/gist-logs.rb","position":11,"original_position":11,"commit_id":"f2db0938b7d065cb0c450c7a0855ffbfcf5de236","original_commit_id":"f2db0938b7d065cb0c450c7a0855ffbfcf5de236","user":{"login":"MikeMcQuaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeMcQuaid","html_url":"https://github.com/MikeMcQuaid","followers_url":"https://api.github.com/users/MikeMcQuaid/followers","following_url":"https://api.github.com/users/MikeMcQuaid/following{/other_user}","gists_url":"https://api.github.com/users/MikeMcQuaid/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeMcQuaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeMcQuaid/subscriptions","organizations_url":"https://api.github.com/users/MikeMcQuaid/orgs","repos_url":"https://api.github.com/users/MikeMcQuaid/repos","events_url":"https://api.github.com/users/MikeMcQuaid/events{/privacy}","received_events_url":"https://api.github.com/users/MikeMcQuaid/received_events","type":"User","site_admin":true},"body":"Could maybe always upload them all? Either way, not sure this makes sense to be an end-user option.","created_at":"2016-05-29T21:09:34Z","updated_at":"2016-05-29T21:09:34Z","html_url":"https://github.com/Homebrew/brew/pull/285#discussion_r65011520","pull_request_url":"https://api.github.com/repos/Homebrew/brew/pulls/285","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments/65011520"},"html":{"href":"https://github.com/Homebrew/brew/pull/285#discussion_r65011520"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/285"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/285","id":71791109,"html_url":"https://github.com/Homebrew/brew/pull/285","diff_url":"https://github.com/Homebrew/brew/pull/285.diff","patch_url":"https://github.com/Homebrew/brew/pull/285.patch","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/285","number":285,"state":"open","locked":false,"title":"Separate build and test logs","user":{"login":"apjanke","id":2618447,"avatar_url":"https://avatars.githubusercontent.com/u/2618447?v=3","gravatar_id":"","url":"https://api.github.com/users/apjanke","html_url":"https://github.com/apjanke","followers_url":"https://api.github.com/users/apjanke/followers","following_url":"https://api.github.com/users/apjanke/following{/other_user}","gists_url":"https://api.github.com/users/apjanke/gists{/gist_id}","starred_url":"https://api.github.com/users/apjanke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apjanke/subscriptions","organizations_url":"https://api.github.com/users/apjanke/orgs","repos_url":"https://api.github.com/users/apjanke/repos","events_url":"https://api.github.com/users/apjanke/events{/privacy}","received_events_url":"https://api.github.com/users/apjanke/received_events","type":"User","site_admin":false},"body":"- [X] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/.github/CONTRIBUTING.md) document?\r\n- [X] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?\r\n- [X] Have you added an explanation of what your changes do and why you'd like us to include them?\r\n- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/homebrew/pull/49031).\r\n- [ ] Have you successfully run `brew tests` with your changes locally? _No; I'm getting a warning that needs to be cleaned up.\r\n\r\n-----\r\n\r\nAny objections to splitting the build and test logs in to separate subdirectories?\r\n\r\nCurrently, `brew install` and `brew test` both drop their log files in the same `.../Logs/Homebrew/<formula_name>` directory. This means that if you do a `brew install foo` and then  `brew test foo` on a formula that includes `system()` calls in its `def test`, its test logs will contaminate the installation logs. This happens with `postgresql`, for example.\r\n\r\nI suspect this was unintentional, and just wasn't noticed because we seldom use Homebrew logs except for immediately after a failed `brew install`, in which case a `brew test` will not have been run.\r\n\r\nThis PR adds new `build/` and `test/` subdirs to separate the logs for the two stages, and adjusts `brew gist-logs` and other things using logs to account for it. `brew cleanup` will handle migrating logs in the old directory structure to the new one, so users won't lose existing logs.\r\n\r\nThis has the additional advantage of opening up logical space in the `brew` logs directory to allow for logging of other things, if that becomes useful in the future.\r\n\r\n###   Failing tests   ###\r\n\r\nThe `brew tests` run isn't failing outright, but it is complaining about leaked files. I haven't been able to fix this yet, because I can't figure out where the whitelist for \"okay to appear\" files or log structure skeleton is, or if it's complaining about this for some other reason. Help on this is welcome.\r\n\r\nMarking this as \"in progress\" because of this, and won't ask to merge until it's clean.\r\n\r\n(The exact test that appears to leak will vary across `brew tests` runs, I think because the random seed shuffles the order tests are run in, but `test_cleanup_logs` is always involved.)\r\n\r\n```\r\n[✘ /usr/local/Library/Homebrew on ⇄ separate-build-and-test-logs]\r\n$ brew tests\r\nRun options: --seed 5148\r\n\r\n# Running:\r\n\r\n.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................\r\n\r\nFinished in 51.091141s, 16.7348 runs/s, 40.5941 assertions/s.\r\n\r\n855 runs, 2074 assertions, 0 failures, 0 errors, 0 skips\r\nWarning: File leak is detected\r\nInstallTests#test_a_basic_install\r\n--- expected\r\n+++ actual\r\n@@ -3,6 +3,7 @@\r\n  \"/cellar\",\r\n  \"/formula_cache\",\r\n  \"/logs\",\r\n+ \"/logs/build\",\r\n  \"/prefix\",\r\n  \"/prefix/Library\",\r\n  \"/prefix/Library/Taps\",\r\nCleanupTests#test_cleanup_logs\r\n--- expected\r\n+++ actual\r\n@@ -3,7 +3,6 @@\r\n  \"/cellar\",\r\n  \"/formula_cache\",\r\n  \"/logs\",\r\n- \"/logs/build\",\r\n  \"/prefix\",\r\n  \"/prefix/Library\",\r\n  \"/prefix/Library/Taps\",\r\n```\r\n\r\n###   Considerations   ###\r\n\r\nThis will be a breaking change for any external commands or other code that relies on the current directory structure of the log files.","created_at":"2016-05-28T02:59:40Z","updated_at":"2016-05-29T21:09:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7cfcfed7eab34d35a881d0c02c64e3c00b207440","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/brew/pulls/285/commits","review_comments_url":"https://api.github.com/repos/Homebrew/brew/pulls/285/comments","review_comment_url":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/285/comments","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/f2db0938b7d065cb0c450c7a0855ffbfcf5de236","head":{"label":"apjanke:separate-build-and-test-logs","ref":"separate-build-and-test-logs","sha":"f2db0938b7d065cb0c450c7a0855ffbfcf5de236","user":{"login":"apjanke","id":2618447,"avatar_url":"https://avatars.githubusercontent.com/u/2618447?v=3","gravatar_id":"","url":"https://api.github.com/users/apjanke","html_url":"https://github.com/apjanke","followers_url":"https://api.github.com/users/apjanke/followers","following_url":"https://api.github.com/users/apjanke/following{/other_user}","gists_url":"https://api.github.com/users/apjanke/gists{/gist_id}","starred_url":"https://api.github.com/users/apjanke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apjanke/subscriptions","organizations_url":"https://api.github.com/users/apjanke/orgs","repos_url":"https://api.github.com/users/apjanke/repos","events_url":"https://api.github.com/users/apjanke/events{/privacy}","received_events_url":"https://api.github.com/users/apjanke/received_events","type":"User","site_admin":false},"repo":{"id":55512108,"name":"brew","full_name":"apjanke/brew","owner":{"login":"apjanke","id":2618447,"avatar_url":"https://avatars.githubusercontent.com/u/2618447?v=3","gravatar_id":"","url":"https://api.github.com/users/apjanke","html_url":"https://github.com/apjanke","followers_url":"https://api.github.com/users/apjanke/followers","following_url":"https://api.github.com/users/apjanke/following{/other_user}","gists_url":"https://api.github.com/users/apjanke/gists{/gist_id}","starred_url":"https://api.github.com/users/apjanke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apjanke/subscriptions","organizations_url":"https://api.github.com/users/apjanke/orgs","repos_url":"https://api.github.com/users/apjanke/repos","events_url":"https://api.github.com/users/apjanke/events{/privacy}","received_events_url":"https://api.github.com/users/apjanke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/apjanke/brew","description":":beer: The missing package manager for OS X","fork":true,"url":"https://api.github.com/repos/apjanke/brew","forks_url":"https://api.github.com/repos/apjanke/brew/forks","keys_url":"https://api.github.com/repos/apjanke/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apjanke/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apjanke/brew/teams","hooks_url":"https://api.github.com/repos/apjanke/brew/hooks","issue_events_url":"https://api.github.com/repos/apjanke/brew/issues/events{/number}","events_url":"https://api.github.com/repos/apjanke/brew/events","assignees_url":"https://api.github.com/repos/apjanke/brew/assignees{/user}","branches_url":"https://api.github.com/repos/apjanke/brew/branches{/branch}","tags_url":"https://api.github.com/repos/apjanke/brew/tags","blobs_url":"https://api.github.com/repos/apjanke/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apjanke/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apjanke/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/apjanke/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apjanke/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/apjanke/brew/languages","stargazers_url":"https://api.github.com/repos/apjanke/brew/stargazers","contributors_url":"https://api.github.com/repos/apjanke/brew/contributors","subscribers_url":"https://api.github.com/repos/apjanke/brew/subscribers","subscription_url":"https://api.github.com/repos/apjanke/brew/subscription","commits_url":"https://api.github.com/repos/apjanke/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/apjanke/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/apjanke/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/apjanke/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/apjanke/brew/contents/{+path}","compare_url":"https://api.github.com/repos/apjanke/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apjanke/brew/merges","archive_url":"https://api.github.com/repos/apjanke/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apjanke/brew/downloads","issues_url":"https://api.github.com/repos/apjanke/brew/issues{/number}","pulls_url":"https://api.github.com/repos/apjanke/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/apjanke/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/apjanke/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apjanke/brew/labels{/name}","releases_url":"https://api.github.com/repos/apjanke/brew/releases{/id}","deployments_url":"https://api.github.com/repos/apjanke/brew/deployments","created_at":"2016-04-05T13:55:02Z","updated_at":"2016-04-05T13:55:04Z","pushed_at":"2016-05-28T18:28:20Z","git_url":"git://github.com/apjanke/brew.git","ssh_url":"git@github.com:apjanke/brew.git","clone_url":"https://github.com/apjanke/brew.git","svn_url":"https://github.com/apjanke/brew","homepage":"http://brew.sh","size":9879,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Homebrew:master","ref":"master","sha":"2f1be1f36ff1ebf4a8f331d0536128d42edc01fd","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":53238813,"name":"brew","full_name":"Homebrew/brew","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/brew","description":":beer: The missing package manager for OS X","fork":false,"url":"https://api.github.com/repos/Homebrew/brew","forks_url":"https://api.github.com/repos/Homebrew/brew/forks","keys_url":"https://api.github.com/repos/Homebrew/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/brew/teams","hooks_url":"https://api.github.com/repos/Homebrew/brew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/brew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/brew/events","assignees_url":"https://api.github.com/repos/Homebrew/brew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/brew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/brew/tags","blobs_url":"https://api.github.com/repos/Homebrew/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/brew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/brew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/brew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/brew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/brew/subscription","commits_url":"https://api.github.com/repos/Homebrew/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/brew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/brew/merges","archive_url":"https://api.github.com/repos/Homebrew/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/brew/downloads","issues_url":"https://api.github.com/repos/Homebrew/brew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/brew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/brew/releases{/id}","deployments_url":"https://api.github.com/repos/Homebrew/brew/deployments","created_at":"2016-03-06T05:08:38Z","updated_at":"2016-05-29T21:08:55Z","pushed_at":"2016-05-29T21:04:00Z","git_url":"git://github.com/Homebrew/brew.git","ssh_url":"git@github.com:Homebrew/brew.git","clone_url":"https://github.com/Homebrew/brew.git","svn_url":"https://github.com/Homebrew/brew","homepage":"http://brew.sh","size":10150,"stargazers_count":1276,"watchers_count":1276,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":368,"mirror_url":null,"open_issues_count":37,"forks":368,"open_issues":37,"watchers":1276,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/285"},"html":{"href":"https://github.com/Homebrew/brew/pull/285"},"issue":{"href":"https://api.github.com/repos/Homebrew/brew/issues/285"},"comments":{"href":"https://api.github.com/repos/Homebrew/brew/issues/285/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/285/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/285/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/brew/statuses/f2db0938b7d065cb0c450c7a0855ffbfcf5de236"}}}}
{"actor":{"display_login":"MikeMcQuaid"}}