llvm.org GIT mirror llvm / 09e2479
[lit] Fix refacto introduced by rL282479. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282501 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 3 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
150150 tester.run()
151151
152152 ###
153
153154 class _Display(object):
154155 def __init__(self, display, provider, maxFailures):
155156 self.display = display
157 self.provider = provider
156158 self.maxFailures = maxFailures or object()
157159 self.failedCount = 0
158160 def update(self, test):
159161 self.display.update(test)
160162 self.failedCount += (test.result.code == lit.Test.FAIL)
161163 if self.failedCount == self.maxFailures:
162 provider.cancel()
164 self.provider.cancel()
163165
164166 def handleFailures(provider, consumer, maxFailures):
165167 consumer.display = _Display(consumer.display, provider, maxFailures)