[svn r62995] try to contain session test tempdirs in one parent
--HG-- branch : trunk
This commit is contained in:
parent
8a8ae5fe5d
commit
c8d679ac95
|
@ -70,7 +70,13 @@ def install_slave(host, gateway, config):
|
||||||
slavenode.run()
|
slavenode.run()
|
||||||
""")
|
""")
|
||||||
channel = PickleChannel(channel)
|
channel = PickleChannel(channel)
|
||||||
channel.send((host, config))
|
basetemp = None
|
||||||
|
if host.type == "popen":
|
||||||
|
popenbase = config.ensuretemp("popen")
|
||||||
|
basetemp = py.path.local.make_numbered_dir(prefix="slave-",
|
||||||
|
keep=0, rootdir=popenbase)
|
||||||
|
basetemp = str(basetemp)
|
||||||
|
channel.send((host, config, basetemp))
|
||||||
return channel
|
return channel
|
||||||
|
|
||||||
class SlaveNode(object):
|
class SlaveNode(object):
|
||||||
|
@ -85,7 +91,9 @@ class SlaveNode(object):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
channel = self.channel
|
channel = self.channel
|
||||||
host, self.config = channel.receive()
|
host, self.config, basetemp = channel.receive()
|
||||||
|
if basetemp:
|
||||||
|
self.config.basetemp = py.path.local(basetemp)
|
||||||
self.config.pytestplugins.do_configure(self.config)
|
self.config.pytestplugins.do_configure(self.config)
|
||||||
self.sendevent("hostup", makehostup(host))
|
self.sendevent("hostup", makehostup(host))
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -154,7 +154,8 @@ class TmpTestdir:
|
||||||
if not args:
|
if not args:
|
||||||
args = (self.tmpdir,)
|
args = (self.tmpdir,)
|
||||||
config = self.config_preparse()
|
config = self.config_preparse()
|
||||||
config.parse(list(args))
|
args = list(args) + ["--basetemp=%s" % self.tmpdir.dirpath('basetemp')]
|
||||||
|
config.parse(args)
|
||||||
return config
|
return config
|
||||||
|
|
||||||
def getitem(self, source, funcname="test_func"):
|
def getitem(self, source, funcname="test_func"):
|
||||||
|
|
Loading…
Reference in New Issue