##// END OF EJS Templates
run-tests: move createdfiles out of a global and into TestRunner
Gregory Szorc -
r21352:39fd89fb default
parent child Browse files
Show More
@@ -105,8 +105,6 b' TESTDIR = HGTMP = INST = BINDIR = TMPBIN'
105 105
106 106 requiredtools = [os.path.basename(sys.executable), "diff", "grep", "unzip",
107 107 "gunzip", "bunzip2", "sed"]
108 createdfiles = []
109
110 108 defaults = {
111 109 'jobs': ('HGTEST_JOBS', 1),
112 110 'timeout': ('HGTEST_TIMEOUT', 180),
@@ -1251,6 +1249,7 b' class TestRunner(object):'
1251 1249 self.tmpbinddir = None
1252 1250 self.pythondir = None
1253 1251 self.coveragefile = None
1252 self._createdfiles = []
1254 1253
1255 1254 def cleanup(self):
1256 1255 """Clean up state from this test invocation."""
@@ -1260,7 +1259,7 b' class TestRunner(object):'
1260 1259
1261 1260 vlog("# Cleaning up HGTMP", self.hgtmp)
1262 1261 shutil.rmtree(self.hgtmp, True)
1263 for f in createdfiles:
1262 for f in self._createdfiles:
1264 1263 try:
1265 1264 os.remove(f)
1266 1265 except OSError:
@@ -1284,7 +1283,7 b' class TestRunner(object):'
1284 1283 if findprogram(pyexename) != sys.executable:
1285 1284 try:
1286 1285 os.symlink(sys.executable, mypython)
1287 createdfiles.append(mypython)
1286 self._createdfiles.append(mypython)
1288 1287 except OSError, err:
1289 1288 # child processes may race, which is harmless
1290 1289 if err.errno != errno.EEXIST:
General Comments 0
You need to be logged in to leave comments. Login now