Autopkgtest.request(): Don't ignore excluded packages

We already handle the exclusions in tests_for_source() (and run the testing
version if appropriate), so don't unconditionally skip requests for those.

Adjust the TestAutoPkgTest.test_rdepends_unbuilt case to catch that: The "run
britney once to pick up previous results" was a thinko as this already
satisfies all tests for green 2.
bzr-import-20160707
Martin Pitt 10 years ago
parent 6c3dd0a3e2
commit 42e1ac635d

@ -414,9 +414,8 @@ class AutoPackageTest(object):
(['%s/%s' % i for i in packages], str(self.excludes)))
for src, ver in packages:
for (testsrc, testver) in self.tests_for_source(src, ver):
if testsrc not in self.excludes:
for arch in self.britney.options.adt_arches.split():
self.add_test_request(testsrc, testver, arch, src, ver)
for arch in self.britney.options.adt_arches.split():
self.add_test_request(testsrc, testver, arch, src, ver)
if self.britney.options.verbose:
for src, verinfo in self.requested_tests.items():

@ -374,16 +374,11 @@ lightgreen 1 i386 green 2
'series/i386/g/green/20150101_100200@': (0, 'green 2'),
'series/amd64/g/green/20150101_100201@': (0, 'green 2'),
}})
# run britney once to pick up previous results
self.do_test(
[('libgreen1', {'Version': '2', 'Source': 'green', 'Depends': 'libc6'}, 'autopkgtest')],
NOT_CONSIDERED)
os.unlink(self.fake_amqp)
# add unbuilt lightgreen; should run tests against the old version
self.data.add_src('lightgreen', True, {'Version': '2', 'Testsuite': 'autopkgtest'})
self.do_test(
[],
[('libgreen1', {'Version': '2', 'Source': 'green', 'Depends': 'libc6'}, 'autopkgtest')],
NOT_CONSIDERED,
[r'\bgreen\b.*>1</a> to .*>2<',
r'\blightgreen\b.*>1</a> to .*>2<',
@ -393,8 +388,12 @@ lightgreen 1 i386 green 2
r'lightgreen has no up-to-date binaries on any arch'],
['Valid candidate'])
# lightgreen's tests should not be triggered yet while it is unbuilt
self.assertEqual(self.amqp_requests, set())
self.assertEqual(
self.amqp_requests,
set(['debci-series-i386:green', 'debci-series-amd64:green',
'debci-series-i386:lightgreen', 'debci-series-amd64:lightgreen',
'debci-series-i386:darkgreen', 'debci-series-amd64:darkgreen']))
os.unlink(self.fake_amqp)
# now lightgreen 2 gets built, should trigger a new test run
self.swift.set_results({'autopkgtest-series': {

Loading…
Cancel
Save