mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1343361 - Auomatically replace -u all
with a set of suites that do not include compiled tests when requesting an artifact build via |./mach try|. r=maja_zf
MozReview-Commit-ID: BYgzbYrbw7E --HG-- extra : rebase_source : be8c202361fcef0a47983371d370b1ace27cecbe
This commit is contained in:
parent
ac26ac7873
commit
3ec42b2050
@ -408,6 +408,19 @@ class AutoTry(object):
|
||||
raise ValueError("You can't run {} with "
|
||||
"--artifact option.".format(', '.join(rejected)))
|
||||
|
||||
if extras.get('artifact') and 'all' in suites.keys():
|
||||
non_compiled_suites = set(self.common_suites) - set(self.compiled_suites)
|
||||
message = ('You asked for |-u all| with |--artifact| but compiled-code tests ({tests})'
|
||||
' can\'t run against an artifact build. Running (-u {non_compiled_suites}) '
|
||||
'instead.')
|
||||
string_format = {
|
||||
'tests': ','.join(self.compiled_suites),
|
||||
'non_compiled_suites': ','.join(non_compiled_suites),
|
||||
}
|
||||
print(message.format(**string_format))
|
||||
del suites['all']
|
||||
suites.update({suite_name: None for suite_name in non_compiled_suites})
|
||||
|
||||
parts.append("-u")
|
||||
parts.append(",".join("%s%s" % (k, "[%s]" % ",".join(v) if v else "")
|
||||
for k,v in sorted(suites.items())) if suites else "none")
|
||||
@ -438,19 +451,6 @@ class AutoTry(object):
|
||||
parts.append(arg)
|
||||
|
||||
try_syntax = " ".join(parts)
|
||||
if extras.get('artifact') and 'all' in suites.keys():
|
||||
message = ('You asked for |-u all| with |--artifact| but compiled-code tests ({tests})'
|
||||
' can\'t run against an artifact build. Try listing the suites you want'
|
||||
' instead. For example, this syntax covers most suites:\n{try_syntax}')
|
||||
string_format = {
|
||||
'tests': ','.join(self.compiled_suites),
|
||||
'try_syntax': try_syntax.replace(
|
||||
'-u all',
|
||||
'-u ' + ','.join(sorted(set(self.common_suites) - set(self.compiled_suites)))
|
||||
)
|
||||
}
|
||||
raise ValueError(message.format(**string_format))
|
||||
|
||||
return try_syntax
|
||||
|
||||
def _run_git(self, *args):
|
||||
|
Loading…
Reference in New Issue
Block a user