Revert "Rename autopkgtest related hints"

This reverts commit a07fa9f907.

The new names are just as unhelpful and confusing as the old ones.
Undo for now.
ubuntu/rebased
Niels Thykier 7 years ago
parent a07fa9f907
commit 37f02d611c

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

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

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

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

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

Loading…
Cancel
Save