Restore boottest status lookup by source name & version.

bzr-import-20160707
Celso Providelo 10 years ago
parent 760d08c459
commit c3c9005d5f

@ -208,11 +208,11 @@ class BootTest(object):
if not (src in self.pkglist and ver in self.pkglist[src]): if not (src in self.pkglist and ver in self.pkglist[src]):
self.pkglist[src][ver] = status self.pkglist[src][ver] = status
def get_status(self, name): def get_status(self, name, version):
"""Return test status for the given source name.""" """Return test status for the given source name."""
last_version = sorted( #version = sorted(
self.pkglist[name], cmp=apt_pkg.version_compare)[-1] # self.pkglist[name], cmp=apt_pkg.version_compare)[-1]
return self.pkglist[name][last_version] return self.pkglist[name][version]
def request(self, packages): def request(self, packages):
"""Requests boottests for the given sources list ([(src, ver),]).""" """Requests boottests for the given sources list ([(src, ver),])."""

@ -1944,7 +1944,7 @@ class Britney(object):
boottest.collect() boottest.collect()
# Update excuses from the boottest context. # Update excuses from the boottest context.
for excuse in boottest_excuses: for excuse in boottest_excuses:
status = boottest.get_status(excuse.name) status = boottest.get_status(excuse.name, excuse.ver[1])
label = BootTest.EXCUSE_LABELS.get(status, 'UNKNOWN STATUS') label = BootTest.EXCUSE_LABELS.get(status, 'UNKNOWN STATUS')
excuse.addhtml("Boottest result: %s" % (label)) excuse.addhtml("Boottest result: %s" % (label))
# Allows hints to force boottest failures/attempts # Allows hints to force boottest failures/attempts

@ -172,7 +172,7 @@ template = """
green 1.1~beta RUNNING green 1.1~beta RUNNING
pyqt5-src 1.1~beta PASS pyqt5-src 1.1~beta PASS
pyqt5-src 1.1 FAIL pyqt5-src 1.1 FAIL
signon 1.0 PASS signon 1.1 PASS
""" """
def request(): def request():

Loading…
Cancel
Save