{"action":"created","comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/204678273","pull_request_review_id":139797632,"id":204678273,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDY3ODI3Mw==","diff_hunk":"@@ -5,5 +5,33 @@ USEMODULE += embunit\n \n include $(RIOTBASE)/Makefile.include\n \n+# Compile time tests\n+.PHONY: compile-test test-newlib-nano\n+all: compile-test\n+\n+ifneq (,$(filter newlib,$(USEMODULE)))\n+  COMPILE_TESTS += test-newlib\n+  ifneq (,$(filter newlib_nano,$(USEMODULE)))\n+    CMP_OP = =\n+  else\n+    CMP_OP = !=\n+  endif\n+endif\n+\n+test-newlib: $(ELFFILE)","path":"tests/libc_newlib/Makefile","position":21,"original_position":17,"commit_id":"207e634707fe3be1b88098cf7fb3b090bac079da","original_commit_id":"207e634707fe3be1b88098cf7fb3b090bac079da","user":{"login":"jcarrano","id":3057851,"node_id":"MDQ6VXNlcjMwNTc4NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/3057851?v=4","gravatar_id":"","url":"https://api.github.com/users/jcarrano","html_url":"https://github.com/jcarrano","followers_url":"https://api.github.com/users/jcarrano/followers","following_url":"https://api.github.com/users/jcarrano/following{/other_user}","gists_url":"https://api.github.com/users/jcarrano/gists{/gist_id}","starred_url":"https://api.github.com/users/jcarrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcarrano/subscriptions","organizations_url":"https://api.github.com/users/jcarrano/orgs","repos_url":"https://api.github.com/users/jcarrano/repos","events_url":"https://api.github.com/users/jcarrano/events{/privacy}","received_events_url":"https://api.github.com/users/jcarrano/received_events","type":"User","site_admin":false},"body":"A dumber approach without sed (checks the number of different addresses)\r\n```make\r\n# make N_PRINTFS = 2 if non-nano, 1 if nano\r\n\r\ntest-newlib: $(ELFFILE)\r\n   PRINTFS=$$($(NM) -v $^ | grep '\\( i\\?printf\\)'); \\\r\n   PRINTF_ADDRS=$$(echo \"$${PRINTFS}\" | cut -d' ' -f 1 | uniq | wc -l); \\\r\n   # ensure both symbols are there\r\n   if test $$(echo \"$${PRINTFS}\" | wc -l) = 2 ; then \\\r\n       echo \"[FAILED] Expected printf and iprintf to be present, found $${PRINTFS}\" ; \\\r\n       exit 1; \\\r\n   elif test $${PRINTF_ADDRS} != $(N_PRINTFS) ; then \\ \r\n       echo \"[FAILED] Expected $(N_PRINTFS) different printfs\"; \\\r\n       exit 1; \\\r\n   fi\r\n```\r\n\r\nBTW, could we define a standard set of shell functions to be included in all makefiles. I would like to have a 'die' function:\r\n```sh\r\ndie() {\r\n    echo \"${1}\" >&2\r\n    exit 1\r\n}\r\n# one-line \"do stuff and exit with error if it fails\"\r\ntest -e fileXX.txt || die \"file not found\"\r\n```\r\n","created_at":"2018-07-24T09:06:22Z","updated_at":"2018-07-24T09:06:23Z","html_url":"https://github.com/RIOT-OS/RIOT/pull/9599#discussion_r204678273","pull_request_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/9599","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/204678273"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/9599#discussion_r204678273"},"pull_request":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/9599"}}},"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/9599","id":202275651,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMjc1NjUx","html_url":"https://github.com/RIOT-OS/RIOT/pull/9599","diff_url":"https://github.com/RIOT-OS/RIOT/pull/9599.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/9599.patch","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9599","number":9599,"state":"open","locked":false,"title":"tests/libc_newlib: add test for newlib-nano inclusion","user":{"login":"cladmi","id":241401,"node_id":"MDQ6VXNlcjI0MTQwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/241401?v=4","gravatar_id":"","url":"https://api.github.com/users/cladmi","html_url":"https://github.com/cladmi","followers_url":"https://api.github.com/users/cladmi/followers","following_url":"https://api.github.com/users/cladmi/following{/other_user}","gists_url":"https://api.github.com/users/cladmi/gists{/gist_id}","starred_url":"https://api.github.com/users/cladmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cladmi/subscriptions","organizations_url":"https://api.github.com/users/cladmi/orgs","repos_url":"https://api.github.com/users/cladmi/repos","events_url":"https://api.github.com/users/cladmi/events{/privacy}","received_events_url":"https://api.github.com/users/cladmi/received_events","type":"User","site_admin":false},"body":"### Contribution description\r\n\r\nThis test verifies that when used, newlib-nano is correctly included, both\r\nheader and also linked.\r\n\r\nThis is a standalone test and is less invasive than doing a global test like what I tried in https://github.com/RIOT-OS/RIOT/pull/9512\r\n\r\nI want to use it to debug non handled developers computers.\r\n\r\n### Testing\r\n\r\nI tested the following setups:\r\n\r\n* native (no newlib)\r\n* pic32-wifire (newlib) using the flasher PR\r\n* samr21-xpro (newlib-nano)\r\n \r\n\r\n### Issues/PRs references\r\n\r\nhttps://github.com/RIOT-OS/RIOT/pull/9512\r\n\r\n~This should not be merged before https://github.com/RIOT-OS/RIOT/pull/9398 as currently llvm is not handled properly but it should not block adding tests in murdock.~\r\nI now think it should be included before #9398, I thought it would be all fixed faster.\r\nI already have a fix for the llvm/clang issue https://github.com/RIOT-OS/RIOT/pull/9513 ","created_at":"2018-07-18T14:37:43Z","updated_at":"2018-07-24T09:06:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"081273dc6f5946577a760c82bf239d631e315589","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":214816571,"node_id":"MDU6TGFiZWwyMTQ4MTY1NzE=","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Ready%20for%20CI%20build","name":"Ready for CI build","color":"bfdadc","default":false},{"id":127387257,"node_id":"MDU6TGFiZWwxMjczODcyNTc=","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Waiting%20For%20Other%20PR","name":"Waiting For Other PR","color":"009800","default":false},{"id":89588546,"node_id":"MDU6TGFiZWw4OTU4ODU0Ng==","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/tests","name":"tests","color":"00fb75","default":false},{"id":998736346,"node_id":"MDU6TGFiZWw5OTg3MzYzNDY=","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/toolchain","name":"toolchain","color":"f4c6b7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/9599/commits","review_comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/9599/comments","review_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9599/comments","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/207e634707fe3be1b88098cf7fb3b090bac079da","head":{"label":"cladmi:pr/make/newlib/add_test_for_newlibnano","ref":"pr/make/newlib/add_test_for_newlibnano","sha":"207e634707fe3be1b88098cf7fb3b090bac079da","user":{"login":"cladmi","id":241401,"node_id":"MDQ6VXNlcjI0MTQwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/241401?v=4","gravatar_id":"","url":"https://api.github.com/users/cladmi","html_url":"https://github.com/cladmi","followers_url":"https://api.github.com/users/cladmi/followers","following_url":"https://api.github.com/users/cladmi/following{/other_user}","gists_url":"https://api.github.com/users/cladmi/gists{/gist_id}","starred_url":"https://api.github.com/users/cladmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cladmi/subscriptions","organizations_url":"https://api.github.com/users/cladmi/orgs","repos_url":"https://api.github.com/users/cladmi/repos","events_url":"https://api.github.com/users/cladmi/events{/privacy}","received_events_url":"https://api.github.com/users/cladmi/received_events","type":"User","site_admin":false},"repo":{"id":29687838,"node_id":"MDEwOlJlcG9zaXRvcnkyOTY4NzgzOA==","name":"RIOT","full_name":"cladmi/RIOT","owner":{"login":"cladmi","id":241401,"node_id":"MDQ6VXNlcjI0MTQwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/241401?v=4","gravatar_id":"","url":"https://api.github.com/users/cladmi","html_url":"https://github.com/cladmi","followers_url":"https://api.github.com/users/cladmi/followers","following_url":"https://api.github.com/users/cladmi/following{/other_user}","gists_url":"https://api.github.com/users/cladmi/gists{/gist_id}","starred_url":"https://api.github.com/users/cladmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cladmi/subscriptions","organizations_url":"https://api.github.com/users/cladmi/orgs","repos_url":"https://api.github.com/users/cladmi/repos","events_url":"https://api.github.com/users/cladmi/events{/privacy}","received_events_url":"https://api.github.com/users/cladmi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cladmi/RIOT","description":"RIOT -  The friendly OS for IoT","fork":true,"url":"https://api.github.com/repos/cladmi/RIOT","forks_url":"https://api.github.com/repos/cladmi/RIOT/forks","keys_url":"https://api.github.com/repos/cladmi/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cladmi/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cladmi/RIOT/teams","hooks_url":"https://api.github.com/repos/cladmi/RIOT/hooks","issue_events_url":"https://api.github.com/repos/cladmi/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/cladmi/RIOT/events","assignees_url":"https://api.github.com/repos/cladmi/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/cladmi/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/cladmi/RIOT/tags","blobs_url":"https://api.github.com/repos/cladmi/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cladmi/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cladmi/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/cladmi/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cladmi/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/cladmi/RIOT/languages","stargazers_url":"https://api.github.com/repos/cladmi/RIOT/stargazers","contributors_url":"https://api.github.com/repos/cladmi/RIOT/contributors","subscribers_url":"https://api.github.com/repos/cladmi/RIOT/subscribers","subscription_url":"https://api.github.com/repos/cladmi/RIOT/subscription","commits_url":"https://api.github.com/repos/cladmi/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/cladmi/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/cladmi/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/cladmi/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/cladmi/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/cladmi/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cladmi/RIOT/merges","archive_url":"https://api.github.com/repos/cladmi/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cladmi/RIOT/downloads","issues_url":"https://api.github.com/repos/cladmi/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/cladmi/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/cladmi/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/cladmi/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cladmi/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/cladmi/RIOT/releases{/id}","deployments_url":"https://api.github.com/repos/cladmi/RIOT/deployments","created_at":"2015-01-22T16:23:34Z","updated_at":"2018-06-14T16:31:30Z","pushed_at":"2018-07-23T15:31:40Z","git_url":"git://github.com/cladmi/RIOT.git","ssh_url":"git@github.com:cladmi/RIOT.git","clone_url":"https://github.com/cladmi/RIOT.git","svn_url":"https://github.com/cladmi/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":54646,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"RIOT-OS:master","ref":"master","sha":"e511f274fe85de5915e519fbe3fe89454b6d67e2","user":{"login":"RIOT-OS","id":3079480,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNzk0ODA=","avatar_url":"https://avatars2.githubusercontent.com/u/3079480?v=4","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"repo":{"id":7370241,"node_id":"MDEwOlJlcG9zaXRvcnk3MzcwMjQx","name":"RIOT","full_name":"RIOT-OS/RIOT","owner":{"login":"RIOT-OS","id":3079480,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNzk0ODA=","avatar_url":"https://avatars2.githubusercontent.com/u/3079480?v=4","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RIOT-OS/RIOT","description":"RIOT -  The friendly OS for IoT","fork":false,"url":"https://api.github.com/repos/RIOT-OS/RIOT","forks_url":"https://api.github.com/repos/RIOT-OS/RIOT/forks","keys_url":"https://api.github.com/repos/RIOT-OS/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RIOT-OS/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RIOT-OS/RIOT/teams","hooks_url":"https://api.github.com/repos/RIOT-OS/RIOT/hooks","issue_events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/events","assignees_url":"https://api.github.com/repos/RIOT-OS/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/RIOT-OS/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/tags","blobs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/RIOT-OS/RIOT/languages","stargazers_url":"https://api.github.com/repos/RIOT-OS/RIOT/stargazers","contributors_url":"https://api.github.com/repos/RIOT-OS/RIOT/contributors","subscribers_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscribers","subscription_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscription","commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/RIOT-OS/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/RIOT-OS/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RIOT-OS/RIOT/merges","archive_url":"https://api.github.com/repos/RIOT-OS/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RIOT-OS/RIOT/downloads","issues_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/RIOT-OS/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/RIOT-OS/RIOT/releases{/id}","deployments_url":"https://api.github.com/repos/RIOT-OS/RIOT/deployments","created_at":"2012-12-29T20:38:40Z","updated_at":"2018-07-24T08:00:39Z","pushed_at":"2018-07-24T07:59:48Z","git_url":"git://github.com/RIOT-OS/RIOT.git","ssh_url":"git@github.com:RIOT-OS/RIOT.git","clone_url":"https://github.com/RIOT-OS/RIOT.git","svn_url":"https://github.com/RIOT-OS/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":55304,"stargazers_count":1872,"watchers_count":1872,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1095,"mirror_url":null,"archived":false,"open_issues_count":764,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":1095,"open_issues":764,"watchers":1872,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/9599"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/9599"},"issue":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9599"},"comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9599/comments"},"review_comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/9599/comments"},"review_comment":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/9599/commits"},"statuses":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/207e634707fe3be1b88098cf7fb3b090bac079da"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jcarrano"}}