{"action":"created","comment":{"url":"https://api.github.com/repos/golemfactory/golem/pulls/comments/144728912","pull_request_review_id":69426733,"id":144728912,"diff_hunk":"@@ -75,9 +79,64 @@ def file_upload_step(self):\n                 platform=self.platform,\n                 ext=self.golem_package_extension),\n             blocksize=640 * 1024,\n-            mode=0644,\n+            mode=0o644,\n         )\n \n+    def test_factory(self):\n+        factory = util.BuildFactory()\n+        factory.addStep(self.git_step())\n+        factory.addStep(self.venv_step())\n+        factory.addStep(self.requirements_step())\n+        factory.addStep(self.test_step())\n+        return factory\n+\n+    def test_step(self):\n+        install_req_cmd = self.pip_command + ['install', '-r',\n+                                              'requirements-test.txt']\n+\n+        return steps.ShellSequence(\n+            name='run tests',\n+            commands=[\n+                util.ShellArg(\n+                    logfile='install requirements',\n+                    haltOnFailure=True,\n+                    command=install_req_cmd),\n+                # TODO: move to requirements itself?\n+                util.ShellArg(\n+                    logfile='install missing requirement',\n+                    haltOnFailure=True,\n+                    command=self.pip_command + ['install', 'pyasn1==0.2.3',\n+                                                'codecov', 'pytest-cov']),\n+                util.ShellArg(\n+                    logfile='prepare for test',\n+                    haltOnFailure=True,\n+                    command=self.python_command + ['setup.py', 'develop']),\n+                util.ShellArg(\n+                    logfile='start hyperg',\n+                    haltOnFailure=True,\n+                    command=['scripts/test-daemon-start.sh']),\n+                # TODO: add xml results\n+                # TODO 2: add run slow\n+                util.ShellArg(\n+                    logfile='run tests',\n+                    warnOnFailure=True,\n+                    command=self.python_command + ['-m', 'pytest',\n+                                                   '--cov=golem',\n+                                                   '--durations=5',\n+                                                   '-rxs', '--runslow']),\n+                util.ShellArg(\n+                    logfile='handle coverage',\n+                    warnOnFailure=True,\n+                    command=self.python_command + ['-m', 'codecov']),\n+                util.ShellArg(\n+                    logfile='stop hyperg',\n+                    haltOnFailure=True,\n+                    command=['scripts/test-daemon-stop.sh']),\n+            ],\n+            env={\n+                'LANG': 'en_US.UTF-8',  # required for some tests","path":"scripts/ci/roles/buildbot-master/files/src/golem_buildbot/builders.py","position":82,"original_position":82,"commit_id":"73d178bfc9aa2eb32fa58dd4d3508221127d0e35","original_commit_id":"73d178bfc9aa2eb32fa58dd4d3508221127d0e35","user":{"login":"Radagast-red","id":662433,"avatar_url":"https://avatars2.githubusercontent.com/u/662433?v=4","gravatar_id":"","url":"https://api.github.com/users/Radagast-red","html_url":"https://github.com/Radagast-red","followers_url":"https://api.github.com/users/Radagast-red/followers","following_url":"https://api.github.com/users/Radagast-red/following{/other_user}","gists_url":"https://api.github.com/users/Radagast-red/gists{/gist_id}","starred_url":"https://api.github.com/users/Radagast-red/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Radagast-red/subscriptions","organizations_url":"https://api.github.com/users/Radagast-red/orgs","repos_url":"https://api.github.com/users/Radagast-red/repos","events_url":"https://api.github.com/users/Radagast-red/events{/privacy}","received_events_url":"https://api.github.com/users/Radagast-red/received_events","type":"User","site_admin":false},"body":"In what test this is required?","created_at":"2017-10-15T19:22:50Z","updated_at":"2017-10-15T19:24:37Z","html_url":"https://github.com/golemfactory/golem/pull/1455#discussion_r144728912","pull_request_url":"https://api.github.com/repos/golemfactory/golem/pulls/1455","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/golemfactory/golem/pulls/comments/144728912"},"html":{"href":"https://github.com/golemfactory/golem/pull/1455#discussion_r144728912"},"pull_request":{"href":"https://api.github.com/repos/golemfactory/golem/pulls/1455"}}},"pull_request":{"url":"https://api.github.com/repos/golemfactory/golem/pulls/1455","id":145506071,"html_url":"https://github.com/golemfactory/golem/pull/1455","diff_url":"https://github.com/golemfactory/golem/pull/1455.diff","patch_url":"https://github.com/golemfactory/golem/pull/1455.patch","issue_url":"https://api.github.com/repos/golemfactory/golem/issues/1455","number":1455,"state":"open","locked":false,"title":"Move linux unit tests to buildbot","user":{"login":"maaktweluit","id":10008353,"avatar_url":"https://avatars0.githubusercontent.com/u/10008353?v=4","gravatar_id":"","url":"https://api.github.com/users/maaktweluit","html_url":"https://github.com/maaktweluit","followers_url":"https://api.github.com/users/maaktweluit/followers","following_url":"https://api.github.com/users/maaktweluit/following{/other_user}","gists_url":"https://api.github.com/users/maaktweluit/gists{/gist_id}","starred_url":"https://api.github.com/users/maaktweluit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maaktweluit/subscriptions","organizations_url":"https://api.github.com/users/maaktweluit/orgs","repos_url":"https://api.github.com/users/maaktweluit/repos","events_url":"https://api.github.com/users/maaktweluit/events{/privacy}","received_events_url":"https://api.github.com/users/maaktweluit/received_events","type":"User","site_admin":false},"body":"First step in #1400 \r\n\r\nAdds the linux unit tests to the buildbot:\r\n- Installs the dependencies with ansible\r\n- Adds `test_factory` with all test steps from circleci\r\n- Needed test-daemon scripts, buildbot does not start background tasks\r\n\r\nTODO:\r\n- [ ] When cancelling the build the daemons remain running, maybe kill on start as well?\r\n- [ ] Requires #1301 to be merged, else the tests will fail on the linux server based on error in the description.\r\n- [ ] Upload coverage to s3, will setup a test account","created_at":"2017-10-09T17:20:19Z","updated_at":"2017-10-15T19:24:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ea4e9259e1fed4a099b6e11383ffe4be7127677","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/golemfactory/golem/pulls/1455/commits","review_comments_url":"https://api.github.com/repos/golemfactory/golem/pulls/1455/comments","review_comment_url":"https://api.github.com/repos/golemfactory/golem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/golemfactory/golem/issues/1455/comments","statuses_url":"https://api.github.com/repos/golemfactory/golem/statuses/73d178bfc9aa2eb32fa58dd4d3508221127d0e35","head":{"label":"maaktweluit:mwu/linux_unit_test","ref":"mwu/linux_unit_test","sha":"73d178bfc9aa2eb32fa58dd4d3508221127d0e35","user":{"login":"maaktweluit","id":10008353,"avatar_url":"https://avatars0.githubusercontent.com/u/10008353?v=4","gravatar_id":"","url":"https://api.github.com/users/maaktweluit","html_url":"https://github.com/maaktweluit","followers_url":"https://api.github.com/users/maaktweluit/followers","following_url":"https://api.github.com/users/maaktweluit/following{/other_user}","gists_url":"https://api.github.com/users/maaktweluit/gists{/gist_id}","starred_url":"https://api.github.com/users/maaktweluit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maaktweluit/subscriptions","organizations_url":"https://api.github.com/users/maaktweluit/orgs","repos_url":"https://api.github.com/users/maaktweluit/repos","events_url":"https://api.github.com/users/maaktweluit/events{/privacy}","received_events_url":"https://api.github.com/users/maaktweluit/received_events","type":"User","site_admin":false},"repo":{"id":94917359,"name":"golem","full_name":"maaktweluit/golem","owner":{"login":"maaktweluit","id":10008353,"avatar_url":"https://avatars0.githubusercontent.com/u/10008353?v=4","gravatar_id":"","url":"https://api.github.com/users/maaktweluit","html_url":"https://github.com/maaktweluit","followers_url":"https://api.github.com/users/maaktweluit/followers","following_url":"https://api.github.com/users/maaktweluit/following{/other_user}","gists_url":"https://api.github.com/users/maaktweluit/gists{/gist_id}","starred_url":"https://api.github.com/users/maaktweluit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maaktweluit/subscriptions","organizations_url":"https://api.github.com/users/maaktweluit/orgs","repos_url":"https://api.github.com/users/maaktweluit/repos","events_url":"https://api.github.com/users/maaktweluit/events{/privacy}","received_events_url":"https://api.github.com/users/maaktweluit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maaktweluit/golem","description":"Golem project is to create a global prosumer market for computing power.","fork":true,"url":"https://api.github.com/repos/maaktweluit/golem","forks_url":"https://api.github.com/repos/maaktweluit/golem/forks","keys_url":"https://api.github.com/repos/maaktweluit/golem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maaktweluit/golem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maaktweluit/golem/teams","hooks_url":"https://api.github.com/repos/maaktweluit/golem/hooks","issue_events_url":"https://api.github.com/repos/maaktweluit/golem/issues/events{/number}","events_url":"https://api.github.com/repos/maaktweluit/golem/events","assignees_url":"https://api.github.com/repos/maaktweluit/golem/assignees{/user}","branches_url":"https://api.github.com/repos/maaktweluit/golem/branches{/branch}","tags_url":"https://api.github.com/repos/maaktweluit/golem/tags","blobs_url":"https://api.github.com/repos/maaktweluit/golem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maaktweluit/golem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maaktweluit/golem/git/refs{/sha}","trees_url":"https://api.github.com/repos/maaktweluit/golem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maaktweluit/golem/statuses/{sha}","languages_url":"https://api.github.com/repos/maaktweluit/golem/languages","stargazers_url":"https://api.github.com/repos/maaktweluit/golem/stargazers","contributors_url":"https://api.github.com/repos/maaktweluit/golem/contributors","subscribers_url":"https://api.github.com/repos/maaktweluit/golem/subscribers","subscription_url":"https://api.github.com/repos/maaktweluit/golem/subscription","commits_url":"https://api.github.com/repos/maaktweluit/golem/commits{/sha}","git_commits_url":"https://api.github.com/repos/maaktweluit/golem/git/commits{/sha}","comments_url":"https://api.github.com/repos/maaktweluit/golem/comments{/number}","issue_comment_url":"https://api.github.com/repos/maaktweluit/golem/issues/comments{/number}","contents_url":"https://api.github.com/repos/maaktweluit/golem/contents/{+path}","compare_url":"https://api.github.com/repos/maaktweluit/golem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maaktweluit/golem/merges","archive_url":"https://api.github.com/repos/maaktweluit/golem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maaktweluit/golem/downloads","issues_url":"https://api.github.com/repos/maaktweluit/golem/issues{/number}","pulls_url":"https://api.github.com/repos/maaktweluit/golem/pulls{/number}","milestones_url":"https://api.github.com/repos/maaktweluit/golem/milestones{/number}","notifications_url":"https://api.github.com/repos/maaktweluit/golem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maaktweluit/golem/labels{/name}","releases_url":"https://api.github.com/repos/maaktweluit/golem/releases{/id}","deployments_url":"https://api.github.com/repos/maaktweluit/golem/deployments","created_at":"2017-06-20T17:25:24Z","updated_at":"2017-06-20T17:25:27Z","pushed_at":"2017-10-10T21:04:56Z","git_url":"git://github.com/maaktweluit/golem.git","ssh_url":"git@github.com:maaktweluit/golem.git","clone_url":"https://github.com/maaktweluit/golem.git","svn_url":"https://github.com/maaktweluit/golem","homepage":"https://golem.network","size":70957,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"golemfactory:develop","ref":"develop","sha":"deb41abf6d14263a656d392037e76a5598eb7b6e","user":{"login":"golemfactory","id":23193179,"avatar_url":"https://avatars1.githubusercontent.com/u/23193179?v=4","gravatar_id":"","url":"https://api.github.com/users/golemfactory","html_url":"https://github.com/golemfactory","followers_url":"https://api.github.com/users/golemfactory/followers","following_url":"https://api.github.com/users/golemfactory/following{/other_user}","gists_url":"https://api.github.com/users/golemfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/golemfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golemfactory/subscriptions","organizations_url":"https://api.github.com/users/golemfactory/orgs","repos_url":"https://api.github.com/users/golemfactory/repos","events_url":"https://api.github.com/users/golemfactory/events{/privacy}","received_events_url":"https://api.github.com/users/golemfactory/received_events","type":"Organization","site_admin":false},"repo":{"id":46433937,"name":"golem","full_name":"golemfactory/golem","owner":{"login":"golemfactory","id":23193179,"avatar_url":"https://avatars1.githubusercontent.com/u/23193179?v=4","gravatar_id":"","url":"https://api.github.com/users/golemfactory","html_url":"https://github.com/golemfactory","followers_url":"https://api.github.com/users/golemfactory/followers","following_url":"https://api.github.com/users/golemfactory/following{/other_user}","gists_url":"https://api.github.com/users/golemfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/golemfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golemfactory/subscriptions","organizations_url":"https://api.github.com/users/golemfactory/orgs","repos_url":"https://api.github.com/users/golemfactory/repos","events_url":"https://api.github.com/users/golemfactory/events{/privacy}","received_events_url":"https://api.github.com/users/golemfactory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/golemfactory/golem","description":"Golem is creating a global market for computing power.","fork":false,"url":"https://api.github.com/repos/golemfactory/golem","forks_url":"https://api.github.com/repos/golemfactory/golem/forks","keys_url":"https://api.github.com/repos/golemfactory/golem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/golemfactory/golem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/golemfactory/golem/teams","hooks_url":"https://api.github.com/repos/golemfactory/golem/hooks","issue_events_url":"https://api.github.com/repos/golemfactory/golem/issues/events{/number}","events_url":"https://api.github.com/repos/golemfactory/golem/events","assignees_url":"https://api.github.com/repos/golemfactory/golem/assignees{/user}","branches_url":"https://api.github.com/repos/golemfactory/golem/branches{/branch}","tags_url":"https://api.github.com/repos/golemfactory/golem/tags","blobs_url":"https://api.github.com/repos/golemfactory/golem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/golemfactory/golem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/golemfactory/golem/git/refs{/sha}","trees_url":"https://api.github.com/repos/golemfactory/golem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/golemfactory/golem/statuses/{sha}","languages_url":"https://api.github.com/repos/golemfactory/golem/languages","stargazers_url":"https://api.github.com/repos/golemfactory/golem/stargazers","contributors_url":"https://api.github.com/repos/golemfactory/golem/contributors","subscribers_url":"https://api.github.com/repos/golemfactory/golem/subscribers","subscription_url":"https://api.github.com/repos/golemfactory/golem/subscription","commits_url":"https://api.github.com/repos/golemfactory/golem/commits{/sha}","git_commits_url":"https://api.github.com/repos/golemfactory/golem/git/commits{/sha}","comments_url":"https://api.github.com/repos/golemfactory/golem/comments{/number}","issue_comment_url":"https://api.github.com/repos/golemfactory/golem/issues/comments{/number}","contents_url":"https://api.github.com/repos/golemfactory/golem/contents/{+path}","compare_url":"https://api.github.com/repos/golemfactory/golem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/golemfactory/golem/merges","archive_url":"https://api.github.com/repos/golemfactory/golem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/golemfactory/golem/downloads","issues_url":"https://api.github.com/repos/golemfactory/golem/issues{/number}","pulls_url":"https://api.github.com/repos/golemfactory/golem/pulls{/number}","milestones_url":"https://api.github.com/repos/golemfactory/golem/milestones{/number}","notifications_url":"https://api.github.com/repos/golemfactory/golem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/golemfactory/golem/labels{/name}","releases_url":"https://api.github.com/repos/golemfactory/golem/releases{/id}","deployments_url":"https://api.github.com/repos/golemfactory/golem/deployments","created_at":"2015-11-18T17:02:35Z","updated_at":"2017-10-15T10:25:31Z","pushed_at":"2017-10-13T16:47:44Z","git_url":"git://github.com/golemfactory/golem.git","ssh_url":"git@github.com:golemfactory/golem.git","clone_url":"https://github.com/golemfactory/golem.git","svn_url":"https://github.com/golemfactory/golem","homepage":"https://golem.network","size":74908,"stargazers_count":1586,"watchers_count":1586,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":153,"mirror_url":null,"open_issues_count":213,"forks":153,"open_issues":213,"watchers":1586,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/golemfactory/golem/pulls/1455"},"html":{"href":"https://github.com/golemfactory/golem/pull/1455"},"issue":{"href":"https://api.github.com/repos/golemfactory/golem/issues/1455"},"comments":{"href":"https://api.github.com/repos/golemfactory/golem/issues/1455/comments"},"review_comments":{"href":"https://api.github.com/repos/golemfactory/golem/pulls/1455/comments"},"review_comment":{"href":"https://api.github.com/repos/golemfactory/golem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/golemfactory/golem/pulls/1455/commits"},"statuses":{"href":"https://api.github.com/repos/golemfactory/golem/statuses/73d178bfc9aa2eb32fa58dd4d3508221127d0e35"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Radagast-red"}}