##// 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 requiredtools = [os.path.basename(sys.executable), "diff", "grep", "unzip",
106 requiredtools = [os.path.basename(sys.executable), "diff", "grep", "unzip",
107 "gunzip", "bunzip2", "sed"]
107 "gunzip", "bunzip2", "sed"]
108 createdfiles = []
109
110 defaults = {
108 defaults = {
111 'jobs': ('HGTEST_JOBS', 1),
109 'jobs': ('HGTEST_JOBS', 1),
112 'timeout': ('HGTEST_TIMEOUT', 180),
110 'timeout': ('HGTEST_TIMEOUT', 180),
@@ -1251,6 +1249,7 b' class TestRunner(object):'
1251 self.tmpbinddir = None
1249 self.tmpbinddir = None
1252 self.pythondir = None
1250 self.pythondir = None
1253 self.coveragefile = None
1251 self.coveragefile = None
1252 self._createdfiles = []
1254
1253
1255 def cleanup(self):
1254 def cleanup(self):
1256 """Clean up state from this test invocation."""
1255 """Clean up state from this test invocation."""
@@ -1260,7 +1259,7 b' class TestRunner(object):'
1260
1259
1261 vlog("# Cleaning up HGTMP", self.hgtmp)
1260 vlog("# Cleaning up HGTMP", self.hgtmp)
1262 shutil.rmtree(self.hgtmp, True)
1261 shutil.rmtree(self.hgtmp, True)
1263 for f in createdfiles:
1262 for f in self._createdfiles:
1264 try:
1263 try:
1265 os.remove(f)
1264 os.remove(f)
1266 except OSError:
1265 except OSError:
@@ -1284,7 +1283,7 b' class TestRunner(object):'
1284 if findprogram(pyexename) != sys.executable:
1283 if findprogram(pyexename) != sys.executable:
1285 try:
1284 try:
1286 os.symlink(sys.executable, mypython)
1285 os.symlink(sys.executable, mypython)
1287 createdfiles.append(mypython)
1286 self._createdfiles.append(mypython)
1288 except OSError, err:
1287 except OSError, err:
1289 # child processes may race, which is harmless
1288 # child processes may race, which is harmless
1290 if err.errno != errno.EEXIST:
1289 if err.errno != errno.EEXIST:
General Comments 0
You need to be logged in to leave comments. Login now