[py-dev] distributed test slave activation of external plugin

holger krekel holger at merlinux.eu
Mon Apr 26 11:41:09 CEST 2010


Hi Meme, 

On Mon, Apr 26, 2010 at 14:49 +1000, meme dough wrote:
> Hi,
> 
> Is there any way to activate external plugins for distributed testing
> on the slave side?

it is usually done through "proper" installation or command line specification. 

> Currently pytest-cov requires that it is installed on the slave
> version of python.  This differs from pytest-xdist that will rsync
> itself across, such that the only requirement on the slave side is
> python.

execnet and pytest-xdist are pure-python libs and known to work 
from just being transfered on a directory-level.  This is often not
true for packages requiring C-extensions. 

> If pytest-cov is not installed on the slave then the master has sent
> the slaveinput but the plugin is never activated on the slave hence no
> coverage.

Yes, but currently you need to have the 'coverage' package installed anyway. 
 
> I can rsync pytest-cov over to the slave in same way as py / xdist
> already get done but unknown if I can activate the plugin.

We need a way to setup "remote" environments in a more local more controlled
manner.  This is a major step i'd like to take with xdist: configure automatic 
'virtualenv' environments remotely, installing dependencies as needed.  It would
then be just a matter of ensuring 'pytest-cov' is in the dep list. 
Installed plugins are automatically discovered through the "standard"
setuptools entry points. 

> A separate but related issue:  It would be good to have some way (cmd
> line / conftest / api) to tell xdist not to rsync py / xdist to the
> slave.  The case is needed for the client code where it take care of
> all rsync so second rsync by xdist produce the warning about to two py
> and two xdist on path.

I suggest we move to use an 'xdist.ini' file where this could be specified.  
There we would also specify the virtualenvironments and global and specific 
package dependencies.  The code that reads this config file and sets
up environments should probably be useable outside of pytest as well - 
it'd be a nice aid for automatic config/install/control of app installs. 

holger



More information about the Pytest-dev mailing list