Rename autopkgtest related hints

Signed-off-by: Niels Thykier <niels@thykier.net>
ubuntu/rebased
Niels Thykier 7 years ago
parent bfa5c9f191
commit a07fa9f907

@ -68,7 +68,7 @@ HINTS_KIBI = STANDARD
HINTS_JMW = STANDARD
HINTS_IVODD = STANDARD force force-hint
HINTS_POCHU = STANDARD force force-hint
HINTS_ELBRUS = force-skiptest force-badtest
HINTS_ELBRUS = ignore-autopkgtest ignore-reverse-tests
HINTS_FREEZE = block block-all block-udeb
HINTS_FREEZE-EXCEPTION = unblock unblock-udeb
HINTS_SATBRITNEY = easy

@ -243,7 +243,7 @@ class Britney(object):
"""
HINTS_HELPERS = ("easy", "hint", "remove", "block", "block-udeb", "unblock", "unblock-udeb", "approve",
"remark", "ignore-piuparts", "ignore-rc-bugs", "force-skiptest", "force-badtest")
"remark", "ignore-piuparts", "ignore-rc-bugs", "ignore-autopkgtest", "ignore-reverse-tests")
HINTS_STANDARD = ("urgent", "age-days") + HINTS_HELPERS
# ALL = {"force", "force-hint", "block-all"} | HINTS_STANDARD | registered policy hints (not covered above)
HINTS_ALL = ('ALL')

@ -106,8 +106,10 @@ class AutopkgtestPolicy(BasePolicy):
self.logger.info("Ignoring ADT_ARCHES %s as it is not in architectures list", arch)
def register_hints(self, hint_parser):
hint_parser.register_hint_type('force-badtest', britney2.hints.split_into_one_hint_per_package)
hint_parser.register_hint_type('force-skiptest', britney2.hints.split_into_one_hint_per_package)
hint_parser.register_hint_type('ignore-reverse-tests', britney2.hints.split_into_one_hint_per_package,
aliases=['force-badtest'])
hint_parser.register_hint_type('ignore-autopkgtest', britney2.hints.split_into_one_hint_per_package,
aliases=['force-skiptest'])
def initialise(self, britney):
super().initialise(britney)
@ -334,7 +336,7 @@ class AutopkgtestPolicy(BasePolicy):
if verdict != PolicyVerdict.PASS:
# check for force-skiptest hint
hints = self.hints.search('force-skiptest', package=source_name, version=source_data_srcdist.version)
hints = self.hints.search('ignore-autopkgtest', package=source_name, version=source_data_srcdist.version)
if hints:
excuse.addreason('skiptest')
excuse.addhtml("Should wait for tests relating to %s %s, but forced by %s" %
@ -866,9 +868,9 @@ class AutopkgtestPolicy(BasePolicy):
return (result, ver, run_id, url)
def has_force_badtest(self, src, ver, arch):
'''Check if src/ver/arch has a force-badtest hint'''
"""Check if src/ver/arch has a ignore-reverse-tests hint"""
hints = self.hints.search('force-badtest', package=src)
hints = self.hints.search('ignore-reverse-tests', package=src)
if hints:
self.logger.info('Checking hints for %s/%s/%s: %s', src, ver, arch, [str(h) for h in hints])
for hint in hints:

@ -66,7 +66,7 @@ HINTS_KIBI = STANDARD
HINTS_JMW = STANDARD
HINTS_IVODD = STANDARD
HINTS_POCHU = STANDARD force
HINTS_ELBRUS = force-skiptest force-badtest
HINTS_ELBRUS = ignore-autopkgtest ignore-reverse-tests
HINTS_FREEZE = block block-all block-udeb
HINTS_FREEZE-EXCEPTION = unblock unblock-udeb
HINTS_SATBRITNEY = easy

@ -1151,7 +1151,7 @@ class T(TestBase):
'testing/i386/b/black/20150102_100000@': (99, 'black blacklisted', tr('black/2')),
}})
self.create_hint('autopkgtest', 'force-badtest black/blacklisted')
self.create_hint('autopkgtest', 'ignore-reverse-tests black/blacklisted')
self.run_it(
[('black', {'Version': '2'}, 'autopkgtest')],
@ -1664,8 +1664,8 @@ class T(TestBase):
# Tests for hint processing
################################################################
def test_hint_force_badtest(self):
'''force-badtest hint'''
def test_hint_ignore_reverse_tests(self):
"""ignore-reverse-tests hint"""
self.data.add_default_packages(green=False)
@ -1680,7 +1680,7 @@ class T(TestBase):
'testing/amd64/g/green/20150101_100200@': (0, 'green 2', tr('green/2')),
}})
self.create_hint('autopkgtest', 'force-badtest lightgreen/1')
self.create_hint('autopkgtest', 'ignore-reverse-tests lightgreen/1')
self.run_it(
[('libgreen1', {'Version': '2', 'Source': 'green', 'Depends': 'libc6'}, 'autopkgtest')],
@ -1692,8 +1692,8 @@ class T(TestBase):
{'green': [('old-version', '1'), ('new-version', '2')]
})
def test_hint_force_badtest_multi_version(self):
'''force-badtest hint'''
def test_hint_ignore_reverse_tests_multi_version(self):
"""ignore-reverse-tests hint"""
self.data.add_default_packages(green=False)
@ -1708,7 +1708,7 @@ class T(TestBase):
'testing/amd64/g/green/20150101_100200@': (0, 'green 2', tr('green/2')),
}})
self.create_hint('autopkgtest', 'force-badtest lightgreen/1')
self.create_hint('autopkgtest', 'ignore-reverse-tests lightgreen/1')
self.run_it(
[('libgreen1', {'Version': '2', 'Source': 'green', 'Depends': 'libc6'}, 'autopkgtest')],
@ -1722,7 +1722,7 @@ class T(TestBase):
})
# hint the version on amd64 too
self.create_hint('autopkgtest', 'force-badtest lightgreen/2')
self.create_hint('autopkgtest', 'ignore-reverse-tests lightgreen/2')
self.run_it(
[],
@ -1735,8 +1735,8 @@ class T(TestBase):
{'green': [('old-version', '1'), ('new-version', '2')]
})
def test_hint_force_badtest_different_version(self):
'''force-badtest hint with non-matching version'''
def test_hint_ignore_reverse_tests_different_version(self):
"""ignore-reverse-tests hint with non-matching version"""
self.data.add_default_packages(green=False)
@ -1752,7 +1752,7 @@ class T(TestBase):
}})
# lower hint version should not apply
self.create_hint('autopkgtest', 'force-badtest lightgreen/0.1')
self.create_hint('autopkgtest', 'ignore-reverse-tests lightgreen/0.1')
exc = self.run_it(
[('libgreen1', {'Version': '2', 'Source': 'green', 'Depends': 'libc6'}, 'autopkgtest')],
@ -1766,7 +1766,7 @@ class T(TestBase):
self.assertNotIn('forced-reason', exc['green'])
# higher hint version should apply
self.create_hint('autopkgtest', 'force-badtest lightgreen/3')
self.create_hint('autopkgtest', 'ignore-reverse-tests lightgreen/3')
self.run_it(
[],
{'green': (True, {'green/2': {'amd64': 'PASS', 'i386': 'PASS'},
@ -1777,8 +1777,8 @@ class T(TestBase):
{}
)
def test_hint_force_badtest_arch(self):
'''force-badtest hint for architecture instead of version'''
def test_hint_ignore_reverse_tests_arch(self):
"""ignore-reverse-tests hint for architecture instead of version"""
self.data.add_default_packages(green=False)
@ -1793,7 +1793,7 @@ class T(TestBase):
'testing/amd64/g/green/20150101_100200@': (0, 'green 2', tr('green/2')),
}})
self.create_hint('autopkgtest', 'force-badtest lightgreen/amd64/all')
self.create_hint('autopkgtest', 'ignore-reverse-tests lightgreen/amd64/all')
self.run_it(
[('libgreen1', {'Version': '2', 'Source': 'green', 'Depends': 'libc6'}, 'autopkgtest')],
@ -1806,7 +1806,7 @@ class T(TestBase):
})
# hint i386 too, then it should become valid
self.create_hint('autopkgtest', 'force-badtest lightgreen/i386/all')
self.create_hint('autopkgtest', 'ignore-reverse-tests lightgreen/i386/all')
self.run_it(
[],
@ -1818,8 +1818,8 @@ class T(TestBase):
{'green': [('old-version', '1'), ('new-version', '2')]
})
def test_hint_force_badtest_running(self):
'''force-badtest hint on running test'''
def test_hint_ignore_reverse_tests_running(self):
"""ignore-reverse-tests hint on running test"""
self.data.add_default_packages(green=False)
@ -1832,7 +1832,7 @@ class T(TestBase):
'testing/amd64/g/green/20150101_100200@': (0, 'green 2', tr('green/2')),
}})
self.create_hint('autopkgtest', 'force-badtest lightgreen/1')
self.create_hint('autopkgtest', 'ignore-reverse-tests lightgreen/1')
self.run_it(
[('libgreen1', {'Version': '2', 'Source': 'green', 'Depends': 'libc6'}, 'autopkgtest')],
@ -1844,12 +1844,12 @@ class T(TestBase):
{'green': [('old-version', '1'), ('new-version', '2')]
})
def test_hint_force_skiptest(self):
'''force-skiptest hint'''
def test_hint_ignore_autopkgtest(self):
"""ignore-autopkgtest hint"""
self.data.add_default_packages(green=False)
self.create_hint('autopkgtest', 'force-skiptest green/2')
self.create_hint('autopkgtest', 'ignore-autopkgtest green/2')
# regression of green, darkgreen ok, lightgreen running
self.swift.set_results({'autopkgtest-testing': {
@ -1870,8 +1870,8 @@ class T(TestBase):
('excuses', 'Should wait for tests relating to green 2, but forced by autopkgtest')]
})
def test_hint_force_skiptest_different_version(self):
'''force-skiptest hint with non-matching version'''
def test_hint_ignore_autopkgtest_different_version(self):
"""ignore-autopkgtest hint with non-matching version"""
self.data.add_default_packages(green=False)
@ -1880,7 +1880,7 @@ class T(TestBase):
'testing/i386/g/green/20150101_100000@': (0, 'green 1', tr('passedbefore/1')),
}})
self.create_hint('autopkgtest', 'force-skiptest green/1')
self.create_hint('autopkgtest', 'ignore-autopkgtest green/1')
exc = self.run_it(
[('libgreen1', {'Version': '2', 'Source': 'green', 'Depends': 'libc6'}, 'autopkgtest')],
{'green': (False, {'green': {'amd64': 'RUNNING-ALWAYSFAIL', 'i386': 'RUNNING'},

Loading…
Cancel
Save