Merge lp:~joetalbott/britney/boottest_like_autopkgtest into lp:~canonical-ci-engineering/britney/boottesting-support

Proposed by Joe Talbott
Status: Merged
Merged at revision: 443
Proposed branch: lp:~joetalbott/britney/boottest_like_autopkgtest
Merge into: lp:~canonical-ci-engineering/britney/boottesting-support
Prerequisite: lp:~joetalbott/britney/dynamic_manifest_fetch
Diff against target: 238 lines (+35/-73)
4 files modified
britney.conf (+4/-0)
britney.py (+17/-2)
britney_boottest.conf (+0/-70)
tests/test_boottest.py (+14/-1)
To merge this branch: bzr merge lp:~joetalbott/britney/boottest_like_autopkgtest
Reviewer Review Type Date Requested Status
Canonical CI Engineering Pending
Review via email: mp+248179@code.launchpad.net

Commit message

Make boottest like autopkgtest to avoid waiting for slow arches.

* adds BOOTTEST_ARCHES config options.
* consolidates britney_boottest.conf into britney.conf

Description of the change

Make boottest like autopkgtest to avoid waiting for slow arches.

* adds BOOTTEST_ARCHES config options.
* consolidates britney_boottest.conf into britney.conf

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Not a full review.

I think that's the right approach (unless there is an even simpler way).

