Skip to content

Commit

Permalink
[lit] Attempt to fix Python unittest adaptor logic
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309071 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rnk committed Jul 26, 2017
1 parent f74bed2 commit 59859d9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions utils/lit/lit/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ class Run(object):
def __init__(self, lit_config, tests):
self.lit_config = lit_config
self.tests = tests
# Set up semaphores to limit parallelism of certain classes of tests.
# For example, some ASan tests require lots of virtual memory and run
# faster with less parallelism on OS X.
self.parallelism_semaphores = \
{k: multiprocessing.Semaphore(v) for k, v in
self.lit_config.parallelism_groups.items()}

def execute_test(self, test):
return _execute_test_impl(test, self.lit_config,
Expand Down Expand Up @@ -74,13 +80,6 @@ def execute_tests(self, display, jobs, max_time=None):
if not self.tests or jobs == 0:
return

# Set up semaphores to limit parallelism of certain classes of tests.
# For example, some ASan tests require lots of virtual memory and run
# faster with less parallelism on OS X.
self.parallelism_semaphores = \
{k: multiprocessing.Semaphore(v) for k, v in
self.lit_config.parallelism_groups.items()}

# Install a console-control signal handler on Windows.
if win32api is not None:
def console_ctrl_handler(type):
Expand Down

0 comments on commit 59859d9

Please sign in to comment.