зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1275774 - Add try-syntax parsing of email notifications to taskcluster r=dustin
MozReview-Commit-ID: 8ZXCNEvMDCg --HG-- extra : rebase_source : e527c725e5b35a5f6f7644cbd72eb450801d64ba
This commit is contained in:
Родитель
cdb0f1ed9b
Коммит
3984bade54
|
@ -170,7 +170,6 @@ RIDEALONG_BUILDS = {
|
|||
|
||||
TEST_CHUNK_SUFFIX = re.compile('(.*)-([0-9]+)$')
|
||||
|
||||
|
||||
class TryOptionSyntax(object):
|
||||
|
||||
def __init__(self, message, full_task_graph):
|
||||
|
@ -186,7 +185,8 @@ class TryOptionSyntax(object):
|
|||
- unittests: a list of tests, of the form given below, or None for all
|
||||
- jobs: a list of requested job names, or None for all
|
||||
- trigger_tests: the number of times tests should be triggered (--rebuild)
|
||||
- interactive; true if --interactive
|
||||
- interactive: true if --interactive
|
||||
- notifications: one of 'none', 'all', 'failure'
|
||||
|
||||
Note that -t is currently completely ignored.
|
||||
|
||||
|
@ -205,6 +205,7 @@ class TryOptionSyntax(object):
|
|||
self.talos = []
|
||||
self.trigger_tests = 0
|
||||
self.interactive = False
|
||||
self.notifications = 'none'
|
||||
|
||||
# shlex used to ensure we split correctly when giving values to argparse.
|
||||
parts = shlex.split(self.escape_whitespace_in_brackets(message))
|
||||
|
@ -227,6 +228,8 @@ class TryOptionSyntax(object):
|
|||
parser.add_argument('-t', '--talos', nargs='?', dest='talos', const='all', default='all')
|
||||
parser.add_argument('-i', '--interactive',
|
||||
dest='interactive', action='store_true', default=False)
|
||||
parser.add_argument('-e', '--all-emails', dest='notifications', action='store_const', const='all')
|
||||
parser.add_argument('-f', '--failure-emails', dest='notifications', action='store_const', const='failure')
|
||||
parser.add_argument('-j', '--job', dest='jobs', action='append')
|
||||
# In order to run test jobs multiple times
|
||||
parser.add_argument('--rebuild', dest='trigger_tests', type=int, default=1)
|
||||
|
@ -240,6 +243,7 @@ class TryOptionSyntax(object):
|
|||
self.talos = self.parse_test_option("talos_try_name", args.talos, full_task_graph)
|
||||
self.trigger_tests = args.trigger_tests
|
||||
self.interactive = args.interactive
|
||||
self.notifications = args.notifications or self.notifications
|
||||
|
||||
def parse_jobs(self, jobs_arg):
|
||||
if not jobs_arg or jobs_arg == ['all']:
|
||||
|
@ -542,4 +546,5 @@ class TryOptionSyntax(object):
|
|||
"jobs: " + none_for_all(self.jobs),
|
||||
"trigger_tests: " + str(self.trigger_tests),
|
||||
"interactive: " + str(self.interactive),
|
||||
"notifications: " + self.notifications,
|
||||
])
|
||||
|
|
Загрузка…
Ссылка в новой задаче