Bug 1659568 - [mozrunner] Only add --wait-for-browser to cmdargs if it's absent. r=ahal

And make a copy of the passed in cmdargs so we don't modify the calling
program's copy.

Differential Revision: https://phabricator.services.mozilla.com/D96646
This commit is contained in:
Ian Moody 2020-11-12 15:05:34 +00:00
Родитель 9bb4dfd983
Коммит 69b1b534ab
1 изменённых файлов: 9 добавлений и 4 удалений

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

@ -4,6 +4,7 @@
from __future__ import absolute_import
import copy
import mozinfo
import os
import sys
@ -23,11 +24,15 @@ class GeckoRuntimeRunner(BaseRunner):
BaseRunner.__init__(self, **runner_args)
self.binary = binary
self.cmdargs = cmdargs or []
self.cmdargs = copy.copy(cmdargs) or []
if mozinfo.isWin and (
isinstance(self.app_ctx, FirefoxContext)
or isinstance(self.app_ctx, DefaultContext)
if (
mozinfo.isWin
and (
isinstance(self.app_ctx, FirefoxContext)
or isinstance(self.app_ctx, DefaultContext)
)
and "--wait-for-browser" not in self.cmdargs
):
# The launcher process is present in this configuration. Always
# pass this flag so that we can wait for the browser to complete