forked from OSchip/llvm-project
Enhance the test framework to be able to emit a counter value in verbose mode
describing the ordinal number of the currently running test case. llvm-svn: 122901
This commit is contained in:
parent
7a808c0f00
commit
77c81d3ee7
|
|
@ -792,6 +792,18 @@ for ia in range(len(archs) if iterArchs else 1):
|
|||
LLDBTestResult.__singleton__ = self
|
||||
# Now put this singleton into the lldb module namespace.
|
||||
lldb.test_result = self
|
||||
# Computes the format string for displaying the counter.
|
||||
global suite
|
||||
counterWidth = len(str(suite.countTestCases()))
|
||||
self.fmt = "%" + str(counterWidth) + "d: "
|
||||
# This counts from 1 .. suite.countTestCases().
|
||||
self.counter = 0
|
||||
|
||||
def startTest(self, test):
|
||||
self.counter += 1
|
||||
if self.showAll:
|
||||
self.stream.write(self.fmt % self.counter)
|
||||
super(LLDBTestResult, self).startTest(test)
|
||||
|
||||
def addError(self, test, err):
|
||||
global sdir_has_content
|
||||
|
|
|
|||
Loading…
Reference in New Issue