Title: [108862] trunk/Tools
Revision
108862
Author
[email protected]
Date
2012-02-24 16:12:38 -0800 (Fri, 24 Feb 2012)

Log Message

webkitpy: should autoinstall coverage
https://bugs.webkit.org/show_bug.cgi?id=79535

Reviewed by Eric Seidel.

We should automatically print the coverage report after the run, too.

* Scripts/webkitpy/test/main.py:
(Tester._run_tests):
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook.find_module):
(AutoinstallImportHook._install_coverage):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (108861 => 108862)


--- trunk/Tools/ChangeLog	2012-02-25 00:03:17 UTC (rev 108861)
+++ trunk/Tools/ChangeLog	2012-02-25 00:12:38 UTC (rev 108862)
@@ -1,3 +1,18 @@
+2012-02-24  Dirk Pranke  <[email protected]>
+
+        webkitpy: should autoinstall coverage
+        https://bugs.webkit.org/show_bug.cgi?id=79535
+
+        Reviewed by Eric Seidel.
+
+        We should automatically print the coverage report after the run, too.
+
+        * Scripts/webkitpy/test/main.py:
+        (Tester._run_tests):
+        * Scripts/webkitpy/thirdparty/__init__.py:
+        (AutoinstallImportHook.find_module):
+        (AutoinstallImportHook._install_coverage):
+
 2012-02-24  Pablo Flouret  <[email protected]>
 
         Fix copypasta in build-webkit's --vibration option description

Modified: trunk/Tools/Scripts/webkitpy/test/main.py (108861 => 108862)


--- trunk/Tools/Scripts/webkitpy/test/main.py	2012-02-25 00:03:17 UTC (rev 108861)
+++ trunk/Tools/Scripts/webkitpy/test/main.py	2012-02-25 00:12:38 UTC (rev 108862)
@@ -198,7 +198,7 @@
     def _run_tests(self, dirs, args):
         if self._options.coverage:
             try:
-                import coverage
+                import webkitpy.thirdparty.autoinstalled.coverage as coverage
             except ImportError, e:
                 _log.error("Failed to import 'coverage'; can't generate coverage numbers.")
                 return False
@@ -233,6 +233,7 @@
         if self._options.coverage:
             cov.stop()
             cov.save()
+            cov.report(show_missing=False)
         return result.wasSuccessful()
 
     def _is_module(self, dirs, name):

Modified: trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py (108861 => 108862)


--- trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py	2012-02-25 00:03:17 UTC (rev 108861)
+++ trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py	2012-02-25 00:12:38 UTC (rev 108862)
@@ -74,6 +74,8 @@
             self._install_mechanize()
         elif '.pep8' in fullname:
             self._install_pep8()
+        elif '.coverage' in fullname:
+            self._install_coverage()
         elif '.eliza' in fullname:
             self._install_eliza()
         elif '.irc' in fullname:
@@ -108,6 +110,10 @@
 
         self._install("http://pypi.python.org/packages/source/b/buildbot/buildbot-0.8.4p2.tar.gz#md5=7597d945724c80c0ab476e833a1026cb", "buildbot-0.8.4p2/buildbot")
 
+    def _install_coverage(self):
+        installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR)
+        installer.install(url="" url_subpath="coverage-3.5.1/coverage")
+
     def _install_eliza(self):
         installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR)
         installer.install(url=""
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to