Skip to content
Snippets Groups Projects
Commit 2f597243e1d7 authored by Patrick Mezard's avatar Patrick Mezard
Browse files

Make run-tests.py --interactive work on Windows

parent 4b82d1a84db8
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,13 @@
print >> sys.stderr, 'ERROR: cannot mix -interactive and --jobs > 1'
sys.exit(1)
def rename(src, dst):
"""Like os.rename(), trade atomicity and opened files friendliness
for existing destination support.
"""
shutil.copy(src, dst)
os.remove(src)
def vlog(*msg):
if verbose:
for m in msg:
......@@ -528,7 +535,7 @@
print "Accept this change? [n] ",
answer = sys.stdin.readline().strip()
if answer.lower() in "y yes".split():
os.rename(test + ".err", test + ".out")
rename(test + ".err", test + ".out")
tested += 1
continue
failed += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment