[llvm] r292237 - Revert r292231.
Kuba Mracek via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 10:06:39 PST 2017
Author: kuba.brecka
Date: Tue Jan 17 12:06:38 2017
New Revision: 292237
URL: http://llvm.org/viewvc/llvm-project?rev=292237&view=rev
Log:
Revert r292231.
Modified:
llvm/trunk/utils/lit/lit/LitConfig.py
llvm/trunk/utils/lit/lit/TestingConfig.py
llvm/trunk/utils/lit/lit/main.py
llvm/trunk/utils/lit/lit/run.py
Modified: llvm/trunk/utils/lit/lit/LitConfig.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/LitConfig.py?rev=292237&r1=292236&r2=292237&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/LitConfig.py (original)
+++ llvm/trunk/utils/lit/lit/LitConfig.py Tue Jan 17 12:06:38 2017
@@ -24,8 +24,7 @@ class LitConfig(object):
noExecute, debug, isWindows,
params, config_prefix = None,
maxIndividualTestTime = 0,
- maxFailures = None,
- parallelism_groups = []):
+ maxFailures = None):
# The name of the test runner.
self.progname = progname
# The items to add to the PATH environment variable.
@@ -63,7 +62,6 @@ class LitConfig(object):
self.maxIndividualTestTime = maxIndividualTestTime
self.maxFailures = maxFailures
- self.parallelism_groups = parallelism_groups
@property
def maxIndividualTestTime(self):
Modified: llvm/trunk/utils/lit/lit/TestingConfig.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestingConfig.py?rev=292237&r1=292236&r2=292237&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestingConfig.py (original)
+++ llvm/trunk/utils/lit/lit/TestingConfig.py Tue Jan 17 12:06:38 2017
@@ -106,7 +106,7 @@ class TestingConfig:
environment, substitutions, unsupported,
test_exec_root, test_source_root, excludes,
available_features, pipefail, limit_to_features = [],
- is_early = False, parallelism_group = ""):
+ is_early = False):
self.parent = parent
self.name = str(name)
self.suffixes = set(suffixes)
@@ -125,7 +125,6 @@ class TestingConfig:
self.limit_to_features = set(limit_to_features)
# Whether the suite should be tested early in a given run.
self.is_early = bool(is_early)
- self.parallelism_group = parallelism_group
def finish(self, litConfig):
"""finish() - Finish this config object, after loading is complete."""
Modified: llvm/trunk/utils/lit/lit/main.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/main.py?rev=292237&r1=292236&r2=292237&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/main.py (original)
+++ llvm/trunk/utils/lit/lit/main.py Tue Jan 17 12:06:38 2017
@@ -313,13 +313,6 @@ def main_with_tmp(builtinParameters):
isWindows = platform.system() == 'Windows'
- parallelism_groups = {}
- if platform.system() == 'Darwin':
- # Only run up to 3 64-bit sanitized processes simultaneously on Darwin.
- # Using more scales badly and hogs the system due to inefficient handling
- # of large mmap'd regions (terabytes) by the kernel.
- parallelism_groups["darwin-64bit-sanitizer"] = 3
-
# Create the global config object.
litConfig = lit.LitConfig.LitConfig(
progname = os.path.basename(sys.argv[0]),
@@ -334,8 +327,7 @@ def main_with_tmp(builtinParameters):
params = userParams,
config_prefix = opts.configPrefix,
maxIndividualTestTime = maxIndividualTestTime,
- maxFailures = opts.maxFailures,
- parallelism_groups = parallelism_groups)
+ maxFailures = opts.maxFailures)
# Perform test discovery.
run = lit.run.Run(litConfig,
Modified: llvm/trunk/utils/lit/lit/run.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/run.py?rev=292237&r1=292236&r2=292237&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/run.py (original)
+++ llvm/trunk/utils/lit/lit/run.py Tue Jan 17 12:06:38 2017
@@ -175,14 +175,9 @@ class Run(object):
def __init__(self, lit_config, tests):
self.lit_config = lit_config
self.tests = tests
- self.parallelism_semaphores = ""
def execute_test(self, test):
- pg = test.config.parallelism_group
- if callable(pg): pg = pg(test)
-
result = None
- if pg: self.parallelism_semaphores[pg].acquire()
start_time = time.time()
try:
result = test.config.test_format.execute(test, self.lit_config)
@@ -194,8 +189,6 @@ class Run(object):
result = lit.Test.Result(code, output)
elif not isinstance(result, lit.Test.Result):
raise ValueError("unexpected result from test execution")
-
- result.elapsed = time.time() - start_time
except KeyboardInterrupt:
raise
except:
@@ -205,8 +198,7 @@ class Run(object):
output += traceback.format_exc()
output += '\n'
result = lit.Test.Result(lit.Test.UNRESOLVED, output)
- finally:
- if pg: self.parallelism_semaphores[pg].release()
+ result.elapsed = time.time() - start_time
test.setResult(result)
@@ -239,7 +231,6 @@ class Run(object):
try:
task_impl = multiprocessing.Process
queue_impl = multiprocessing.Queue
- sem_impl = multiprocessing.Semaphore
canceled_flag = multiprocessing.Value('i', 0)
consumer = MultiprocessResultsConsumer(self, display, jobs)
except:
@@ -251,13 +242,9 @@ class Run(object):
if not consumer:
task_impl = threading.Thread
queue_impl = queue.Queue
- sem_impl = threading.Semaphore
canceled_flag = LockedValue(0)
consumer = ThreadResultsConsumer(display)
- self.parallelism_semaphores = {k: sem_impl(v)
- for k, v in self.lit_config.parallelism_groups.items()}
-
# Create the test provider.
provider = TestProvider(queue_impl, canceled_flag)
handleFailures(provider, consumer, self.lit_config.maxFailures)
More information about the llvm-commits
mailing list