# HG changeset patch # User Gregory Szorc # Date 1397975978 25200 # Node ID 39fd89fbbc3ccdaf7c7225f2c28af1e4a43abe51 # Parent fe5647506565709682c9be336463e81b66dc8866 run-tests: move createdfiles out of a global and into TestRunner diff -r fe5647506565 -r 39fd89fbbc3c tests/run-tests.py --- a/tests/run-tests.py Sat Apr 19 23:38:10 2014 -0700 +++ b/tests/run-tests.py Sat Apr 19 23:39:38 2014 -0700 @@ -105,8 +105,6 @@ requiredtools = [os.path.basename(sys.executable), "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"] -createdfiles = [] - defaults = { 'jobs': ('HGTEST_JOBS', 1), 'timeout': ('HGTEST_TIMEOUT', 180), @@ -1251,6 +1249,7 @@ self.tmpbinddir = None self.pythondir = None self.coveragefile = None + self._createdfiles = [] def cleanup(self): """Clean up state from this test invocation.""" @@ -1260,7 +1259,7 @@ vlog("# Cleaning up HGTMP", self.hgtmp) shutil.rmtree(self.hgtmp, True) - for f in createdfiles: + for f in self._createdfiles: try: os.remove(f) except OSError: @@ -1284,7 +1283,7 @@ if findprogram(pyexename) != sys.executable: try: os.symlink(sys.executable, mypython) - createdfiles.append(mypython) + self._createdfiles.append(mypython) except OSError, err: # child processes may race, which is harmless if err.errno != errno.EEXIST: