Bug 1132676 - Add support for try appearning anywhere in commit r=garndt

This commit is contained in:
2015-02-23 22:22:48 -08:00
parent d2deb6d0d5
commit b60c9bf3b3
2 changed files with 46 additions and 3 deletions

View File

@@ -80,6 +80,44 @@ class TestCommitParser(unittest.TestCase):
result = parse_commit(commit, jobs)
self.assertEqual(expected, result)
def test_try_flag_in_middle_of_commit(self):
'''
The try command prefix may appear anywhere this test ensures that it
works in some common cases.
'''
commit = 'Bug XXX - I like cheese try: -b o -p all -u none wootbar'
jobs = {
'flags': {
'builds': ['linux', 'linux64'],
'tests': ['web-platform-tests'],
},
'builds': {
'linux': {
'types': {
'opt': {
'task': 'task/linux',
},
'debug': {
'task': 'task/linux-debug'
}
}
},
},
'tests': {}
}
expected = [
{
'task': 'task/linux',
'dependents': [],
'additional-parameters': {}
}
]
result = parse_commit(commit, jobs)
self.assertEqual(expected, result)
def test_commit_all_builds_no_tests(self):
'''
This test covers the case of all builds but no tests passed -u none