From 42e1ac635ddbb339e5b4e857e6702f3685171886 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 14 Aug 2015 09:39:26 +0200 Subject: [PATCH] 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. --- autopkgtest.py | 5 ++--- tests/test_autopkgtest.py | 15 +++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/autopkgtest.py b/autopkgtest.py index c13f9c0..4fd18d5 100644 --- a/autopkgtest.py +++ b/autopkgtest.py @@ -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(): diff --git a/tests/test_autopkgtest.py b/tests/test_autopkgtest.py index 52622a3..2d69e69 100644 --- a/tests/test_autopkgtest.py +++ b/tests/test_autopkgtest.py @@ -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 to .*>2<', r'\blightgreen\b.*>1 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': {