Bug 1550515 - [mochitest] Don't 'keep_open' a single mochitest when using --headless, r=gbrown

Differential Revision: https://phabricator.services.mozilla.com/D30536

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew Halberstadt 2019-05-09 19:07:57 +00:00
Родитель 83f3eb6488
Коммит 4b124524c7
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -140,8 +140,10 @@ class MochitestRunner(MozbuildObject):
# refresh the page to pick up modifications. Therefore leave the browser
# open if only running a single mochitest-plain test. This behaviour can
# be overridden by passing in --keep-open=false.
flavor = getattr(options, 'flavor', 'plain')
if len(tests) == 1 and options.keep_open is None and flavor == 'plain':
if (len(tests) == 1
and options.keep_open is None
and not options.headless
and getattr(options, 'flavor', 'plain') == 'plain'):
options.keep_open = True
# We need this to enable colorization of output.