Bug 890098 - Follow-up: Always set the plugins dir. r=jgriffin
This commit is contained in:
@@ -259,6 +259,9 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
|
|||||||
return self.remoteTmpDir
|
return self.remoteTmpDir
|
||||||
|
|
||||||
def setupPluginsDir(self):
|
def setupPluginsDir(self):
|
||||||
|
if not os.path.isdir(self.pluginsPath):
|
||||||
|
return None
|
||||||
|
|
||||||
# making sure tmp dir is set up
|
# making sure tmp dir is set up
|
||||||
self.setupTempDir()
|
self.setupTempDir()
|
||||||
|
|
||||||
|
|||||||
@@ -238,11 +238,15 @@ class XPCShellTests(object):
|
|||||||
if self.debuggerInfo:
|
if self.debuggerInfo:
|
||||||
self.xpcsCmd = [self.debuggerInfo["path"]] + self.debuggerInfo["args"] + self.xpcsCmd
|
self.xpcsCmd = [self.debuggerInfo["path"]] + self.debuggerInfo["args"] + self.xpcsCmd
|
||||||
|
|
||||||
if self.pluginsPath:
|
# Automation doesn't specify a pluginsPath and xpcshell defaults to
|
||||||
self.pluginsDir = self.setupPluginsDir()
|
# $APPDIR/plugins. We do the same here so we can carry on with
|
||||||
|
# setting up every test with its own plugins directory.
|
||||||
|
if not self.pluginsPath:
|
||||||
|
self.pluginsPath = os.path.join(self.appPath, 'plugins')
|
||||||
|
|
||||||
|
self.pluginsDir = self.setupPluginsDir()
|
||||||
|
if self.pluginsDir:
|
||||||
self.xpcsCmd.extend(['-p', self.pluginsDir])
|
self.xpcsCmd.extend(['-p', self.pluginsDir])
|
||||||
else:
|
|
||||||
self.pluginsDir = None
|
|
||||||
|
|
||||||
def buildTestPath(self):
|
def buildTestPath(self):
|
||||||
"""
|
"""
|
||||||
@@ -294,6 +298,9 @@ class XPCShellTests(object):
|
|||||||
list(sanitize_list(test['tail'], 'tail')))
|
list(sanitize_list(test['tail'], 'tail')))
|
||||||
|
|
||||||
def setupPluginsDir(self):
|
def setupPluginsDir(self):
|
||||||
|
if not os.path.isdir(self.pluginsPath):
|
||||||
|
return None
|
||||||
|
|
||||||
pluginsDir = mkdtemp()
|
pluginsDir = mkdtemp()
|
||||||
# shutil.copytree requires dst to not exist. Deleting the tempdir
|
# shutil.copytree requires dst to not exist. Deleting the tempdir
|
||||||
# would make a race condition possible in a concurrent environment,
|
# would make a race condition possible in a concurrent environment,
|
||||||
|
|||||||
Reference in New Issue
Block a user