{"action":"closed","number":147,"pull_request":{"url":"https://api.github.com/repos/lenmus/lomse/pulls/147","id":182574022,"html_url":"https://github.com/lenmus/lomse/pull/147","diff_url":"https://github.com/lenmus/lomse/pull/147.diff","patch_url":"https://github.com/lenmus/lomse/pull/147.patch","issue_url":"https://api.github.com/repos/lenmus/lomse/issues/147","number":147,"state":"closed","locked":false,"title":"Extended parametrisation of test runner","user":{"login":"hugbug","id":3368402,"avatar_url":"https://avatars1.githubusercontent.com/u/3368402?v=4","gravatar_id":"","url":"https://api.github.com/users/hugbug","html_url":"https://github.com/hugbug","followers_url":"https://api.github.com/users/hugbug/followers","following_url":"https://api.github.com/users/hugbug/following{/other_user}","gists_url":"https://api.github.com/users/hugbug/gists{/gist_id}","starred_url":"https://api.github.com/users/hugbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugbug/subscriptions","organizations_url":"https://api.github.com/users/hugbug/orgs","repos_url":"https://api.github.com/users/hugbug/repos","events_url":"https://api.github.com/users/hugbug/events{/privacy}","received_events_url":"https://api.github.com/users/hugbug/received_events","type":"User","site_admin":false},"body":"On my Windows machine CMake fails to generate proper project file (it prints something about not being able to find boost libraries although I pass all necessary paths). Still I was able to manually add all tests to Visual Studio project file. Now I can run the tests.\r\n\r\nSimilar to my Mac machine some tests fail. If a test fails due to memory access error the Windows program can't deal with that and terminates completely (on Mac the program manages to survive, prints a message about unhandled exception and goes on to next test).\r\n\r\n## Verbose mode\r\nUnfortunately when the program terminates it doesn't print the name of the test it was running. Hence the first change to test runner: when running `testlib -v` the test runner prints names of tests before executing them. If a test fails the last printed line is the name of the test. Example usage (here a screenshot from Mac, therefore no termination):\r\n```\r\n$ bin/testlib -v DocCommandTest\r\nLomse version 0.23.0+fd694b9-dirty. Library tests runner.\r\n\r\nLomse build date: 18-Apr-2018 19:11:17\r\nPath for tests scores: '/User/lomse/test-scores/'\r\n\r\nRunning some tests \r\n\r\nlomse_test_command.cpp / DocCommandTest / add_noterest_0101\r\n    Failure at line 183: (*cursor)->is_note() == true\r\n    Failure at line 184: (*cursor)->to_string() == \"(n a4 e v1 p1)\"\r\nlomse_test_command.cpp / DocCommandTest / add_noterest_0101_ur\r\n    Failure at line 187: Unhandled exception: test crashed\r\nlomse_test_command.cpp / DocCommandTest / add_noterest_0201\r\n    Failure at line 262: (*cursor)->is_note() == true\r\n    Failure at line 263: (*cursor)->to_string() == \"(n f4 e v1 p1)\"\r\n...\r\nlomse_test_command.cpp / DocCommandTest / add_chord_note_2702\r\nlomse_test_command.cpp / DocCommandTest / add_chord_note_2703\r\nlomse_test_command.cpp / DocCommandTest / add_chord_note_2704\r\n\r\nFailure: 7 out of 92 tests failed (9 failures).\r\nTest time: 0.32 seconds.\r\n```\r\n\r\n**Note:** command line parser is very primitive, parameter `-v` must be the first one.\r\n\r\n## Exclude tests\r\nI wanted to know how many tests fail but with over 1000 tests it wasn't possible to run each one manually. I needed a way to tell the test runner to skip certain tests. It is now possible by passing test name (or suite name) with prefix `-`:\r\n```\r\n$ bin/testlib -v DocCommandTest -add_noterest_0101 -add_noterest_0101_ur\r\n```\r\nIn this example we execute test suite DocCommandTest but tests add_noterest_0101 and add_noterest_0101_ur should be skipped.\r\n\r\n## Syntax changes\r\nIn addition to passing test name and suite name as parameter it is now also possible to pass test file name. All names are accepted without extra parameter prefixes (do not add `suite` before suite name) and can be used multiple times.\r\n#### Example: run two test suites\r\n```\r\n$ bin/testlib -v MxlAnalyserTest MxlCompilerTest\r\n```\r\n#### Example: run three tests by names\r\n```\r\n$ bin/testlib -v tuplet_01 tuplet_02 tuplet_03\r\n```\r\n#### Example: run tests from file lomse_test_model_builder.cpp\r\n```\r\n$ bin/testlib -v lomse_test_model_builder.cpp\r\nLomse version 0.23.0+fd694b9-dirty. Library tests runner.\r\n\r\nLomse build date: 18-Apr-2018 19:11:17\r\nPath for tests scores: '/User/lomse/test-scores/'\r\n\r\nRunning some tests \r\n\r\nlomse_test_model_builder.cpp / ModelBuilderTest / ModelBuilderScore\r\nlomse_test_model_builder.cpp / PitchAssignerTest / AssignPitch_FPitch\r\nlomse_test_model_builder.cpp / PitchAssignerTest / AssignPitch_MidiPitch\r\nlomse_test_model_builder.cpp / PitchAssignerTest / CompilerAssignsPitch\r\nlomse_test_model_builder.cpp / PitchAssignerTest / CloseScoreAssignsPitch_FPitch\r\nlomse_test_model_builder.cpp / PitchAssignerTest / NoPitchWhenPattern\r\nlomse_test_model_builder.cpp / MidiAssignerTest / midi_assigner_01\r\nlomse_test_model_builder.cpp / MidiAssignerTest / midi_assigner_02\r\nlomse_test_model_builder.cpp / MidiAssignerTest / midi_assigner_03\r\nlomse_test_model_builder.cpp / MidiAssignerTest / midi_assigner_04\r\nlomse_test_model_builder.cpp / MidiAssignerTest / midi_assigner_05\r\nlomse_test_model_builder.cpp / MidiAssignerTest / midi_assigner_06\r\n\r\nSuccess: 12 tests passed.\r\nTest time: 0.04 seconds.\r\n```\r\n\r\n## Bonus\r\nThe test runner doesn't need to access field `Test::m_nextTest` (`Test::next` in older UnitTest++ versions) anymore. That made #137 obsolete. CMake config was updated accordingly.\r\n\r\n## Extra\r\nRemoved call to `cin.get()` in Windows version. It prevented the usage of the tests from scripts. Windows users should open command prompt window and execute tests there instead of double clicking on testlib.exe in Windows Explorer. That's what user on other OSes do too.","created_at":"2018-04-18T19:05:30Z","updated_at":"2018-04-19T13:47:30Z","closed_at":"2018-04-19T13:47:30Z","merged_at":"2018-04-19T13:47:30Z","merge_commit_sha":"ad3aae48e9f2977e4da6f85738717b571f9d8382","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lenmus/lomse/pulls/147/commits","review_comments_url":"https://api.github.com/repos/lenmus/lomse/pulls/147/comments","review_comment_url":"https://api.github.com/repos/lenmus/lomse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lenmus/lomse/issues/147/comments","statuses_url":"https://api.github.com/repos/lenmus/lomse/statuses/965d3ea3d1711856652b05a3c5bf98d1e647a044","head":{"label":"hugbug:testrunner","ref":"testrunner","sha":"965d3ea3d1711856652b05a3c5bf98d1e647a044","user":{"login":"hugbug","id":3368402,"avatar_url":"https://avatars1.githubusercontent.com/u/3368402?v=4","gravatar_id":"","url":"https://api.github.com/users/hugbug","html_url":"https://github.com/hugbug","followers_url":"https://api.github.com/users/hugbug/followers","following_url":"https://api.github.com/users/hugbug/following{/other_user}","gists_url":"https://api.github.com/users/hugbug/gists{/gist_id}","starred_url":"https://api.github.com/users/hugbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugbug/subscriptions","organizations_url":"https://api.github.com/users/hugbug/orgs","repos_url":"https://api.github.com/users/hugbug/repos","events_url":"https://api.github.com/users/hugbug/events{/privacy}","received_events_url":"https://api.github.com/users/hugbug/received_events","type":"User","site_admin":false},"repo":{"id":128723942,"name":"lomse","full_name":"hugbug/lomse","owner":{"login":"hugbug","id":3368402,"avatar_url":"https://avatars1.githubusercontent.com/u/3368402?v=4","gravatar_id":"","url":"https://api.github.com/users/hugbug","html_url":"https://github.com/hugbug","followers_url":"https://api.github.com/users/hugbug/followers","following_url":"https://api.github.com/users/hugbug/following{/other_user}","gists_url":"https://api.github.com/users/hugbug/gists{/gist_id}","starred_url":"https://api.github.com/users/hugbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugbug/subscriptions","organizations_url":"https://api.github.com/users/hugbug/orgs","repos_url":"https://api.github.com/users/hugbug/repos","events_url":"https://api.github.com/users/hugbug/events{/privacy}","received_events_url":"https://api.github.com/users/hugbug/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hugbug/lomse","description":"Lomse is a free open source project to provide software developers with a C++ library for rendering, editing and playing back music scores. With it, you can add capabilities to any program for displaying and editing music scores. It is witten in C++ and it is platform independent.","fork":true,"url":"https://api.github.com/repos/hugbug/lomse","forks_url":"https://api.github.com/repos/hugbug/lomse/forks","keys_url":"https://api.github.com/repos/hugbug/lomse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hugbug/lomse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hugbug/lomse/teams","hooks_url":"https://api.github.com/repos/hugbug/lomse/hooks","issue_events_url":"https://api.github.com/repos/hugbug/lomse/issues/events{/number}","events_url":"https://api.github.com/repos/hugbug/lomse/events","assignees_url":"https://api.github.com/repos/hugbug/lomse/assignees{/user}","branches_url":"https://api.github.com/repos/hugbug/lomse/branches{/branch}","tags_url":"https://api.github.com/repos/hugbug/lomse/tags","blobs_url":"https://api.github.com/repos/hugbug/lomse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hugbug/lomse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hugbug/lomse/git/refs{/sha}","trees_url":"https://api.github.com/repos/hugbug/lomse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hugbug/lomse/statuses/{sha}","languages_url":"https://api.github.com/repos/hugbug/lomse/languages","stargazers_url":"https://api.github.com/repos/hugbug/lomse/stargazers","contributors_url":"https://api.github.com/repos/hugbug/lomse/contributors","subscribers_url":"https://api.github.com/repos/hugbug/lomse/subscribers","subscription_url":"https://api.github.com/repos/hugbug/lomse/subscription","commits_url":"https://api.github.com/repos/hugbug/lomse/commits{/sha}","git_commits_url":"https://api.github.com/repos/hugbug/lomse/git/commits{/sha}","comments_url":"https://api.github.com/repos/hugbug/lomse/comments{/number}","issue_comment_url":"https://api.github.com/repos/hugbug/lomse/issues/comments{/number}","contents_url":"https://api.github.com/repos/hugbug/lomse/contents/{+path}","compare_url":"https://api.github.com/repos/hugbug/lomse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hugbug/lomse/merges","archive_url":"https://api.github.com/repos/hugbug/lomse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hugbug/lomse/downloads","issues_url":"https://api.github.com/repos/hugbug/lomse/issues{/number}","pulls_url":"https://api.github.com/repos/hugbug/lomse/pulls{/number}","milestones_url":"https://api.github.com/repos/hugbug/lomse/milestones{/number}","notifications_url":"https://api.github.com/repos/hugbug/lomse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hugbug/lomse/labels{/name}","releases_url":"https://api.github.com/repos/hugbug/lomse/releases{/id}","deployments_url":"https://api.github.com/repos/hugbug/lomse/deployments","created_at":"2018-04-09T06:20:11Z","updated_at":"2018-04-19T13:21:43Z","pushed_at":"2018-04-19T13:21:42Z","git_url":"git://github.com/hugbug/lomse.git","ssh_url":"git@github.com:hugbug/lomse.git","clone_url":"https://github.com/hugbug/lomse.git","svn_url":"https://github.com/hugbug/lomse","homepage":"http://www.lenmus.org/en/lomse/intro","size":34205,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lenmus:master","ref":"master","sha":"fd694b90d972e8223980757ee531afae0e980def","user":{"login":"lenmus","id":16916926,"avatar_url":"https://avatars2.githubusercontent.com/u/16916926?v=4","gravatar_id":"","url":"https://api.github.com/users/lenmus","html_url":"https://github.com/lenmus","followers_url":"https://api.github.com/users/lenmus/followers","following_url":"https://api.github.com/users/lenmus/following{/other_user}","gists_url":"https://api.github.com/users/lenmus/gists{/gist_id}","starred_url":"https://api.github.com/users/lenmus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenmus/subscriptions","organizations_url":"https://api.github.com/users/lenmus/orgs","repos_url":"https://api.github.com/users/lenmus/repos","events_url":"https://api.github.com/users/lenmus/events{/privacy}","received_events_url":"https://api.github.com/users/lenmus/received_events","type":"Organization","site_admin":false},"repo":{"id":50770545,"name":"lomse","full_name":"lenmus/lomse","owner":{"login":"lenmus","id":16916926,"avatar_url":"https://avatars2.githubusercontent.com/u/16916926?v=4","gravatar_id":"","url":"https://api.github.com/users/lenmus","html_url":"https://github.com/lenmus","followers_url":"https://api.github.com/users/lenmus/followers","following_url":"https://api.github.com/users/lenmus/following{/other_user}","gists_url":"https://api.github.com/users/lenmus/gists{/gist_id}","starred_url":"https://api.github.com/users/lenmus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenmus/subscriptions","organizations_url":"https://api.github.com/users/lenmus/orgs","repos_url":"https://api.github.com/users/lenmus/repos","events_url":"https://api.github.com/users/lenmus/events{/privacy}","received_events_url":"https://api.github.com/users/lenmus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lenmus/lomse","description":"Lomse is a free open source project to provide software developers with a C++ library for rendering, editing and playing back music scores. With it, you can add capabilities to any program for displaying and editing music scores. It is witten in C++ and it is platform independent.","fork":false,"url":"https://api.github.com/repos/lenmus/lomse","forks_url":"https://api.github.com/repos/lenmus/lomse/forks","keys_url":"https://api.github.com/repos/lenmus/lomse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lenmus/lomse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lenmus/lomse/teams","hooks_url":"https://api.github.com/repos/lenmus/lomse/hooks","issue_events_url":"https://api.github.com/repos/lenmus/lomse/issues/events{/number}","events_url":"https://api.github.com/repos/lenmus/lomse/events","assignees_url":"https://api.github.com/repos/lenmus/lomse/assignees{/user}","branches_url":"https://api.github.com/repos/lenmus/lomse/branches{/branch}","tags_url":"https://api.github.com/repos/lenmus/lomse/tags","blobs_url":"https://api.github.com/repos/lenmus/lomse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lenmus/lomse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lenmus/lomse/git/refs{/sha}","trees_url":"https://api.github.com/repos/lenmus/lomse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lenmus/lomse/statuses/{sha}","languages_url":"https://api.github.com/repos/lenmus/lomse/languages","stargazers_url":"https://api.github.com/repos/lenmus/lomse/stargazers","contributors_url":"https://api.github.com/repos/lenmus/lomse/contributors","subscribers_url":"https://api.github.com/repos/lenmus/lomse/subscribers","subscription_url":"https://api.github.com/repos/lenmus/lomse/subscription","commits_url":"https://api.github.com/repos/lenmus/lomse/commits{/sha}","git_commits_url":"https://api.github.com/repos/lenmus/lomse/git/commits{/sha}","comments_url":"https://api.github.com/repos/lenmus/lomse/comments{/number}","issue_comment_url":"https://api.github.com/repos/lenmus/lomse/issues/comments{/number}","contents_url":"https://api.github.com/repos/lenmus/lomse/contents/{+path}","compare_url":"https://api.github.com/repos/lenmus/lomse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lenmus/lomse/merges","archive_url":"https://api.github.com/repos/lenmus/lomse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lenmus/lomse/downloads","issues_url":"https://api.github.com/repos/lenmus/lomse/issues{/number}","pulls_url":"https://api.github.com/repos/lenmus/lomse/pulls{/number}","milestones_url":"https://api.github.com/repos/lenmus/lomse/milestones{/number}","notifications_url":"https://api.github.com/repos/lenmus/lomse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lenmus/lomse/labels{/name}","releases_url":"https://api.github.com/repos/lenmus/lomse/releases{/id}","deployments_url":"https://api.github.com/repos/lenmus/lomse/deployments","created_at":"2016-01-31T11:10:49Z","updated_at":"2018-04-19T12:27:17Z","pushed_at":"2018-04-19T13:47:30Z","git_url":"git://github.com/lenmus/lomse.git","ssh_url":"git@github.com:lenmus/lomse.git","clone_url":"https://github.com/lenmus/lomse.git","svn_url":"https://github.com/lenmus/lomse","homepage":"http://www.lenmus.org/en/lomse/intro","size":34395,"stargazers_count":25,"watchers_count":25,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":40,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":10,"open_issues":40,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lenmus/lomse/pulls/147"},"html":{"href":"https://github.com/lenmus/lomse/pull/147"},"issue":{"href":"https://api.github.com/repos/lenmus/lomse/issues/147"},"comments":{"href":"https://api.github.com/repos/lenmus/lomse/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/lenmus/lomse/pulls/147/comments"},"review_comment":{"href":"https://api.github.com/repos/lenmus/lomse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lenmus/lomse/pulls/147/commits"},"statuses":{"href":"https://api.github.com/repos/lenmus/lomse/statuses/965d3ea3d1711856652b05a3c5bf98d1e647a044"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"cecilios","id":5238679,"avatar_url":"https://avatars3.githubusercontent.com/u/5238679?v=4","gravatar_id":"","url":"https://api.github.com/users/cecilios","html_url":"https://github.com/cecilios","followers_url":"https://api.github.com/users/cecilios/followers","following_url":"https://api.github.com/users/cecilios/following{/other_user}","gists_url":"https://api.github.com/users/cecilios/gists{/gist_id}","starred_url":"https://api.github.com/users/cecilios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cecilios/subscriptions","organizations_url":"https://api.github.com/users/cecilios/orgs","repos_url":"https://api.github.com/users/cecilios/repos","events_url":"https://api.github.com/users/cecilios/events{/privacy}","received_events_url":"https://api.github.com/users/cecilios/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":96,"deletions":74,"changed_files":3}}
{"actor":{"display_login":"cecilios"}}