[llvm] r282479 - Trying to fix lldb build breakage probably caused by rL282452
Dimitar Vlahovski via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 27 03:34:43 PDT 2016
Author: dvlahovski
Date: Tue Sep 27 05:34:43 2016
New Revision: 282479
URL: http://llvm.org/viewvc/llvm-project?rev=282479&view=rev
Log:
Trying to fix lldb build breakage probably caused by rL282452
Modified:
llvm/trunk/utils/lit/lit/run.py
Modified: llvm/trunk/utils/lit/lit/run.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/run.py?rev=282479&r1=282478&r2=282479&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/run.py (original)
+++ llvm/trunk/utils/lit/lit/run.py Tue Sep 27 05:34:43 2016
@@ -151,19 +151,19 @@ def run_one_tester(run, provider, displa
tester.run()
###
+class _Display(object):
+ def __init__(self, display, provider, maxFailures):
+ self.display = display
+ self.maxFailures = maxFailures or object()
+ self.failedCount = 0
+ def update(self, test):
+ self.display.update(test)
+ self.failedCount += (test.result.code == lit.Test.FAIL)
+ if self.failedCount == self.maxFailures:
+ provider.cancel()
def handleFailures(provider, consumer, maxFailures):
- class _Display(object):
- def __init__(self, display):
- self.display = display
- self.maxFailures = maxFailures or object()
- self.failedCount = 0
- def update(self, test):
- self.display.update(test)
- self.failedCount += (test.result.code == lit.Test.FAIL)
- if self.failedCount == self.maxFailures:
- provider.cancel()
- consumer.display = _Display(consumer.display)
+ consumer.display = _Display(consumer.display, provider, maxFailures)
class Run(object):
"""
More information about the llvm-commits
mailing list