From a0d3bcfd8cf26f2849e0ea48419f31659dacb0bf Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 23 Oct 2013 22:19:07 +0000 Subject: [PATCH] [lit] Use multiprocessing based parallelism by default, on Unix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193279 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/lit/lit/main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/utils/lit/lit/main.py b/utils/lit/lit/main.py index ba2490effa3..3d187079cb6 100755 --- a/utils/lit/lit/main.py +++ b/utils/lit/lit/main.py @@ -115,6 +115,10 @@ def main(builtinParameters = {}): # FIXME: This is a hack. sys.setcheckinterval(1000) + # Use processes by default on Unix platforms. + isWindows = platform.system() == 'Windows' + useProcessesIsDefault = not isWindows + global options from optparse import OptionParser, OptionGroup parser = OptionParser("usage: %prog [options] {file-or-path}") @@ -199,10 +203,10 @@ def main(builtinParameters = {}): action="store_true", default=False) group.add_option("", "--use-processes", dest="useProcesses", help="Run tests in parallel with processes (not threads)", - action="store_true", default=False) + action="store_true", default=useProcessesIsDefault) group.add_option("", "--use-threads", dest="useProcesses", help="Run tests in parallel with threads (not processes)", - action="store_false", default=False) + action="store_false", default=not useProcessesIsDefault) parser.add_option_group(group) (opts, args) = parser.parse_args() @@ -241,7 +245,7 @@ def main(builtinParameters = {}): valgrindArgs = opts.valgrindArgs, noExecute = opts.noExecute, debug = opts.debug, - isWindows = (platform.system()=='Windows'), + isWindows = isWindows, params = userParams, config_prefix = opts.configPrefix) -- 2.34.1