[Avocado-devel] avocado doesn't see plugins

Cleber Rosa crosa at redhat.com
Wed Jan 6 18:46:24 UTC 2016



----- Original Message -----
> From: "Andrei Stepanov" <astepano at redhat.com>
> To: "Lucas Meneghel Rodrigues" <lookkas at gmail.com>
> Cc: "avocado-devel" <avocado-devel at redhat.com>
> Sent: Wednesday, January 6, 2016 3:03:44 PM
> Subject: Re: [Avocado-devel] avocado doesn't see plugins
> 
> Thanks, it helps.
> 
> Above step definitely breaks system integrity. This is a bit unclear. Why do
> we install development version into system? Do we have some documentation
> that brings more light on this? Or some policy? Or.... I understand that
> Avocado is under active development, but, Is there some advice for Avocado
> users? What version should we use and develop for?


Andrei,

It's really a matter of registering the plugins.

In the pre 0.31.0 days, you'd have to `make link` to have the *external* plugins active, while the builtin ones would always be active.

We decided to break the limitation of having to have plugins living in the same Avocado tree (what `make link`) would do to external plugins. Also, we decided to not reinvent the wheel and rely on an external library to do all things plugin related. Being a developer yourself, and leveraging Avocado, you certainly know how and why we decided to use "someone else's" code.

We really tried to let our users know about what they should do when using 0.31.0 and later. Our release notes ( https://www.redhat.com/archives/avocado-devel/2015-December/msg00025.html ) state that 0.31.0 comes with: 

  "A completely new plugin architecture[2]. Now we offload all plugin
  discovery and loading to the Stevedore library. Avocado now defines
  precise (and simpler) interfaces for plugin writers. Please be aware
  that the public and documented interfaces for plugins, at the
  moment, allows adding new commands to the avocado command line app,
  or adding new options to existing commands. Other functionality can
  be achived by "abusing" the core avocado API from within
  plugins. Our goal is to expand the interfaces so that other areas of
  the framework can be extended just as easily."

Then it points to:

 http://avocado-framework.readthedocs.org/en/0.31.0/Plugins.html

Which, a few lines down at:

 http://avocado-framework.readthedocs.org/en/0.31.0/Plugins.html#registering-plugins

Mentions that:

 "Then, by running either $ python setup.py install or $ python setup.py develop
  your plugin should be visible to Avocado."

I sincerely apologize if this wasn't clear enough. I also recommend you watch
the mailing list, which happens to have received the same question and answer
a couple of days ago.

> 
> Spice-qe team uses Avocado from git, mainly because there is no RPMs for all
> OS versions/architectures/releases/betas/alphas/etc that we are interested
> in.
> 

This is fine, but I hope you're tracking the latest Avocado master on a CI system
or something like it. This is of course not because of Avocado itself, but because
every upgrade of every single piece of software can cause breakage.

> Could you give more information about setup.py step? Do I right understand,
> that you force us to install avocado into system? Before it NewYear it was
> possible to use Avocado directly from git repo (make links, all this
> configs), but not now. Did I miss something?

Please follow the Avocado documentation, then Stevedore's, then setuptools. Depending
on how deep you want to go, you'd have more answers and details.

And yes, as I wrote above, you missed a lot. But that's OK, it was the holiday season ;)

> 
> Sorry, if I wrote something wrong.
> 
> 
> On Wed, Jan 6, 2016 at 5:32 PM, Lucas Meneghel Rodrigues < lookkas at gmail.com
> > wrote:
> 
> 
> Did you do:
> 
> python setup.py install
> or
> python setup.py develop
> 
> In both the avocado source dir and the plugin dir?
> 
> On Wed, Jan 6, 2016 at 2:30 PM, Andrei Stepanov < astepano at redhat.com >
> wrote:
> > Hello
> > 
> > Any clue about :
> > 
> > pip list | grep stevedore
> > stevedore (1.10.0)
> > 
> > 
> > # ./scripts/avocado vt-bootstrap --vt-type spice --vt-no-downloads
> > --vt-update-config
> > usage: avocado [-h] [-v] [--config CONFIG_FILE] {} ...
> > avocado: error: argument subcommand: invalid choice: 'vt-bootstrap' (choose
> > from )
> > [root at spice-bkr02 avocado]#
> > 
> > # ./scripts/avocado --help
> > usage: avocado [-h] [-v] [--config CONFIG_FILE] {} ...
> > 
> > Avocado Test Runner
> > 
> > optional arguments:
> > -h, --help show this help message and exit
> > -v, --version show program's version number and exit
> > --config CONFIG_FILE Use custom configuration from a file
> > 
> > subcommands:
> > valid subcommands
> > 
> > {} subcommand help
> > 
> > 
> > 
> > _______________________________________________
> > Avocado-devel mailing list
> > Avocado-devel at redhat.com
> > https://www.redhat.com/mailman/listinfo/avocado-devel
> > 
> 
> 
> 
> --
> Lucas
> 
> 
> _______________________________________________
> Avocado-devel mailing list
> Avocado-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/avocado-devel
> 




More information about the Avocado-devel mailing list