{"action":"opened","number":259,"pull_request":{"url":"https://api.github.com/repos/Snaipe/Criterion/pulls/259","id":196909502,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2OTA5NTAy","html_url":"https://github.com/Snaipe/Criterion/pull/259","diff_url":"https://github.com/Snaipe/Criterion/pull/259.diff","patch_url":"https://github.com/Snaipe/Criterion/pull/259.patch","issue_url":"https://api.github.com/repos/Snaipe/Criterion/issues/259","number":259,"state":"open","locked":false,"title":"Add directory support to test reports","user":{"login":"MrAnno","id":3130044,"node_id":"MDQ6VXNlcjMxMzAwNDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3130044?v=4","gravatar_id":"","url":"https://api.github.com/users/MrAnno","html_url":"https://github.com/MrAnno","followers_url":"https://api.github.com/users/MrAnno/followers","following_url":"https://api.github.com/users/MrAnno/following{/other_user}","gists_url":"https://api.github.com/users/MrAnno/gists{/gist_id}","starred_url":"https://api.github.com/users/MrAnno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrAnno/subscriptions","organizations_url":"https://api.github.com/users/MrAnno/orgs","repos_url":"https://api.github.com/users/MrAnno/repos","events_url":"https://api.github.com/users/MrAnno/events{/privacy}","received_events_url":"https://api.github.com/users/MrAnno/received_events","type":"User","site_admin":false},"body":"This PR adds directory support to test reports (`CRITERION_OUTPUTS`, `--output`).\r\n\r\nThe functionality is the same as in GTest (GTEST_OUTPUT):\r\n\r\n`--output=PROVIDER:PATH`: Write a test report to `PATH` using the output provider named by `PROVIDER`.\r\nIf `PATH` is an existing directory, the report will be created in that directory.\r\n\r\nThe report file will be named after the binary. For example: test_foo --> test_foo.xml\r\n\r\nIf the file already exists, Criterion will pick a different name (test_foo_1.xml, test_foo_2.xml) to avoid overwriting it.\r\n\r\n----------------------\r\n\r\nAdding a dynamically sized string class to Criterion was an enormous overkill, but it made the implementation of `cri_path_gen_unique_filename()` and `cri_path_combine()` much cleaner.\r\n\r\nI hope I haven't broken Criterion's KISS principle too much. :(\r\n\r\nQuestions:\r\n- Currently, the generated file extension is the name of the provider. Is that OK? Should I add a `default_extension`) parameter to `criterion_register_output_provider`?\r\n\r\nImprovement ideas:\r\n- The parameter list of `cri_path_build()` is NULL-terminated.\r\n  I'm thinking of creating a macro `#define cri_path_combine(...) cri_path_build(CRI_PATH_SEPARATOR, ##__VA_ARGS__, NULL)`, but this is not standard C99.\r\n  I've read your [blog post](https://snai.pe/c/preprocessor/varargs/) about varargs. I think `Length parameter + Macro` is what I need here.\r\n  Is there an existing implementation of this approach in Criterion that I can use?\r\n\r\nNotes:\r\n- A test (alloc.cc) is not compiled at all, but I couldn't enable it due to C++-only problems in the new assertion API (internal/assert/op.hxx)","created_at":"2018-06-23T16:19:32Z","updated_at":"2018-06-23T16:19:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Snaipe/Criterion/pulls/259/commits","review_comments_url":"https://api.github.com/repos/Snaipe/Criterion/pulls/259/comments","review_comment_url":"https://api.github.com/repos/Snaipe/Criterion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Snaipe/Criterion/issues/259/comments","statuses_url":"https://api.github.com/repos/Snaipe/Criterion/statuses/9edca9e659b5783a3caa11129897b55750b9c712","head":{"label":"MrAnno:features/output-directory","ref":"features/output-directory","sha":"9edca9e659b5783a3caa11129897b55750b9c712","user":{"login":"MrAnno","id":3130044,"node_id":"MDQ6VXNlcjMxMzAwNDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3130044?v=4","gravatar_id":"","url":"https://api.github.com/users/MrAnno","html_url":"https://github.com/MrAnno","followers_url":"https://api.github.com/users/MrAnno/followers","following_url":"https://api.github.com/users/MrAnno/following{/other_user}","gists_url":"https://api.github.com/users/MrAnno/gists{/gist_id}","starred_url":"https://api.github.com/users/MrAnno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrAnno/subscriptions","organizations_url":"https://api.github.com/users/MrAnno/orgs","repos_url":"https://api.github.com/users/MrAnno/repos","events_url":"https://api.github.com/users/MrAnno/events{/privacy}","received_events_url":"https://api.github.com/users/MrAnno/received_events","type":"User","site_admin":false},"repo":{"id":50572035,"node_id":"MDEwOlJlcG9zaXRvcnk1MDU3MjAzNQ==","name":"Criterion","full_name":"MrAnno/Criterion","owner":{"login":"MrAnno","id":3130044,"node_id":"MDQ6VXNlcjMxMzAwNDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3130044?v=4","gravatar_id":"","url":"https://api.github.com/users/MrAnno","html_url":"https://github.com/MrAnno","followers_url":"https://api.github.com/users/MrAnno/followers","following_url":"https://api.github.com/users/MrAnno/following{/other_user}","gists_url":"https://api.github.com/users/MrAnno/gists{/gist_id}","starred_url":"https://api.github.com/users/MrAnno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrAnno/subscriptions","organizations_url":"https://api.github.com/users/MrAnno/orgs","repos_url":"https://api.github.com/users/MrAnno/repos","events_url":"https://api.github.com/users/MrAnno/events{/privacy}","received_events_url":"https://api.github.com/users/MrAnno/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MrAnno/Criterion","description":"A KISS, non-intrusive cross-platform C unit testing framework","fork":true,"url":"https://api.github.com/repos/MrAnno/Criterion","forks_url":"https://api.github.com/repos/MrAnno/Criterion/forks","keys_url":"https://api.github.com/repos/MrAnno/Criterion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MrAnno/Criterion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MrAnno/Criterion/teams","hooks_url":"https://api.github.com/repos/MrAnno/Criterion/hooks","issue_events_url":"https://api.github.com/repos/MrAnno/Criterion/issues/events{/number}","events_url":"https://api.github.com/repos/MrAnno/Criterion/events","assignees_url":"https://api.github.com/repos/MrAnno/Criterion/assignees{/user}","branches_url":"https://api.github.com/repos/MrAnno/Criterion/branches{/branch}","tags_url":"https://api.github.com/repos/MrAnno/Criterion/tags","blobs_url":"https://api.github.com/repos/MrAnno/Criterion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MrAnno/Criterion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MrAnno/Criterion/git/refs{/sha}","trees_url":"https://api.github.com/repos/MrAnno/Criterion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MrAnno/Criterion/statuses/{sha}","languages_url":"https://api.github.com/repos/MrAnno/Criterion/languages","stargazers_url":"https://api.github.com/repos/MrAnno/Criterion/stargazers","contributors_url":"https://api.github.com/repos/MrAnno/Criterion/contributors","subscribers_url":"https://api.github.com/repos/MrAnno/Criterion/subscribers","subscription_url":"https://api.github.com/repos/MrAnno/Criterion/subscription","commits_url":"https://api.github.com/repos/MrAnno/Criterion/commits{/sha}","git_commits_url":"https://api.github.com/repos/MrAnno/Criterion/git/commits{/sha}","comments_url":"https://api.github.com/repos/MrAnno/Criterion/comments{/number}","issue_comment_url":"https://api.github.com/repos/MrAnno/Criterion/issues/comments{/number}","contents_url":"https://api.github.com/repos/MrAnno/Criterion/contents/{+path}","compare_url":"https://api.github.com/repos/MrAnno/Criterion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MrAnno/Criterion/merges","archive_url":"https://api.github.com/repos/MrAnno/Criterion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MrAnno/Criterion/downloads","issues_url":"https://api.github.com/repos/MrAnno/Criterion/issues{/number}","pulls_url":"https://api.github.com/repos/MrAnno/Criterion/pulls{/number}","milestones_url":"https://api.github.com/repos/MrAnno/Criterion/milestones{/number}","notifications_url":"https://api.github.com/repos/MrAnno/Criterion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MrAnno/Criterion/labels{/name}","releases_url":"https://api.github.com/repos/MrAnno/Criterion/releases{/id}","deployments_url":"https://api.github.com/repos/MrAnno/Criterion/deployments","created_at":"2016-01-28T09:31:47Z","updated_at":"2016-01-28T09:31:48Z","pushed_at":"2018-06-23T15:19:22Z","git_url":"git://github.com/MrAnno/Criterion.git","ssh_url":"git@github.com:MrAnno/Criterion.git","clone_url":"https://github.com/MrAnno/Criterion.git","svn_url":"https://github.com/MrAnno/Criterion","homepage":"","size":3577,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"bleeding"}},"base":{"label":"Snaipe:bleeding","ref":"bleeding","sha":"20e4ec619cfb2e653c0901f738d41e64d8acd89c","user":{"login":"Snaipe","id":977973,"node_id":"MDQ6VXNlcjk3Nzk3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/977973?v=4","gravatar_id":"","url":"https://api.github.com/users/Snaipe","html_url":"https://github.com/Snaipe","followers_url":"https://api.github.com/users/Snaipe/followers","following_url":"https://api.github.com/users/Snaipe/following{/other_user}","gists_url":"https://api.github.com/users/Snaipe/gists{/gist_id}","starred_url":"https://api.github.com/users/Snaipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snaipe/subscriptions","organizations_url":"https://api.github.com/users/Snaipe/orgs","repos_url":"https://api.github.com/users/Snaipe/repos","events_url":"https://api.github.com/users/Snaipe/events{/privacy}","received_events_url":"https://api.github.com/users/Snaipe/received_events","type":"User","site_admin":false},"repo":{"id":30111969,"node_id":"MDEwOlJlcG9zaXRvcnkzMDExMTk2OQ==","name":"Criterion","full_name":"Snaipe/Criterion","owner":{"login":"Snaipe","id":977973,"node_id":"MDQ6VXNlcjk3Nzk3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/977973?v=4","gravatar_id":"","url":"https://api.github.com/users/Snaipe","html_url":"https://github.com/Snaipe","followers_url":"https://api.github.com/users/Snaipe/followers","following_url":"https://api.github.com/users/Snaipe/following{/other_user}","gists_url":"https://api.github.com/users/Snaipe/gists{/gist_id}","starred_url":"https://api.github.com/users/Snaipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snaipe/subscriptions","organizations_url":"https://api.github.com/users/Snaipe/orgs","repos_url":"https://api.github.com/users/Snaipe/repos","events_url":"https://api.github.com/users/Snaipe/events{/privacy}","received_events_url":"https://api.github.com/users/Snaipe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Snaipe/Criterion","description":"A cross-platform C and C++ unit testing framework for the 21th century","fork":false,"url":"https://api.github.com/repos/Snaipe/Criterion","forks_url":"https://api.github.com/repos/Snaipe/Criterion/forks","keys_url":"https://api.github.com/repos/Snaipe/Criterion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Snaipe/Criterion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Snaipe/Criterion/teams","hooks_url":"https://api.github.com/repos/Snaipe/Criterion/hooks","issue_events_url":"https://api.github.com/repos/Snaipe/Criterion/issues/events{/number}","events_url":"https://api.github.com/repos/Snaipe/Criterion/events","assignees_url":"https://api.github.com/repos/Snaipe/Criterion/assignees{/user}","branches_url":"https://api.github.com/repos/Snaipe/Criterion/branches{/branch}","tags_url":"https://api.github.com/repos/Snaipe/Criterion/tags","blobs_url":"https://api.github.com/repos/Snaipe/Criterion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Snaipe/Criterion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Snaipe/Criterion/git/refs{/sha}","trees_url":"https://api.github.com/repos/Snaipe/Criterion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Snaipe/Criterion/statuses/{sha}","languages_url":"https://api.github.com/repos/Snaipe/Criterion/languages","stargazers_url":"https://api.github.com/repos/Snaipe/Criterion/stargazers","contributors_url":"https://api.github.com/repos/Snaipe/Criterion/contributors","subscribers_url":"https://api.github.com/repos/Snaipe/Criterion/subscribers","subscription_url":"https://api.github.com/repos/Snaipe/Criterion/subscription","commits_url":"https://api.github.com/repos/Snaipe/Criterion/commits{/sha}","git_commits_url":"https://api.github.com/repos/Snaipe/Criterion/git/commits{/sha}","comments_url":"https://api.github.com/repos/Snaipe/Criterion/comments{/number}","issue_comment_url":"https://api.github.com/repos/Snaipe/Criterion/issues/comments{/number}","contents_url":"https://api.github.com/repos/Snaipe/Criterion/contents/{+path}","compare_url":"https://api.github.com/repos/Snaipe/Criterion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Snaipe/Criterion/merges","archive_url":"https://api.github.com/repos/Snaipe/Criterion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Snaipe/Criterion/downloads","issues_url":"https://api.github.com/repos/Snaipe/Criterion/issues{/number}","pulls_url":"https://api.github.com/repos/Snaipe/Criterion/pulls{/number}","milestones_url":"https://api.github.com/repos/Snaipe/Criterion/milestones{/number}","notifications_url":"https://api.github.com/repos/Snaipe/Criterion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Snaipe/Criterion/labels{/name}","releases_url":"https://api.github.com/repos/Snaipe/Criterion/releases{/id}","deployments_url":"https://api.github.com/repos/Snaipe/Criterion/deployments","created_at":"2015-01-31T12:45:39Z","updated_at":"2018-06-20T06:26:56Z","pushed_at":"2018-06-06T13:52:33Z","git_url":"git://github.com/Snaipe/Criterion.git","ssh_url":"git@github.com:Snaipe/Criterion.git","clone_url":"https://github.com/Snaipe/Criterion.git","svn_url":"https://github.com/Snaipe/Criterion","homepage":"","size":3664,"stargazers_count":633,"watchers_count":633,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":86,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":86,"open_issues":39,"watchers":633,"default_branch":"bleeding"}},"_links":{"self":{"href":"https://api.github.com/repos/Snaipe/Criterion/pulls/259"},"html":{"href":"https://github.com/Snaipe/Criterion/pull/259"},"issue":{"href":"https://api.github.com/repos/Snaipe/Criterion/issues/259"},"comments":{"href":"https://api.github.com/repos/Snaipe/Criterion/issues/259/comments"},"review_comments":{"href":"https://api.github.com/repos/Snaipe/Criterion/pulls/259/comments"},"review_comment":{"href":"https://api.github.com/repos/Snaipe/Criterion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Snaipe/Criterion/pulls/259/commits"},"statuses":{"href":"https://api.github.com/repos/Snaipe/Criterion/statuses/9edca9e659b5783a3caa11129897b55750b9c712"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":12,"additions":636,"deletions":146,"changed_files":15}}
{"actor":{"display_login":"MrAnno"}}