[PATCH 4 of 5] run-tests: output coverage to output dir

Siddharth Agarwal sid0 at fb.com
Thu Jun 8 00:26:37 EDT 2017


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1496895426 25200
#      Wed Jun 07 21:17:06 2017 -0700
# Node ID 1403ca58e0bbd50a9a9287915073516db610b3c2
# Parent  511ebc1769a9de229c5cca69ef3893bea1f2a63a
run-tests: output coverage to output dir

There do not appear to be any tests for this, and I've never used either of
these options before, but this works.

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2756,10 +2756,10 @@ class TestRunner(object):
         cov.report(ignore_errors=True, omit=omit)
 
         if self.options.htmlcov:
-            htmldir = os.path.join(self._testdir, 'htmlcov')
+            htmldir = os.path.join(self._outputdir, 'htmlcov')
             cov.html_report(directory=htmldir, omit=omit)
         if self.options.annotate:
-            adir = os.path.join(self._testdir, 'annotated')
+            adir = os.path.join(self._outputdir, 'annotated')
             if not os.path.isdir(adir):
                 os.mkdir(adir)
             cov.annotate(directory=adir, omit=omit)


More information about the Mercurial-devel mailing list