Merge "Add a test printHistory function" into feature/zuulv3
This commit is contained in:
commit
d733484924
|
@ -1369,6 +1369,7 @@ class ZuulTestCase(BaseTestCase):
|
|||
threads = threading.enumerate()
|
||||
if len(threads) > 1:
|
||||
self.log.error("More than one thread is running: %s" % threads)
|
||||
self.printHistory()
|
||||
|
||||
def init_repo(self, project):
|
||||
parts = project.split('/')
|
||||
|
@ -1670,6 +1671,17 @@ class ZuulTestCase(BaseTestCase):
|
|||
self.log.error("No completed builds")
|
||||
raise
|
||||
|
||||
def printHistory(self):
|
||||
"""Log the build history.
|
||||
|
||||
This can be useful during tests to summarize what jobs have
|
||||
completed.
|
||||
|
||||
"""
|
||||
self.log.debug("Build history:")
|
||||
for build in self.history:
|
||||
self.log.debug(build)
|
||||
|
||||
def getPipeline(self, name):
|
||||
return self.sched.abide.tenants.values()[0].layout.pipelines.get(name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue