changeset 21347:5b1b31137f95

run-tests: move COVERAGE_FILE out of a global
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 19 Apr 2014 23:27:11 -0700
parents 02087bc4f143
children b3399154505f
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sat Apr 19 23:26:15 2014 -0700
+++ b/tests/run-tests.py	Sat Apr 19 23:27:11 2014 -0700
@@ -1293,6 +1293,7 @@
         self.bindir = None
         self.tmpbinddir = None
         self.pythondir = None
+        self.coveragefile = None
 
 def main(args, parser=None):
     runner = TestRunner()
@@ -1340,7 +1341,6 @@
         # we do the randomness ourself to know what seed is used
         os.environ['PYTHONHASHSEED'] = str(random.getrandbits(32))
 
-    global COVERAGE_FILE
     runner.testdir = os.environ['TESTDIR'] = os.getcwd()
     if options.tmpdir:
         options.keep_tmpdir = True
@@ -1409,7 +1409,7 @@
         pypath.append(oldpypath)
     os.environ[IMPL_PATH] = os.pathsep.join(pypath)
 
-    COVERAGE_FILE = os.path.join(runner.testdir, ".coverage")
+    runner.coveragefile = os.path.join(runner.testdir, ".coverage")
 
     vlog("# Using TESTDIR", runner.testdir)
     vlog("# Using HGTMP", runner.hgtmp)