{"action":"opened","number":1197,"pull_request":{"url":"https://api.github.com/repos/appcelerator/amp/pulls/1197","id":120936481,"html_url":"https://github.com/appcelerator/amp/pull/1197","diff_url":"https://github.com/appcelerator/amp/pull/1197.diff","patch_url":"https://github.com/appcelerator/amp/pull/1197.patch","issue_url":"https://api.github.com/repos/appcelerator/amp/issues/1197","number":1197,"state":"open","locked":false,"title":"Test enhancements","user":{"login":"subfuzion","id":159738,"avatar_url":"https://avatars3.githubusercontent.com/u/159738?v=3","gravatar_id":"","url":"https://api.github.com/users/subfuzion","html_url":"https://github.com/subfuzion","followers_url":"https://api.github.com/users/subfuzion/followers","following_url":"https://api.github.com/users/subfuzion/following{/other_user}","gists_url":"https://api.github.com/users/subfuzion/gists{/gist_id}","starred_url":"https://api.github.com/users/subfuzion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/subfuzion/subscriptions","organizations_url":"https://api.github.com/users/subfuzion/orgs","repos_url":"https://api.github.com/users/subfuzion/repos","events_url":"https://api.github.com/users/subfuzion/events{/privacy}","received_events_url":"https://api.github.com/users/subfuzion/received_events","type":"User","site_admin":false},"body":"Adds a new test runner for bash scripts to handle platform smoke tests. The test runner and test helper scripts are located under `platform/testing`. The test runner is called `testrunner`.\r\n\r\n`testrunner` looks for test scripts in the test path, which by default is a subdirectory of the working directory called `tests`, but the location can be overridden by specifying the path as an argument (ex: `testrunner /path/to/tests`).\r\n\r\n`testrunner` looks for test helper scripts to include (eg, `testing.sh`) in the working directory, but this can be overridden by setting the `TEST_INCLUDE` environment variable (ex: `TEST_INCLUDE=/path/to/include testrunner`).\r\n\r\n`testrunner` supports 3 levels of verbosity. The default is `1`, but this can be overridden by specify the level as an environment variable (ex: `VERBOSE=0 testrunner`).\r\n  `0` - only print the test result summary\r\n  `1` - print the output of failing tests, plus the test result summary and list of failed tests\r\n  `2` - print passing and failing test output, plus the test result summary and lists of both failed and passing tests\r\n\r\nThe test path points to a directory that is the top level test suite. A test suite consists of tests and any child test suites located in subdirectories.\r\n\r\nThe tests of a test suite are any files at a particular directory level that match one of the following:\r\n * `*setup.sh`\r\n * `*_test.sh`\r\n * `*teardown.sh`\r\n\r\nTests are run in subshells and processed in the following order:\r\n 1. Source all the files in the directory that match `*setup.sh`. This evaluates each script and if any script fails at this level, the suite fails and no further tests are run at this level or below. These count toward passing and failing tests based on their exit (`return`) code.\r\n 2. Run any functions in the setup script(s) that match the pattern `test_x()`. If any tests fail, the suite fails and no further tests are run at this level or below. These count toward passing and failing tests based on their exit (`return`) code.\r\n 3. Source all the files in the directory that match `*.test.sh`. This evaluates each script and these count toward passing and failing tests based on the exit code.\r\n 4. Run any functions in the test script(s) that match the pattern `test_x()`. These count toward passing and failing tests based on their exit (`return`) code.\r\n 5. After running the tests from step 4:\r\n  5.1 If there are no subdirectories, source all the files in the directory that match `*teardown.sh`. This evaluates each script and these count toward passing and failing tests based on the exit code. Run any functions in the teardown script(s) that match the pattern `test_x()`. These count toward passing and failing tests based on their exit (`return`) code.\r\n  5.1 If there are subdirectories, run steps 1-4 on each subdirectory before step 5.1\r\n","created_at":"2017-05-16T22:08:30Z","updated_at":"2017-05-16T22:08:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/appcelerator/amp/pulls/1197/commits","review_comments_url":"https://api.github.com/repos/appcelerator/amp/pulls/1197/comments","review_comment_url":"https://api.github.com/repos/appcelerator/amp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appcelerator/amp/issues/1197/comments","statuses_url":"https://api.github.com/repos/appcelerator/amp/statuses/b041e8f8092570602f38070f288bb910910549eb","head":{"label":"appcelerator:test-enhancements","ref":"test-enhancements","sha":"b041e8f8092570602f38070f288bb910910549eb","user":{"login":"appcelerator","id":82188,"avatar_url":"https://avatars0.githubusercontent.com/u/82188?v=3","gravatar_id":"","url":"https://api.github.com/users/appcelerator","html_url":"https://github.com/appcelerator","followers_url":"https://api.github.com/users/appcelerator/followers","following_url":"https://api.github.com/users/appcelerator/following{/other_user}","gists_url":"https://api.github.com/users/appcelerator/gists{/gist_id}","starred_url":"https://api.github.com/users/appcelerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appcelerator/subscriptions","organizations_url":"https://api.github.com/users/appcelerator/orgs","repos_url":"https://api.github.com/users/appcelerator/repos","events_url":"https://api.github.com/users/appcelerator/events{/privacy}","received_events_url":"https://api.github.com/users/appcelerator/received_events","type":"Organization","site_admin":false},"repo":{"id":61302197,"name":"amp","full_name":"appcelerator/amp","owner":{"login":"appcelerator","id":82188,"avatar_url":"https://avatars0.githubusercontent.com/u/82188?v=3","gravatar_id":"","url":"https://api.github.com/users/appcelerator","html_url":"https://github.com/appcelerator","followers_url":"https://api.github.com/users/appcelerator/followers","following_url":"https://api.github.com/users/appcelerator/following{/other_user}","gists_url":"https://api.github.com/users/appcelerator/gists{/gist_id}","starred_url":"https://api.github.com/users/appcelerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appcelerator/subscriptions","organizations_url":"https://api.github.com/users/appcelerator/orgs","repos_url":"https://api.github.com/users/appcelerator/repos","events_url":"https://api.github.com/users/appcelerator/events{/privacy}","received_events_url":"https://api.github.com/users/appcelerator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appcelerator/amp","description":"An open source CaaS for Docker, batteries included.","fork":false,"url":"https://api.github.com/repos/appcelerator/amp","forks_url":"https://api.github.com/repos/appcelerator/amp/forks","keys_url":"https://api.github.com/repos/appcelerator/amp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appcelerator/amp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appcelerator/amp/teams","hooks_url":"https://api.github.com/repos/appcelerator/amp/hooks","issue_events_url":"https://api.github.com/repos/appcelerator/amp/issues/events{/number}","events_url":"https://api.github.com/repos/appcelerator/amp/events","assignees_url":"https://api.github.com/repos/appcelerator/amp/assignees{/user}","branches_url":"https://api.github.com/repos/appcelerator/amp/branches{/branch}","tags_url":"https://api.github.com/repos/appcelerator/amp/tags","blobs_url":"https://api.github.com/repos/appcelerator/amp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appcelerator/amp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appcelerator/amp/git/refs{/sha}","trees_url":"https://api.github.com/repos/appcelerator/amp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appcelerator/amp/statuses/{sha}","languages_url":"https://api.github.com/repos/appcelerator/amp/languages","stargazers_url":"https://api.github.com/repos/appcelerator/amp/stargazers","contributors_url":"https://api.github.com/repos/appcelerator/amp/contributors","subscribers_url":"https://api.github.com/repos/appcelerator/amp/subscribers","subscription_url":"https://api.github.com/repos/appcelerator/amp/subscription","commits_url":"https://api.github.com/repos/appcelerator/amp/commits{/sha}","git_commits_url":"https://api.github.com/repos/appcelerator/amp/git/commits{/sha}","comments_url":"https://api.github.com/repos/appcelerator/amp/comments{/number}","issue_comment_url":"https://api.github.com/repos/appcelerator/amp/issues/comments{/number}","contents_url":"https://api.github.com/repos/appcelerator/amp/contents/{+path}","compare_url":"https://api.github.com/repos/appcelerator/amp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appcelerator/amp/merges","archive_url":"https://api.github.com/repos/appcelerator/amp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appcelerator/amp/downloads","issues_url":"https://api.github.com/repos/appcelerator/amp/issues{/number}","pulls_url":"https://api.github.com/repos/appcelerator/amp/pulls{/number}","milestones_url":"https://api.github.com/repos/appcelerator/amp/milestones{/number}","notifications_url":"https://api.github.com/repos/appcelerator/amp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appcelerator/amp/labels{/name}","releases_url":"https://api.github.com/repos/appcelerator/amp/releases{/id}","deployments_url":"https://api.github.com/repos/appcelerator/amp/deployments","created_at":"2016-06-16T14:49:30Z","updated_at":"2017-05-10T21:30:02Z","pushed_at":"2017-05-16T21:32:43Z","git_url":"git://github.com/appcelerator/amp.git","ssh_url":"git@github.com:appcelerator/amp.git","clone_url":"https://github.com/appcelerator/amp.git","svn_url":"https://github.com/appcelerator/amp","homepage":"","size":186078,"stargazers_count":53,"watchers_count":53,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":88,"forks":16,"open_issues":88,"watchers":53,"default_branch":"master"}},"base":{"label":"appcelerator:master","ref":"master","sha":"f723c92fc35311e440d86c18663af58f76f7ee8a","user":{"login":"appcelerator","id":82188,"avatar_url":"https://avatars0.githubusercontent.com/u/82188?v=3","gravatar_id":"","url":"https://api.github.com/users/appcelerator","html_url":"https://github.com/appcelerator","followers_url":"https://api.github.com/users/appcelerator/followers","following_url":"https://api.github.com/users/appcelerator/following{/other_user}","gists_url":"https://api.github.com/users/appcelerator/gists{/gist_id}","starred_url":"https://api.github.com/users/appcelerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appcelerator/subscriptions","organizations_url":"https://api.github.com/users/appcelerator/orgs","repos_url":"https://api.github.com/users/appcelerator/repos","events_url":"https://api.github.com/users/appcelerator/events{/privacy}","received_events_url":"https://api.github.com/users/appcelerator/received_events","type":"Organization","site_admin":false},"repo":{"id":61302197,"name":"amp","full_name":"appcelerator/amp","owner":{"login":"appcelerator","id":82188,"avatar_url":"https://avatars0.githubusercontent.com/u/82188?v=3","gravatar_id":"","url":"https://api.github.com/users/appcelerator","html_url":"https://github.com/appcelerator","followers_url":"https://api.github.com/users/appcelerator/followers","following_url":"https://api.github.com/users/appcelerator/following{/other_user}","gists_url":"https://api.github.com/users/appcelerator/gists{/gist_id}","starred_url":"https://api.github.com/users/appcelerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appcelerator/subscriptions","organizations_url":"https://api.github.com/users/appcelerator/orgs","repos_url":"https://api.github.com/users/appcelerator/repos","events_url":"https://api.github.com/users/appcelerator/events{/privacy}","received_events_url":"https://api.github.com/users/appcelerator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appcelerator/amp","description":"An open source CaaS for Docker, batteries included.","fork":false,"url":"https://api.github.com/repos/appcelerator/amp","forks_url":"https://api.github.com/repos/appcelerator/amp/forks","keys_url":"https://api.github.com/repos/appcelerator/amp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appcelerator/amp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appcelerator/amp/teams","hooks_url":"https://api.github.com/repos/appcelerator/amp/hooks","issue_events_url":"https://api.github.com/repos/appcelerator/amp/issues/events{/number}","events_url":"https://api.github.com/repos/appcelerator/amp/events","assignees_url":"https://api.github.com/repos/appcelerator/amp/assignees{/user}","branches_url":"https://api.github.com/repos/appcelerator/amp/branches{/branch}","tags_url":"https://api.github.com/repos/appcelerator/amp/tags","blobs_url":"https://api.github.com/repos/appcelerator/amp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appcelerator/amp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appcelerator/amp/git/refs{/sha}","trees_url":"https://api.github.com/repos/appcelerator/amp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appcelerator/amp/statuses/{sha}","languages_url":"https://api.github.com/repos/appcelerator/amp/languages","stargazers_url":"https://api.github.com/repos/appcelerator/amp/stargazers","contributors_url":"https://api.github.com/repos/appcelerator/amp/contributors","subscribers_url":"https://api.github.com/repos/appcelerator/amp/subscribers","subscription_url":"https://api.github.com/repos/appcelerator/amp/subscription","commits_url":"https://api.github.com/repos/appcelerator/amp/commits{/sha}","git_commits_url":"https://api.github.com/repos/appcelerator/amp/git/commits{/sha}","comments_url":"https://api.github.com/repos/appcelerator/amp/comments{/number}","issue_comment_url":"https://api.github.com/repos/appcelerator/amp/issues/comments{/number}","contents_url":"https://api.github.com/repos/appcelerator/amp/contents/{+path}","compare_url":"https://api.github.com/repos/appcelerator/amp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appcelerator/amp/merges","archive_url":"https://api.github.com/repos/appcelerator/amp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appcelerator/amp/downloads","issues_url":"https://api.github.com/repos/appcelerator/amp/issues{/number}","pulls_url":"https://api.github.com/repos/appcelerator/amp/pulls{/number}","milestones_url":"https://api.github.com/repos/appcelerator/amp/milestones{/number}","notifications_url":"https://api.github.com/repos/appcelerator/amp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appcelerator/amp/labels{/name}","releases_url":"https://api.github.com/repos/appcelerator/amp/releases{/id}","deployments_url":"https://api.github.com/repos/appcelerator/amp/deployments","created_at":"2016-06-16T14:49:30Z","updated_at":"2017-05-10T21:30:02Z","pushed_at":"2017-05-16T21:32:43Z","git_url":"git://github.com/appcelerator/amp.git","ssh_url":"git@github.com:appcelerator/amp.git","clone_url":"https://github.com/appcelerator/amp.git","svn_url":"https://github.com/appcelerator/amp","homepage":"","size":186078,"stargazers_count":53,"watchers_count":53,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":88,"forks":16,"open_issues":88,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appcelerator/amp/pulls/1197"},"html":{"href":"https://github.com/appcelerator/amp/pull/1197"},"issue":{"href":"https://api.github.com/repos/appcelerator/amp/issues/1197"},"comments":{"href":"https://api.github.com/repos/appcelerator/amp/issues/1197/comments"},"review_comments":{"href":"https://api.github.com/repos/appcelerator/amp/pulls/1197/comments"},"review_comment":{"href":"https://api.github.com/repos/appcelerator/amp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appcelerator/amp/pulls/1197/commits"},"statuses":{"href":"https://api.github.com/repos/appcelerator/amp/statuses/b041e8f8092570602f38070f288bb910910549eb"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":592,"deletions":31,"changed_files":11}}
{"actor":{"display_login":"subfuzion"}}