Changeset 103547 in webkit
- Timestamp:
- Dec 22, 2011 8:57:08 AM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r103546 r103547 1 2011-12-22 Adam Roben <aroben@apple.com> 2 3 Add a --xml flag to test-webkitpy 4 5 test-webkitpy --xml will, in addition to providing the standard text output on stdout, write 6 JUnit-style XML files to a test-webkitpy-xml-reports subdirectory in the working directory. 7 This is useful for working with tools that consume JUnit-style XML files. 8 9 Fixes <http://webkit.org/b/75090> Would like a way to generate JUnit-style XML files when 10 running test-webkitpy 11 12 Reviewed by Darin Adler. 13 14 * Scripts/webkitpy/test/main.py: 15 (Tester.run_tests): If the --xml flag is passed, create an XMLTestRunner and pass it to 16 unittest.main(). Otherwise pass no test runner so that unittest will choose its own default. 17 18 * Scripts/webkitpy/thirdparty/__init__.py: 19 (AutoinstallImportHook.find_module): 20 (AutoinstallImportHook._install_xmlrunner): 21 Added code to install unittest-xml-reporting as webkitpy.thirdparty.autoinstalled.xmlrunner. 22 This change is untested because it's basically impossible to get a test to pass when --xml 23 is passed to test-webkitpy (because xmlrunner will already have been imported by the time 24 the test runs). 25 1 26 2011-12-22 David Kilzer <ddkilzer@apple.com> 2 27 -
trunk/Tools/Scripts/webkitpy/test/main.py
r89791 r103547 112 112 sys.path.extend(set(os.path.dirname(path) for path in external_package_paths)) 113 113 114 if '--xml' in sys.argv: 115 sys.argv.remove('--xml') 116 from webkitpy.thirdparty.autoinstalled.xmlrunner import XMLTestRunner 117 test_runner = XMLTestRunner(output='test-webkitpy-xml-reports') 118 else: 119 test_runner = None 120 114 121 if len(sys_argv) > 1 and not sys_argv[-1].startswith("-"): 115 122 # Then explicit modules or test names were provided, which 116 123 # the unittest module is equipped to handle. 117 unittest.main(argv=sys_argv, module=None )124 unittest.main(argv=sys_argv, module=None, testRunner=test_runner) 118 125 # No need to return since unitttest.main() exits. 119 126 … … 167 174 # this module.) See the loadTestsFromName() method of the 168 175 # unittest.TestLoader class for more details on this parameter. 169 unittest.main(argv=sys_argv, module=None )176 unittest.main(argv=sys_argv, module=None, testRunner=test_runner) -
trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py
r99341 r103547 83 83 elif '.buildbot' in fullname: 84 84 self._install_buildbot() 85 elif '.xmlrunner' in fullname: 86 self._install_xmlrunner() 85 87 86 88 def _install_mechanize(self): … … 129 131 url_subpath="pywebsocket-0.7/src/mod_pywebsocket") 130 132 133 def _install_xmlrunner(self): 134 self._install("http://pypi.python.org/packages/source/u/unittest-xml-reporting/unittest-xml-reporting-1.0.3.tar.gz#md5=cebf83281b0753b5d42bad38c91fd4d6", 135 "unittest-xml-reporting-1.0.3/src/xmlrunner") 136 131 137 def _install(self, url, url_subpath): 132 138 installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR)
Note: See TracChangeset
for help on using the changeset viewer.