Patchwork [3,of,3,in,crew] run-tests: use correct python safely under --jobs

login
register
mail settings
Submitter Bryan O'Sullivan
Date Dec. 10, 2012, 8:35 p.m.
Message ID <5522a7951bd7e2b16831.1355171712@dev1718.prn1.facebook.com>
Download mbox | patch
Permalink /patch/47/
State Superseded
Commit 5522a7951bd7e2b16831ba1736feb2e9145d7e58
Headers show

Comments

Bryan O'Sullivan - Dec. 10, 2012, 8:35 p.m.
# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1355170495 28800
# Node ID 5522a7951bd7e2b16831ba1736feb2e9145d7e58
# Parent  07ad75b229109e6b2046fd5bd7adc346c964078f
run-tests: use correct python safely under --jobs

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -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")