##// END OF EJS Templates
run-tests: remove files that we potentially create outside of $TMPDIR
Sean Farley -
r20019:edbf7f1f default
parent child Browse files
Show More
@@ -103,6 +103,7 b" if 'java' in sys.platform:"
103 103
104 104 requiredtools = [os.path.basename(sys.executable), "diff", "grep", "unzip",
105 105 "gunzip", "bunzip2", "sed"]
106 createdfiles = []
106 107
107 108 defaults = {
108 109 'jobs': ('HGTEST_JOBS', 1),
@@ -420,6 +421,11 b' def cleanup(options):'
420 421 if not options.keep_tmpdir:
421 422 vlog("# Cleaning up HGTMP", HGTMP)
422 423 shutil.rmtree(HGTMP, True)
424 for f in createdfiles:
425 try:
426 os.remove(f)
427 except OSError:
428 pass
423 429
424 430 def usecorrectpython():
425 431 # some tests run python interpreter. they must use same
@@ -439,6 +445,7 b' def usecorrectpython():'
439 445 if findprogram(pyexename) != sys.executable:
440 446 try:
441 447 os.symlink(sys.executable, mypython)
448 createdfiles.append(mypython)
442 449 except OSError, err:
443 450 # child processes may race, which is harmless
444 451 if err.errno != errno.EEXIST:
General Comments 0
You need to be logged in to leave comments. Login now