Skip to content

Commit

Permalink
[lit] Use multiprocessing based parallelism by default, on Unix.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193279 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ddunbar committed Oct 23, 2013
1 parent 250f4e8 commit a0d3bcf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions utils/lit/lit/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit a0d3bcf

Please sign in to comment.