run-tests: move COVERAGE_FILE out of a global
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 19 Apr 2014 23:27:11 -0700
changeset 21347 5b1b31137f95
parent 21346 02087bc4f143
child 21348 b3399154505f
run-tests: move COVERAGE_FILE out of a global
tests/run-tests.py
--- 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)