{"action":"created","comment":{"url":"https://api.github.com/repos/kripken/emscripten/pulls/comments/39933685","id":39933685,"diff_hunk":"@@ -968,26 +974,36 @@ def show():\n \n   # Filter and load tests from the discovered modules\n   loader = unittest.TestLoader()\n-  names = sys.argv[1:]\n+  names = set(sys.argv[1:])\n   suites = []\n   for m in modules:\n-    try:\n-      suites.append(loader.loadTestsFromNames(names, m))\n-    except:\n-      pass\n+    mnames = []\n+    for name in list(names):\n+      try:\n+        operator.attrgetter(name)(m)\n+        mnames.append(name)\n+        names.remove(name)\n+      except AttributeError:\n+        pass\n+    if len(mnames) > 0:\n+      suites.append(loader.loadTestsFromNames(sorted(mnames), m))\n \n   numFailures = 0 # Keep count of the total number of failing tests.\n \n-  # Run the discovered tests\n   if not len(suites):\n-    print >> sys.stderr, 'No tests found for %s' % str(sys.argv[1:])\n+    print >> sys.stderr, 'No tests at all found!'\n     numFailures = 1\n-  else:\n-    testRunner = unittest.TextTestRunner(verbosity=2)\n-    for suite in suites:\n-      results = testRunner.run(suite)\n-      numFailures += len(results.errors) + len(results.failures)\n+  elif len(names) > 0:\n+    print 'WARNING: could not find the following tests: ' + ' '.join(names)\n+    numfailures = len(names)","path":"tests/runner.py","position":194,"original_position":194,"commit_id":"3d421f5aea3c1fa112a766b5182afdbad98719ed","original_commit_id":"3d421f5aea3c1fa112a766b5182afdbad98719ed","user":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"body":"capital `F`.","created_at":"2015-09-20T19:56:25Z","updated_at":"2015-09-20T19:56:25Z","html_url":"https://github.com/kripken/emscripten/pull/3795#discussion_r39933685","pull_request_url":"https://api.github.com/repos/kripken/emscripten/pulls/3795","_links":{"self":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/comments/39933685"},"html":{"href":"https://github.com/kripken/emscripten/pull/3795#discussion_r39933685"},"pull_request":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/3795"}}},"pull_request":{"url":"https://api.github.com/repos/kripken/emscripten/pulls/3795","id":45485498,"html_url":"https://github.com/kripken/emscripten/pull/3795","diff_url":"https://github.com/kripken/emscripten/pull/3795.diff","patch_url":"https://github.com/kripken/emscripten/pull/3795.patch","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/3795","number":3795,"state":"open","locked":false,"title":"Allow running tests from different suites","user":{"login":"aidanhs","id":1050652,"avatar_url":"https://avatars.githubusercontent.com/u/1050652?v=3","gravatar_id":"","url":"https://api.github.com/users/aidanhs","html_url":"https://github.com/aidanhs","followers_url":"https://api.github.com/users/aidanhs/followers","following_url":"https://api.github.com/users/aidanhs/following{/other_user}","gists_url":"https://api.github.com/users/aidanhs/gists{/gist_id}","starred_url":"https://api.github.com/users/aidanhs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aidanhs/subscriptions","organizations_url":"https://api.github.com/users/aidanhs/orgs","repos_url":"https://api.github.com/users/aidanhs/repos","events_url":"https://api.github.com/users/aidanhs/events{/privacy}","received_events_url":"https://api.github.com/users/aidanhs/received_events","type":"User","site_admin":false},"body":"This PR:\r\n - lets you do `python runner.py --help`\r\n - moves some potentially printing code into `if __name__ == '__main__'`\r\n - prints help text as soon as possible, so some warnings will come after it\r\n - lets you run tests from multiple suites on the same command line (e.g. `python runner.py 'other.test_sixtyfour_bit_return_value asm2.test_time`) and lists any missing tests - previously it just refused to run anything\r\n - ensures that if you have 256 test failures it won't come back as 0!","created_at":"2015-09-19T22:23:25Z","updated_at":"2015-09-20T19:56:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d25cfc9b233f9e98e22ecc7ea79119de4b6b65f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kripken/emscripten/pulls/3795/commits","review_comments_url":"https://api.github.com/repos/kripken/emscripten/pulls/3795/comments","review_comment_url":"https://api.github.com/repos/kripken/emscripten/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/3795/comments","statuses_url":"https://api.github.com/repos/kripken/emscripten/statuses/3d421f5aea3c1fa112a766b5182afdbad98719ed","head":{"label":"aidanhs:aphs-multi-test-suite","ref":"aphs-multi-test-suite","sha":"3d421f5aea3c1fa112a766b5182afdbad98719ed","user":{"login":"aidanhs","id":1050652,"avatar_url":"https://avatars.githubusercontent.com/u/1050652?v=3","gravatar_id":"","url":"https://api.github.com/users/aidanhs","html_url":"https://github.com/aidanhs","followers_url":"https://api.github.com/users/aidanhs/followers","following_url":"https://api.github.com/users/aidanhs/following{/other_user}","gists_url":"https://api.github.com/users/aidanhs/gists{/gist_id}","starred_url":"https://api.github.com/users/aidanhs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aidanhs/subscriptions","organizations_url":"https://api.github.com/users/aidanhs/orgs","repos_url":"https://api.github.com/users/aidanhs/repos","events_url":"https://api.github.com/users/aidanhs/events{/privacy}","received_events_url":"https://api.github.com/users/aidanhs/received_events","type":"User","site_admin":false},"repo":{"id":25492754,"name":"emscripten","full_name":"aidanhs/emscripten","owner":{"login":"aidanhs","id":1050652,"avatar_url":"https://avatars.githubusercontent.com/u/1050652?v=3","gravatar_id":"","url":"https://api.github.com/users/aidanhs","html_url":"https://github.com/aidanhs","followers_url":"https://api.github.com/users/aidanhs/followers","following_url":"https://api.github.com/users/aidanhs/following{/other_user}","gists_url":"https://api.github.com/users/aidanhs/gists{/gist_id}","starred_url":"https://api.github.com/users/aidanhs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aidanhs/subscriptions","organizations_url":"https://api.github.com/users/aidanhs/orgs","repos_url":"https://api.github.com/users/aidanhs/repos","events_url":"https://api.github.com/users/aidanhs/events{/privacy}","received_events_url":"https://api.github.com/users/aidanhs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aidanhs/emscripten","description":"Emscripten: An LLVM-to-JavaScript Compiler","fork":true,"url":"https://api.github.com/repos/aidanhs/emscripten","forks_url":"https://api.github.com/repos/aidanhs/emscripten/forks","keys_url":"https://api.github.com/repos/aidanhs/emscripten/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aidanhs/emscripten/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aidanhs/emscripten/teams","hooks_url":"https://api.github.com/repos/aidanhs/emscripten/hooks","issue_events_url":"https://api.github.com/repos/aidanhs/emscripten/issues/events{/number}","events_url":"https://api.github.com/repos/aidanhs/emscripten/events","assignees_url":"https://api.github.com/repos/aidanhs/emscripten/assignees{/user}","branches_url":"https://api.github.com/repos/aidanhs/emscripten/branches{/branch}","tags_url":"https://api.github.com/repos/aidanhs/emscripten/tags","blobs_url":"https://api.github.com/repos/aidanhs/emscripten/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aidanhs/emscripten/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aidanhs/emscripten/git/refs{/sha}","trees_url":"https://api.github.com/repos/aidanhs/emscripten/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aidanhs/emscripten/statuses/{sha}","languages_url":"https://api.github.com/repos/aidanhs/emscripten/languages","stargazers_url":"https://api.github.com/repos/aidanhs/emscripten/stargazers","contributors_url":"https://api.github.com/repos/aidanhs/emscripten/contributors","subscribers_url":"https://api.github.com/repos/aidanhs/emscripten/subscribers","subscription_url":"https://api.github.com/repos/aidanhs/emscripten/subscription","commits_url":"https://api.github.com/repos/aidanhs/emscripten/commits{/sha}","git_commits_url":"https://api.github.com/repos/aidanhs/emscripten/git/commits{/sha}","comments_url":"https://api.github.com/repos/aidanhs/emscripten/comments{/number}","issue_comment_url":"https://api.github.com/repos/aidanhs/emscripten/issues/comments{/number}","contents_url":"https://api.github.com/repos/aidanhs/emscripten/contents/{+path}","compare_url":"https://api.github.com/repos/aidanhs/emscripten/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aidanhs/emscripten/merges","archive_url":"https://api.github.com/repos/aidanhs/emscripten/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aidanhs/emscripten/downloads","issues_url":"https://api.github.com/repos/aidanhs/emscripten/issues{/number}","pulls_url":"https://api.github.com/repos/aidanhs/emscripten/pulls{/number}","milestones_url":"https://api.github.com/repos/aidanhs/emscripten/milestones{/number}","notifications_url":"https://api.github.com/repos/aidanhs/emscripten/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aidanhs/emscripten/labels{/name}","releases_url":"https://api.github.com/repos/aidanhs/emscripten/releases{/id}","created_at":"2014-10-21T00:05:56Z","updated_at":"2015-04-03T02:48:00Z","pushed_at":"2015-09-20T14:16:24Z","git_url":"git://github.com/aidanhs/emscripten.git","ssh_url":"git@github.com:aidanhs/emscripten.git","clone_url":"https://github.com/aidanhs/emscripten.git","svn_url":"https://github.com/aidanhs/emscripten","homepage":"","size":131394,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"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":"master"}},"base":{"label":"kripken:incoming","ref":"incoming","sha":"376333f671f1768840c730df23bfcf5c42ba3f25","user":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"repo":{"id":1357796,"name":"emscripten","full_name":"kripken/emscripten","owner":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kripken/emscripten","description":"Emscripten: An LLVM-to-JavaScript Compiler","fork":false,"url":"https://api.github.com/repos/kripken/emscripten","forks_url":"https://api.github.com/repos/kripken/emscripten/forks","keys_url":"https://api.github.com/repos/kripken/emscripten/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kripken/emscripten/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kripken/emscripten/teams","hooks_url":"https://api.github.com/repos/kripken/emscripten/hooks","issue_events_url":"https://api.github.com/repos/kripken/emscripten/issues/events{/number}","events_url":"https://api.github.com/repos/kripken/emscripten/events","assignees_url":"https://api.github.com/repos/kripken/emscripten/assignees{/user}","branches_url":"https://api.github.com/repos/kripken/emscripten/branches{/branch}","tags_url":"https://api.github.com/repos/kripken/emscripten/tags","blobs_url":"https://api.github.com/repos/kripken/emscripten/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kripken/emscripten/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kripken/emscripten/git/refs{/sha}","trees_url":"https://api.github.com/repos/kripken/emscripten/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kripken/emscripten/statuses/{sha}","languages_url":"https://api.github.com/repos/kripken/emscripten/languages","stargazers_url":"https://api.github.com/repos/kripken/emscripten/stargazers","contributors_url":"https://api.github.com/repos/kripken/emscripten/contributors","subscribers_url":"https://api.github.com/repos/kripken/emscripten/subscribers","subscription_url":"https://api.github.com/repos/kripken/emscripten/subscription","commits_url":"https://api.github.com/repos/kripken/emscripten/commits{/sha}","git_commits_url":"https://api.github.com/repos/kripken/emscripten/git/commits{/sha}","comments_url":"https://api.github.com/repos/kripken/emscripten/comments{/number}","issue_comment_url":"https://api.github.com/repos/kripken/emscripten/issues/comments{/number}","contents_url":"https://api.github.com/repos/kripken/emscripten/contents/{+path}","compare_url":"https://api.github.com/repos/kripken/emscripten/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kripken/emscripten/merges","archive_url":"https://api.github.com/repos/kripken/emscripten/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kripken/emscripten/downloads","issues_url":"https://api.github.com/repos/kripken/emscripten/issues{/number}","pulls_url":"https://api.github.com/repos/kripken/emscripten/pulls{/number}","milestones_url":"https://api.github.com/repos/kripken/emscripten/milestones{/number}","notifications_url":"https://api.github.com/repos/kripken/emscripten/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kripken/emscripten/labels{/name}","releases_url":"https://api.github.com/repos/kripken/emscripten/releases{/id}","created_at":"2011-02-12T05:23:30Z","updated_at":"2015-09-20T16:49:37Z","pushed_at":"2015-09-20T18:55:08Z","git_url":"git://github.com/kripken/emscripten.git","ssh_url":"git@github.com:kripken/emscripten.git","clone_url":"https://github.com/kripken/emscripten.git","svn_url":"https://github.com/kripken/emscripten","homepage":"","size":238051,"stargazers_count":8855,"watchers_count":8855,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1047,"mirror_url":null,"open_issues_count":691,"forks":1047,"open_issues":691,"watchers":8855,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/3795"},"html":{"href":"https://github.com/kripken/emscripten/pull/3795"},"issue":{"href":"https://api.github.com/repos/kripken/emscripten/issues/3795"},"comments":{"href":"https://api.github.com/repos/kripken/emscripten/issues/3795/comments"},"review_comments":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/3795/comments"},"review_comment":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/3795/commits"},"statuses":{"href":"https://api.github.com/repos/kripken/emscripten/statuses/3d421f5aea3c1fa112a766b5182afdbad98719ed"}}}}