From 6d0c3a1fa6336e236667bd0200e7ef72531d1147 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 8 Dec 2015 14:17:58 +0100 Subject: [PATCH] Autopkgtest: Keep the actual run IDs Don't clobber passed run IDs with newer failed results. This is potentially a bit more expensive as we might re-fetch failed results at every run after a PASS, but the IDs in our cache will be correct so that we can expose them in the UI. --- autopkgtest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autopkgtest.py b/autopkgtest.py index 28563dc..6e30adc 100644 --- a/autopkgtest.py +++ b/autopkgtest.py @@ -423,9 +423,9 @@ class AutoPackageTest(object): src, {}).setdefault(arch, [False, None, '']) # don't clobber existing passed results with failures from re-runs - result[0] = result[0] or passed - result[1] = ver - if stamp > result[2]: + if passed or not result[0]: + result[0] = passed + result[1] = ver result[2] = stamp def send_test_request(self, src, arch, trigger):