зеркало из https://github.com/mozilla/gecko-dev.git
Bug 636450 - add a --host-os option for remote testing scripts. r=ctalbert, a=NPOTB
This commit is contained in:
Родитель
9a3d4bc9bb
Коммит
33f1772d43
|
@ -130,7 +130,9 @@ class RemoteAutomation(Automation):
|
|||
dm = None
|
||||
def __init__(self, dm, cmd, stdout = None, stderr = None, env = None, cwd = '.'):
|
||||
self.dm = dm
|
||||
self.proc = dm.launchProcess(cmd, stdout, cwd, env)
|
||||
self.proc = dm.launchProcess(cmd, stdout, cwd, env, True)
|
||||
if (self.proc is None):
|
||||
raise Exception("unable to launch process")
|
||||
exepath = cmd[0]
|
||||
name = exepath.split('/')[-1]
|
||||
self.procName = name
|
||||
|
|
|
@ -257,6 +257,19 @@ class RemoteReftest(RefTest):
|
|||
remoteXrePath = options.xrePath
|
||||
remoteUtilityPath = options.utilityPath
|
||||
localAutomation = Automation()
|
||||
localAutomation.IS_WIN32 = False
|
||||
localAutomation.IS_LINUX = False
|
||||
localAutomation.IS_MAC = False
|
||||
localAutomation.UNIXISH = False
|
||||
hostos = sys.platform
|
||||
if (hostos == 'mac' or hostos == 'darwin'):
|
||||
localAutomation.IS_MAC = True
|
||||
elif (hostos == 'linux' or hostos == 'linux2'):
|
||||
localAutomation.IS_LINUX = True
|
||||
localAutomation.UNIXISH = True
|
||||
elif (hostos == 'win32' or hostos == 'win64'):
|
||||
localAutomation.BIN_SUFFIX = ".exe"
|
||||
localAutomation.IS_WIN32 = True
|
||||
|
||||
paths = [options.xrePath, localAutomation.DIST_BIN, self.automation._product, os.path.join('..', self.automation._product)]
|
||||
options.xrePath = self.findPath(paths)
|
||||
|
@ -325,8 +338,8 @@ class RemoteReftest(RefTest):
|
|||
RefTest.cleanup(self, profileDir)
|
||||
|
||||
def main():
|
||||
dm = DeviceManager(None, None)
|
||||
automation = RemoteAutomation(dm)
|
||||
dm_none = DeviceManager(None, None)
|
||||
automation = RemoteAutomation(dm_none)
|
||||
parser = RemoteOptions(automation)
|
||||
options, args = parser.parse_args()
|
||||
|
||||
|
|
|
@ -199,6 +199,19 @@ class MochiRemote(Mochitest):
|
|||
remoteProfilePath = options.profilePath
|
||||
remoteUtilityPath = options.utilityPath
|
||||
localAutomation = Automation()
|
||||
localAutomation.IS_WIN32 = False
|
||||
localAutomation.IS_LINUX = False
|
||||
localAutomation.IS_MAC = False
|
||||
localAutomation.UNIXISH = False
|
||||
hostos = sys.platform
|
||||
if (hostos == 'mac' or hostos == 'darwin'):
|
||||
localAutomation.IS_MAC = True
|
||||
elif (hostos == 'linux' or hostos == 'linux2'):
|
||||
localAutomation.IS_LINUX = True
|
||||
localAutomation.UNIXISH = True
|
||||
elif (hostos == 'win32' or hostos == 'win64'):
|
||||
localAutomation.BIN_SUFFIX = ".exe"
|
||||
localAutomation.IS_WIN32 = True
|
||||
|
||||
paths = [options.xrePath, localAutomation.DIST_BIN, self._automation._product, os.path.join('..', self._automation._product)]
|
||||
options.xrePath = self.findPath(paths)
|
||||
|
@ -268,8 +281,8 @@ class MochiRemote(Mochitest):
|
|||
|
||||
def main():
|
||||
scriptdir = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
|
||||
dm = devicemanager.DeviceManager(None, None)
|
||||
auto = RemoteAutomation(dm, "fennec")
|
||||
dm_none = devicemanager.DeviceManager(None, None)
|
||||
auto = RemoteAutomation(dm_none, "fennec")
|
||||
parser = RemoteOptions(auto, scriptdir)
|
||||
options, args = parser.parse_args()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче