Add version-independent per-architecture force-badtest hints

Some tests are known-broken on a particular architecture only.
force-badtest'ing the entire version is overzealous as it hides regressions on
the other architectures that we expect to work. It's also hard to maintain as
the version has to be bumped constantly.

Support hints of the form "force-badtest srcpkg/architecture/all" (e. g.
"force-badtest chromium-browser/armhf/all"). The special version "all" will
match any version.
bzr-import-20160707
Martin Pitt 9 years ago
parent 4fa1220bfd
commit f056f2afce

@ -601,7 +601,7 @@ class AutoPackageTest(object):
self.log_verbose('Checking hints for %s/%s/%s: %s' % (testsrc, testver, arch, [str(h) for h in hints]))
for hint in hints:
if [mi for mi in hint.packages if mi.architecture in ['source', arch] and
same_source(mi.version, testver)]:
(mi.version == 'all' or same_source(mi.version, testver))]:
result = 'IGNORE-FAIL'
break
else:

@ -1330,6 +1330,45 @@ class T(TestBase):
)[1]
self.assertNotIn('forced-reason', exc['green'])
def test_hint_force_badtest_arch(self):
'''force-badtest hint for architecture instead of version'''
self.swift.set_results({'autopkgtest-series': {
'series/i386/d/darkgreen/20150101_100000@': (0, 'darkgreen 1', tr('green/2')),
'series/amd64/d/darkgreen/20150101_100000@': (0, 'darkgreen 1', tr('green/2')),
'series/i386/l/lightgreen/20150101_100100@': (0, 'lightgreen 1', tr('green/1')),
'series/i386/l/lightgreen/20150101_100101@': (4, 'lightgreen 1', tr('green/2')),
'series/amd64/l/lightgreen/20150101_100100@': (0, 'lightgreen 1', tr('green/1')),
'series/amd64/l/lightgreen/20150101_100101@': (4, 'lightgreen 1', tr('green/2')),
'series/i386/g/green/20150101_100200@': (0, 'green 2', tr('green/2')),
'series/amd64/g/green/20150101_100200@': (0, 'green 2', tr('green/2')),
}})
self.create_hint('pitti', 'force-badtest lightgreen/amd64/all')
self.do_test(
[('libgreen1', {'Version': '2', 'Source': 'green', 'Depends': 'libc6'}, 'autopkgtest')],
{'green': (False, {'green 2': {'amd64': 'PASS', 'i386': 'PASS'},
'lightgreen 1': {'amd64': 'IGNORE-FAIL', 'i386': 'REGRESSION'},
'darkgreen 1': {'amd64': 'PASS', 'i386': 'PASS'},
}),
},
{'green': [('old-version', '1'), ('new-version', '2')]
})
# hint i386 too, then it should become valid
self.create_hint('pitti', 'force-badtest lightgreen/i386/all')
self.do_test(
[],
{'green': (True, {'green 2': {'amd64': 'PASS', 'i386': 'PASS'},
'lightgreen 1': {'amd64': 'IGNORE-FAIL', 'i386': 'IGNORE-FAIL'},
'darkgreen 1': {'amd64': 'PASS', 'i386': 'PASS'},
}),
},
{'green': [('old-version', '1'), ('new-version', '2')]
})
def test_hint_force_skiptest(self):
'''force-skiptest hint'''

Loading…
Cancel
Save