diff --git a/py/test/dsession/masterslave.py b/py/test/dsession/masterslave.py index eb355477e..46ba87291 100644 --- a/py/test/dsession/masterslave.py +++ b/py/test/dsession/masterslave.py @@ -70,7 +70,13 @@ def install_slave(host, gateway, config): slavenode.run() """) 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 class SlaveNode(object): @@ -85,7 +91,9 @@ class SlaveNode(object): def run(self): 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.sendevent("hostup", makehostup(host)) try: diff --git a/py/test/plugin/pytest_pytester.py b/py/test/plugin/pytest_pytester.py index b38289c14..5008c5bc5 100644 --- a/py/test/plugin/pytest_pytester.py +++ b/py/test/plugin/pytest_pytester.py @@ -154,7 +154,8 @@ class TmpTestdir: if not args: args = (self.tmpdir,) config = self.config_preparse() - config.parse(list(args)) + args = list(args) + ["--basetemp=%s" % self.tmpdir.dirpath('basetemp')] + config.parse(args) return config def getitem(self, source, funcname="test_func"):