зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1312739 - Use ALL_FLAVORS dict when running mochitest from an interactive loaner, r=jmaher
MozReview-Commit-ID: Kpxepe9KecV --HG-- extra : rebase_source : f561c034408e1aedb9318fcc8457b961aeef1668
This commit is contained in:
Родитель
0e7b157538
Коммит
0dae445678
|
@ -18,12 +18,23 @@ parser = None
|
|||
|
||||
|
||||
def run_mochitest(context, **kwargs):
|
||||
from mochitest_options import ALL_FLAVORS
|
||||
flavor = kwargs.get('flavor') or 'mochitest'
|
||||
if flavor not in ALL_FLAVORS:
|
||||
for fname, fobj in ALL_FLAVORS.iteritems():
|
||||
if flavor in fobj['aliases']:
|
||||
flavor = fname
|
||||
break
|
||||
fobj = ALL_FLAVORS[flavor]
|
||||
kwargs.update(fobj.get('extra_args', {}))
|
||||
|
||||
args = Namespace(**kwargs)
|
||||
args.e10s = context.mozharness_config.get('e10s', args.e10s)
|
||||
args.certPath = context.certs_dir
|
||||
|
||||
if args.test_paths:
|
||||
test_root = os.path.join(context.package_root, 'mochitest', 'tests')
|
||||
install_subdir = fobj.get('install_subdir', fobj['suite'])
|
||||
test_root = os.path.join(context.package_root, 'mochitest', install_subdir)
|
||||
normalize = partial(context.normalize_test_path, test_root)
|
||||
args.test_paths = map(normalize, args.test_paths)
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ ALL_FLAVORS = {
|
|||
'enabled_apps': ('firefox', 'android'),
|
||||
'extra_args': {
|
||||
'flavor': 'plain',
|
||||
}
|
||||
},
|
||||
'install_subdir': 'tests',
|
||||
},
|
||||
'chrome': {
|
||||
'suite': 'chrome',
|
||||
|
|
Загрузка…
Ссылка в новой задаче