GitHub PullRequestReviewCommentEvent at 2014-10-28 22:16:09
Repository: chapel
Actor: ronawho
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/19508119","id":19508119,"diff_hunk":"@@ -12,6 +13,22 @@ if (-r $memfile) {\n       $memfree = \"$2\";\n     }\n   }\n-  $hostname = `hostname -s`; chomp($hostname);\n-  system(\"./countMemory.makegood $memfree > countMemory.$hostname.good\");\n+} else {\n+    $system = `uname -s`; chomp($system);\n+    if ($system eq \"Darwin\") {\n+\t$mem = `system_profiler | grep \"   Memory:\"`;\n+\tif ($mem =~ m/(\\s*)Memory: (\\s*)(\\S*) GB/) {\n+\t    $memInGB = \"$3\";\n+\t    $memfree = $memInGB * 1024 * 1024;\n+\t} else {\n+#\t    printf \"Unexpected system_profiler output\\n\";\n+\t}\n+#\tprintf \"On darwin and mem is $memfree!\\n\";","path":"test/modules/standard/memory/countMemory/countMemory.prediff","position":24,"original_position":24,"commit_id":"45ef878fa8384182f9450db94163ca9c7dfaf147","original_commit_id":"45ef878fa8384182f9450db94163ca9c7dfaf147","user":{"login":"ronawho","id":1588337,"avatar_url":"https://avatars.githubusercontent.com/u/1588337?v=2","gravatar_id":"","url":"https://api.github.com/users/ronawho","html_url":"https://github.com/ronawho","followers_url":"https://api.github.com/users/ronawho/followers","following_url":"https://api.github.com/users/ronawho/following{/other_user}","gists_url":"https://api.github.com/users/ronawho/gists{/gist_id}","starred_url":"https://api.github.com/users/ronawho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronawho/subscriptions","organizations_url":"https://api.github.com/users/ronawho/orgs","repos_url":"https://api.github.com/users/ronawho/repos","events_url":"https://api.github.com/users/ronawho/events{/privacy}","received_events_url":"https://api.github.com/users/ronawho/received_events","type":"User","site_admin":false},"body":"Did you want to leave the debug prints in?","created_at":"2014-10-28T22:16:09Z","updated_at":"2014-10-28T22:16:09Z","html_url":"https://github.com/chapel-lang/chapel/pull/691#discussion_r19508119","pull_request_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/691","_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/19508119"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/691#discussion_r19508119"},"pull_request":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/691"}}},"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/691","id":23493812,"html_url":"https://github.com/chapel-lang/chapel/pull/691","diff_url":"https://github.com/chapel-lang/chapel/pull/691.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/691.patch","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/691","number":691,"state":"open","locked":false,"title":"Fix memory counting tests for mac","user":{"login":"bradcray","id":7536222,"avatar_url":"https://avatars.githubusercontent.com/u/7536222?v=2","gravatar_id":"","url":"https://api.github.com/users/bradcray","html_url":"https://github.com/bradcray","followers_url":"https://api.github.com/users/bradcray/followers","following_url":"https://api.github.com/users/bradcray/following{/other_user}","gists_url":"https://api.github.com/users/bradcray/gists{/gist_id}","starred_url":"https://api.github.com/users/bradcray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradcray/subscriptions","organizations_url":"https://api.github.com/users/bradcray/orgs","repos_url":"https://api.github.com/users/bradcray/repos","events_url":"https://api.github.com/users/bradcray/events{/privacy}","received_events_url":"https://api.github.com/users/bradcray/received_events","type":"User","site_admin":false},"body":"This commit makes our memory counting tests portable to Mac\r\nwithout user involvement, and also cleans things up a bit.\r\n\r\nAs background, the test is used to determine whether the\r\nChapel query for the amount of physical memory a locale\r\nowns is working correctly by comparing it to the results\r\nof /proc/meminfo by default.  Macs don't support\r\n/proc/meminfo by default, so in the past, we've manually\r\ncreated .good files for our Macs and used those instead.\r\nBut this is a hassle.  The lack of such a .good file on\r\nour new Mac testing platform, for example, has caused\r\nthis test to fail (as it would on individual developers'\r\nMacs now that more people are using them).\r\n\r\nDoing a quick google search, I found a Mac-happy way to\r\nget the amount of physical memory from the command-line\r\nand substituted that in, in the event that uname -s is\r\ndarwin (in countMemory.prediff).\r\n\r\nFrom there, one other change was required:  When the\r\namount of physical memory is an integer, it seems that\r\nwe got a bad match because the Perl scripts would\r\ncreate the value '8' where Chapel would print '8.0'.\r\nFor this reason, I had to do some processing in the\r\n.makegood script to add a trailing '.0' to such cases.\r\nThis was complicated only by my own poor knowledge of\r\nPerl (including not anticipating that computing a\r\nfloating point expression, assigning it to a value, and\r\nthen converting it to a string would give a different\r\nresult than simply converting the expression to a\r\nstring (?!)\r\n\r\nWhile here, I noted that most of the hard-coded machine\r\n.good files that we have are Macs (and ones that we\r\ndon't run on anymore), so removed them, as well as a\r\nfew other machines that are long-since retired.  So\r\nI ended up removing all the .<machine>.good files and\r\nsimplified the .gitignore file as a result.","created_at":"2014-10-28T21:56:36Z","updated_at":"2014-10-28T22:16:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1d6936498d726b3222f354fe7603486fb5e85b6","assignee":{"login":"ronawho","id":1588337,"avatar_url":"https://avatars.githubusercontent.com/u/1588337?v=2","gravatar_id":"","url":"https://api.github.com/users/ronawho","html_url":"https://github.com/ronawho","followers_url":"https://api.github.com/users/ronawho/followers","following_url":"https://api.github.com/users/ronawho/following{/other_user}","gists_url":"https://api.github.com/users/ronawho/gists{/gist_id}","starred_url":"https://api.github.com/users/ronawho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronawho/subscriptions","organizations_url":"https://api.github.com/users/ronawho/orgs","repos_url":"https://api.github.com/users/ronawho/repos","events_url":"https://api.github.com/users/ronawho/events{/privacy}","received_events_url":"https://api.github.com/users/ronawho/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/691/commits","review_comments_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/691/comments","review_comment_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/{number}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/691/comments","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/45ef878fa8384182f9450db94163ca9c7dfaf147","head":{"label":"bradcray:fix-countmemory-for-mac","ref":"fix-countmemory-for-mac","sha":"45ef878fa8384182f9450db94163ca9c7dfaf147","user":{"login":"bradcray","id":7536222,"avatar_url":"https://avatars.githubusercontent.com/u/7536222?v=2","gravatar_id":"","url":"https://api.github.com/users/bradcray","html_url":"https://github.com/bradcray","followers_url":"https://api.github.com/users/bradcray/followers","following_url":"https://api.github.com/users/bradcray/following{/other_user}","gists_url":"https://api.github.com/users/bradcray/gists{/gist_id}","starred_url":"https://api.github.com/users/bradcray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradcray/subscriptions","organizations_url":"https://api.github.com/users/bradcray/orgs","repos_url":"https://api.github.com/users/bradcray/repos","events_url":"https://api.github.com/users/bradcray/events{/privacy}","received_events_url":"https://api.github.com/users/bradcray/received_events","type":"User","site_admin":false},"repo":{"id":21837395,"name":"chapel","full_name":"bradcray/chapel","owner":{"login":"bradcray","id":7536222,"avatar_url":"https://avatars.githubusercontent.com/u/7536222?v=2","gravatar_id":"","url":"https://api.github.com/users/bradcray","html_url":"https://github.com/bradcray","followers_url":"https://api.github.com/users/bradcray/followers","following_url":"https://api.github.com/users/bradcray/following{/other_user}","gists_url":"https://api.github.com/users/bradcray/gists{/gist_id}","starred_url":"https://api.github.com/users/bradcray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradcray/subscriptions","organizations_url":"https://api.github.com/users/bradcray/orgs","repos_url":"https://api.github.com/users/bradcray/repos","events_url":"https://api.github.com/users/bradcray/events{/privacy}","received_events_url":"https://api.github.com/users/bradcray/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bradcray/chapel","description":"a Productive Parallel Programming Language","fork":true,"url":"https://api.github.com/repos/bradcray/chapel","forks_url":"https://api.github.com/repos/bradcray/chapel/forks","keys_url":"https://api.github.com/repos/bradcray/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bradcray/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bradcray/chapel/teams","hooks_url":"https://api.github.com/repos/bradcray/chapel/hooks","issue_events_url":"https://api.github.com/repos/bradcray/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/bradcray/chapel/events","assignees_url":"https://api.github.com/repos/bradcray/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/bradcray/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/bradcray/chapel/tags","blobs_url":"https://api.github.com/repos/bradcray/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bradcray/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bradcray/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/bradcray/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bradcray/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/bradcray/chapel/languages","stargazers_url":"https://api.github.com/repos/bradcray/chapel/stargazers","contributors_url":"https://api.github.com/repos/bradcray/chapel/contributors","subscribers_url":"https://api.github.com/repos/bradcray/chapel/subscribers","subscription_url":"https://api.github.com/repos/bradcray/chapel/subscription","commits_url":"https://api.github.com/repos/bradcray/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/bradcray/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/bradcray/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/bradcray/chapel/issues/comments/{number}","contents_url":"https://api.github.com/repos/bradcray/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/bradcray/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bradcray/chapel/merges","archive_url":"https://api.github.com/repos/bradcray/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bradcray/chapel/downloads","issues_url":"https://api.github.com/repos/bradcray/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/bradcray/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/bradcray/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/bradcray/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bradcray/chapel/labels{/name}","releases_url":"https://api.github.com/repos/bradcray/chapel/releases{/id}","created_at":"2014-07-14T22:08:29Z","updated_at":"2014-08-05T04:44:35Z","pushed_at":"2014-10-28T21:40:15Z","git_url":"git://github.com/bradcray/chapel.git","ssh_url":"git@github.com:bradcray/chapel.git","clone_url":"https://github.com/bradcray/chapel.git","svn_url":"https://github.com/bradcray/chapel","homepage":"http://chapel.cray.com/","size":254393,"stargazers_count":1,"watchers_count":1,"language":"C","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":1,"default_branch":"master"}},"base":{"label":"chapel-lang:master","ref":"master","sha":"bc7c4ae3f158753deaac3ab505fae038416fc023","user":{"login":"chapel-lang","id":7597261,"avatar_url":"https://avatars.githubusercontent.com/u/7597261?v=2","gravatar_id":"","url":"https://api.github.com/users/chapel-lang","html_url":"https://github.com/chapel-lang","followers_url":"https://api.github.com/users/chapel-lang/followers","following_url":"https://api.github.com/users/chapel-lang/following{/other_user}","gists_url":"https://api.github.com/users/chapel-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/chapel-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapel-lang/subscriptions","organizations_url":"https://api.github.com/users/chapel-lang/orgs","repos_url":"https://api.github.com/users/chapel-lang/repos","events_url":"https://api.github.com/users/chapel-lang/events{/privacy}","received_events_url":"https://api.github.com/users/chapel-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":21663285,"name":"chapel","full_name":"chapel-lang/chapel","owner":{"login":"chapel-lang","id":7597261,"avatar_url":"https://avatars.githubusercontent.com/u/7597261?v=2","gravatar_id":"","url":"https://api.github.com/users/chapel-lang","html_url":"https://github.com/chapel-lang","followers_url":"https://api.github.com/users/chapel-lang/followers","following_url":"https://api.github.com/users/chapel-lang/following{/other_user}","gists_url":"https://api.github.com/users/chapel-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/chapel-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapel-lang/subscriptions","organizations_url":"https://api.github.com/users/chapel-lang/orgs","repos_url":"https://api.github.com/users/chapel-lang/repos","events_url":"https://api.github.com/users/chapel-lang/events{/privacy}","received_events_url":"https://api.github.com/users/chapel-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chapel-lang/chapel","description":"a Productive Parallel Programming Language","fork":false,"url":"https://api.github.com/repos/chapel-lang/chapel","forks_url":"https://api.github.com/repos/chapel-lang/chapel/forks","keys_url":"https://api.github.com/repos/chapel-lang/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chapel-lang/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chapel-lang/chapel/teams","hooks_url":"https://api.github.com/repos/chapel-lang/chapel/hooks","issue_events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/chapel-lang/chapel/events","assignees_url":"https://api.github.com/repos/chapel-lang/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/chapel-lang/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/chapel-lang/chapel/tags","blobs_url":"https://api.github.com/repos/chapel-lang/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chapel-lang/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chapel-lang/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/chapel-lang/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/chapel-lang/chapel/languages","stargazers_url":"https://api.github.com/repos/chapel-lang/chapel/stargazers","contributors_url":"https://api.github.com/repos/chapel-lang/chapel/contributors","subscribers_url":"https://api.github.com/repos/chapel-lang/chapel/subscribers","subscription_url":"https://api.github.com/repos/chapel-lang/chapel/subscription","commits_url":"https://api.github.com/repos/chapel-lang/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/chapel-lang/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments/{number}","contents_url":"https://api.github.com/repos/chapel-lang/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/chapel-lang/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chapel-lang/chapel/merges","archive_url":"https://api.github.com/repos/chapel-lang/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chapel-lang/chapel/downloads","issues_url":"https://api.github.com/repos/chapel-lang/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/chapel-lang/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/chapel-lang/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/chapel-lang/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chapel-lang/chapel/labels{/name}","releases_url":"https://api.github.com/repos/chapel-lang/chapel/releases{/id}","created_at":"2014-07-09T18:15:54Z","updated_at":"2014-10-26T13:59:20Z","pushed_at":"2014-10-28T21:25:04Z","git_url":"git://github.com/chapel-lang/chapel.git","ssh_url":"git@github.com:chapel-lang/chapel.git","clone_url":"https://github.com/chapel-lang/chapel.git","svn_url":"https://github.com/chapel-lang/chapel","homepage":"http://chapel.cray.com/","size":326932,"stargazers_count":42,"watchers_count":42,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":10,"forks":27,"open_issues":10,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/691"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/691"},"issue":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/691"},"comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/691/comments"},"review_comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/691/comments"},"review_comment":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/691/commits"},"statuses":{"href":"https://api.github.com/repos/chapel-lang/chapel/statuses/45ef878fa8384182f9450db94163ca9c7dfaf147"}}}}