summaryrefslogtreecommitdiffstats
path: root/utils/lit
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-10-28 10:26:13 +0000
committerAlp Toker <alp@nuanti.com>2013-10-28 10:26:13 +0000
commit188545867dbcd0a6870b19c6b06d49610e7cda93 (patch)
tree3b252cd69a83b930d72fac4ba3e6cf562a65eaef /utils/lit
parent19ea37059aaea8104ea6017abc9f1bbed610b7f2 (diff)
downloadexternal_llvm-188545867dbcd0a6870b19c6b06d49610e7cda93.zip
external_llvm-188545867dbcd0a6870b19c6b06d49610e7cda93.tar.gz
external_llvm-188545867dbcd0a6870b19c6b06d49610e7cda93.tar.bz2
lit: multiprocessing platform fix attempt
The error raised by Python varies by platform(!), so let's just catch any exception and fall back. Thanks to Sylvestre Ledru for noticing this on a Debian / Python 2.7 system running code coverage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r--utils/lit/lit/run.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/lit/lit/run.py b/utils/lit/lit/run.py
index e3d9344..27c414d 100644
--- a/utils/lit/lit/run.py
+++ b/utils/lit/lit/run.py
@@ -216,9 +216,10 @@ class Run(object):
queue_impl = multiprocessing.Queue
canceled_flag = multiprocessing.Value('i', 0)
consumer = MultiprocessResultsConsumer(self, display, jobs)
- except ImportError:
+ except:
# multiprocessing fails to initialize with certain OpenBSD and
# FreeBSD Python versions: http://bugs.python.org/issue3770
+ # Unfortunately the error raised also varies by platform.
self.lit_config.note('failed to initialize multiprocessing')
consumer = None
if not consumer: