run-tests: use correct python safely under --jobs stable
authorBryan O'Sullivan <bryano@fb.com>
Mon, 10 Dec 2012 12:14:55 -0800
branchstable
changeset 1170 2fb2b92583e4
parent 1169 28f06763bfb2
child 1171 5af439678b99
run-tests: use correct python safely under --jobs [ original upstream message ]
tests/run-tests.py
--- a/tests/run-tests.py	Mon Dec 10 12:09:02 2012 -0800
+++ b/tests/run-tests.py	Mon Dec 10 12:14:55 2012 -0800
@@ -370,6 +370,10 @@
         # windows fallback
         shutil.copyfile(sys.executable, mypython)
         shutil.copymode(sys.executable, mypython)
+    except OSError, err:
+        # child processes may race, which is harmless
+        if err.errno != errno.EEXIST:
+            raise
 
 def installhg(options):
     vlog("# Performing temporary installation of HG")