diff options
author | Alp Toker <alp@nuanti.com> | 2013-10-28 10:26:13 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2013-10-28 10:26:13 +0000 |
commit | d0cdc67caa8e495fe17e2d8e31ae245766fb8cce (patch) | |
tree | 11bacb80547c6839ce218e76b3b86e8627627319 | |
parent | bcaea0ee0ba0adaa502ecd536bf7a8a2cdf5a686 (diff) | |
download | bcm5719-llvm-d0cdc67caa8e495fe17e2d8e31ae245766fb8cce.tar.gz bcm5719-llvm-d0cdc67caa8e495fe17e2d8e31ae245766fb8cce.zip |
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.
llvm-svn: 193516
-rw-r--r-- | llvm/utils/lit/lit/run.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/lit/lit/run.py b/llvm/utils/lit/lit/run.py index e3d9344d694..27c414d6dd6 100644 --- a/llvm/utils/lit/lit/run.py +++ b/llvm/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: |