From c1177a331a8f89ad035fa3eaacef6bb1b7cc4d05 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Thu, 4 Jun 2020 15:59:49 +0100 Subject: [PATCH] autopkgtest: Support autopkgtest.u.c in-progress URL This is at /running. We use 'are we running on swift?' as a proxy for deciding which URL format to use --- britney2/policies/autopkgtest.py | 5 ++++- tests/test_autopkgtest.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 448dcf8..18ae07c 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -1167,7 +1167,10 @@ class AutopkgtestPolicy(BasePolicy): result = 'RUNNING' else: result = 'RUNNING-ALWAYSFAIL' - url = self.options.adt_ci_url + 'status/pending' + if self.options.adt_swift_url.startswith('file://'): + url = self.options.adt_ci_url + 'status/pending' + else: + url = self.options.adt_ci_url + 'running' else: raise RuntimeError('Result for %s/%s/%s (triggered by %s) is neither known nor pending!' % (src, ver, arch, trigger)) diff --git a/tests/test_autopkgtest.py b/tests/test_autopkgtest.py index 37a10d2..67547fc 100644 --- a/tests/test_autopkgtest.py +++ b/tests/test_autopkgtest.py @@ -255,12 +255,12 @@ class AT(TestAutopkgtestBase): self.assertEqual(exc['darkgreen']['policy_info']['autopkgtest'], {'darkgreen': { 'amd64': ['RUNNING-ALWAYSFAIL', - 'https://autopkgtest.ubuntu.com/status/pending', + 'https://autopkgtest.ubuntu.com/running', 'https://autopkgtest.ubuntu.com/packages/d/darkgreen/testing/amd64', None, None], 'i386': ['RUNNING-ALWAYSFAIL', - 'https://autopkgtest.ubuntu.com/status/pending', + 'https://autopkgtest.ubuntu.com/running', 'https://autopkgtest.ubuntu.com/packages/d/darkgreen/testing/i386', None, None]},