From c3c9005d5fcca11eba3e08bb63fe940132119869 Mon Sep 17 00:00:00 2001 From: Celso Providelo Date: Fri, 6 Feb 2015 10:38:36 -0500 Subject: [PATCH] Restore boottest status lookup by source name & version. --- boottest.py | 8 ++++---- britney.py | 2 +- tests/test_boottest.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/boottest.py b/boottest.py index b83668f..01c9922 100644 --- a/boottest.py +++ b/boottest.py @@ -208,11 +208,11 @@ class BootTest(object): if not (src in self.pkglist and ver in self.pkglist[src]): self.pkglist[src][ver] = status - def get_status(self, name): + def get_status(self, name, version): """Return test status for the given source name.""" - last_version = sorted( - self.pkglist[name], cmp=apt_pkg.version_compare)[-1] - return self.pkglist[name][last_version] + #version = sorted( + # self.pkglist[name], cmp=apt_pkg.version_compare)[-1] + return self.pkglist[name][version] def request(self, packages): """Requests boottests for the given sources list ([(src, ver),]).""" diff --git a/britney.py b/britney.py index a119ca8..eef23fe 100755 --- a/britney.py +++ b/britney.py @@ -1944,7 +1944,7 @@ class Britney(object): boottest.collect() # Update excuses from the boottest context. 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') excuse.addhtml("Boottest result: %s" % (label)) # Allows hints to force boottest failures/attempts diff --git a/tests/test_boottest.py b/tests/test_boottest.py index 5492240..2e56116 100644 --- a/tests/test_boottest.py +++ b/tests/test_boottest.py @@ -172,7 +172,7 @@ template = """ green 1.1~beta RUNNING pyqt5-src 1.1~beta PASS pyqt5-src 1.1 FAIL -signon 1.0 PASS +signon 1.1 PASS """ def request():