See inline comments but my main question is: how far did you go with this proposal ? Up to generating a test request (or at least ensure calling lp:auto-package-testing adt-britney will ?).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'britney.conf'
2--- britney.conf 2014-12-18 15:42:20 +0000
3+++ britney.conf 2015-01-30 22:57:35 +0000
4@@ -65,3 +65,7 @@
5 ADT_ENABLE = yes
6 ADT_DEBUG = no
7 ADT_ARCHES = amd64 i386
8+
9+BOOTTEST_ARCHES = armhf
10+BOOTTEST_ENABLE = yes
11+BOOTTEST_DEBUG = yes
12
13=== modified file 'britney.py'
14--- britney.py 2015-01-26 21:09:50 +0000
15+++ britney.py 2015-01-30 22:57:35 +0000
16@@ -1368,6 +1368,7 @@
17 # the starting point is that we will update the candidate and run autopkgtests
18 update_candidate = True
19 run_autopkgtest = True
20+ run_boottest = True
21
22 # if the version in unstable is older, then stop here with a warning in the excuse and return False
23 if source_t and apt_pkg.version_compare(source_u[VERSION], source_t[VERSION]) < 0:
24@@ -1381,6 +1382,7 @@
25 excuse.addhtml("%s source package doesn't exist" % (src))
26 update_candidate = False
27 run_autopkgtest = False
28+ run_boottest = False
29
30 # retrieve the urgency for the upload, ignoring it if this is a NEW package (not present in testing)
31 urgency = self.urgencies.get(src, self.options.default_urgency)
32@@ -1399,6 +1401,7 @@
33 excuse.addreason("remove")
34 update_candidate = False
35 run_autopkgtest = False
36+ run_boottest = False
37
38 # check if there is a `block' or `block-udeb' hint for this package, or a `block-all source' hint
39 blocked = {}
40@@ -1478,6 +1481,7 @@
41 else:
42 update_candidate = False
43 run_autopkgtest = False
44+ run_boottest = False
45 excuse.addreason("age")
46
47 if suite in ['pu', 'tpu']:
48@@ -1513,6 +1517,8 @@
49 update_candidate = False
50 if arch in self.options.adt_arches.split():
51 run_autopkgtest = False
52+ if arch in self.options.boottest_arches.split():
53+ run_boottest = False
54 excuse.addreason("arch")
55 excuse.addreason("arch-%s" % arch)
56 excuse.addreason("build-arch")
57@@ -1555,6 +1561,8 @@
58 update_candidate = False
59 if arch in self.options.adt_arches.split():
60 run_autopkgtest = False
61+ if arch in self.options.boottest_arches.split():
62+ run_boottest = False
63
64 # if there are out-of-date packages, warn about them in the excuse and set update_candidate
65 # to False to block the update; if the architecture where the package is out-of-date is
66@@ -1581,6 +1589,8 @@
67 update_candidate = False
68 if arch in self.options.adt_arches.split():
69 run_autopkgtest = False
70+ if arch in self.options.boottest_arches.split():
71+ run_boottest = False
72 excuse.addreason("arch")
73 excuse.addreason("arch-%s" % arch)
74 if uptodatebins:
75@@ -1598,11 +1608,13 @@
76 excuse.addreason("no-binaries")
77 update_candidate = False
78 run_autopkgtest = False
79+ run_boottest = False
80 elif not built_anywhere:
81 excuse.addhtml("%s has no up-to-date binaries on any arch" % src)
82 excuse.addreason("no-binaries")
83 update_candidate = False
84 run_autopkgtest = False
85+ run_boottest = False
86
87 # if the suite is unstable, then we have to check the release-critical bug lists before
88 # updating testing; if the unstable package has RC bugs that do not apply to the testing
89@@ -1635,6 +1647,7 @@
90 ["<a href=\"http://bugs.debian.org/%s\">#%s</a>" % (urllib.quote(a), a) for a in new_bugs])))
91 update_candidate = False
92 run_autopkgtest = False
93+ run_boottest = False
94 excuse.addreason("buggy")
95
96 if len(old_bugs) > 0:
97@@ -1653,6 +1666,7 @@
98 excuse.force()
99 update_candidate = True
100 run_autopkgtest = True
101+ run_boottest = True
102
103 # if the package can be updated, it is a valid candidate
104 if update_candidate:
105@@ -1662,6 +1676,7 @@
106 # TODO
107 excuse.addhtml("Not considered")
108 excuse.run_autopkgtest = run_autopkgtest
109+ excuse.run_boottest = run_boottest
110
111 self.excuses.append(excuse)
112 return update_candidate
113@@ -1895,7 +1910,7 @@
114 debug=boottest_debug)
115 for excuse in self.excuses:
116 # Skip already invalid excuses.
117- if not excuse.is_valid:
118+ if not excuse.run_boottest:
119 continue
120 # Also skip removals, binary-only candidates, proposed-updates
121 # and unknown versions.
122@@ -1927,7 +1942,7 @@
123 forces[0].user))
124 status = 'PASS'
125 statuses.add(status)
126- # No boottest attemps requested, it's not relevant in this
127+ # No boottest attempts requested, it's not relevant in this
128 # context, rely on other checks to judge promotion.
129 if not statuses:
130 continue
131
132=== removed file 'britney_boottest.conf'
133--- britney_boottest.conf 2015-01-19 19:59:19 +0000
134+++ britney_boottest.conf 1970-01-01 00:00:00 +0000
135@@ -1,70 +0,0 @@
136-# Configuration file for britney
137-
138-# Paths for control files
139-TESTING = data/%(SERIES)
140-UNSTABLE = data/%(SERIES)-proposed
141-PARTIAL_UNSTABLE = yes
142-
143-# Output
144-NONINST_STATUS = data/%(SERIES)/non-installable-status
145-EXCUSES_OUTPUT = output/%(SERIES)/excuses.html
146-EXCUSES_YAML_OUTPUT = output/%(SERIES)/excuses.yaml
147-UPGRADE_OUTPUT = output/%(SERIES)/output.txt
148-HEIDI_OUTPUT = output/%(SERIES)/HeidiResult
149-
150-# List of release architectures
151-ARCHITECTURES = amd64 arm64 armhf i386 powerpc ppc64el
152-
153-# if you're not in this list, arch: all packages are allowed to break on you
154-NOBREAKALL_ARCHES = amd64
155-
156-# if you're in this list, your packages may not stay in sync with the source
157-OUTOFSYNC_ARCHES =
158-
159-# if you're in this list, your uninstallability count may increase
160-BREAK_ARCHES =
161-
162-# if you're in this list, you are a new architecture
163-NEW_ARCHES =
164-
165-# priorities and delays
166-MINDAYS_LOW = 0
167-MINDAYS_MEDIUM = 0
168-MINDAYS_HIGH = 0
169-MINDAYS_CRITICAL = 0
170-MINDAYS_EMERGENCY = 0
171-DEFAULT_URGENCY = medium
172-
173-# hint permissions
174-HINTS_CJWATSON = ALL
175-HINTS_ADCONRAD = ALL
176-HINTS_KITTERMAN = ALL
177-HINTS_LANEY = ALL
178-HINTS_JRIDDELL = ALL
179-HINTS_STEFANOR = ALL
180-HINTS_STGRABER = ALL
181-HINTS_VORLON = ALL
182-HINTS_FREEZE = block block-all
183-
184-HINTS_UBUNTU-TOUCH/DIDROCKS = block unblock
185-HINTS_UBUNTU-TOUCH/EV = block unblock
186-HINTS_UBUNTU-TOUCH/KEN-VANDINE = block unblock
187-HINTS_UBUNTU-TOUCH/LOOL = block unblock
188-HINTS_UBUNTU-TOUCH/MATHIEU-TL = block unblock
189-HINTS_UBUNTU-TOUCH/OGRA = block unblock
190-
191-# support for old libraries in testing (smooth update)
192-# use ALL to enable smooth updates for all the sections
193-#
194-# naming a non-existent section will effectively disable new smooth
195-# updates but still allow removals to occur
196-SMOOTH_UPDATES = badgers
197-
198-REMOVE_OBSOLETE = no
199-
200-ADT_ENABLE = no
201-ADT_DEBUG = no
202-ADT_ARCHES = amd64 i386
203-
204-BOOTTEST_ENABLE = yes
205-BOOTTEST_DEBUG = yes
206
207=== modified file 'tests/test_boottest.py'
208--- tests/test_boottest.py 2015-01-30 22:57:35 +0000
209+++ tests/test_boottest.py 2015-01-30 22:57:35 +0000
210@@ -92,7 +92,15 @@
211 def setUp(self):
212 super(TestBoottestEnd2End, self).setUp()
213 self.britney_conf = os.path.join(
214- PROJECT_DIR, 'britney_boottest.conf')
215+ PROJECT_DIR, 'britney.conf')
216+ old_config = None
217+ with open(self.britney_conf, 'r') as fp:
218+ self.old_config = fp.read()
219+ config = self.old_config.replace(
220+ 'ADT_ENABLE = yes', 'ADT_ENABLE = no')
221+ with open(self.britney_conf, 'w') as fp:
222+ fp.write(config)
223+
224 self.data.add('libc6', False, {'Architecture': 'armhf'}),
225
226 self.data.add(
227@@ -110,6 +118,11 @@
228 'pyqt5:armhf 1.0',
229 ])
230
231+ def tearDown(self):
232+ """ Replace the old_config. """
233+ with open(self.britney_conf, 'w') as fp:
234+ fp.write(self.old_config)
235+
236 def create_manifest(self, lines):
237 """Create a manifest for this britney run context."""
238 path = os.path.join(

Subscribers

People subscribed via source and target branches