[Avocado-devel] Avocado related questions

Lukáš Doktor ldoktor at redhat.com
Mon Feb 25 10:53:30 UTC 2019


Dne 22. 02. 19 v 18:09 Junchao Zhang napsal(a):
> Dear avocado development team,
> 
> My name is Kimi. Currently I am working on Linux development. Our team used Autotest before. Currently I am trying to use Avocado. It is really a great framework. I have some questions that hope you can help me with.
> 
> 1. Since I do not want to do installation on our arm system, I tried to manually run avocado.
> I copied the avocado script ~/.local/bin/avocado and added necessary packages on the device. Then I can successfully running "python SCRIPT_NAME". But looks like there is no subcommands options available. 
> subcommands:
>   valid subcommands
> 
>   {}                    subcommand help
> 
> Did I miss something so that I can do "python SCRIPT_NAME run"?
> 
> 2. When I tried avocado on my Ubuntu, it works fine. The only issue is there isn't any tests available when I run "Avocado list". I just followed the instructions on online doc.
> 
> Hope to hear back from you soon!
> 
> Thanks,
> Junchao

Dear Kimi,

Avocado uses stevedore as a plugin system which uses setuptools entry points https://avocado-framework.readthedocs.io/en/latest/Plugins.html#registering-plugins to discover available plugins.

To setup Avocado for development you can simply clone the git repo to any location and use `python setup.py develop --user` (user means use "~/.local" and not "/usr") or simply by our `make develop` or `make link` makefile target (see `make help` for details), which creates "links" in "~/.local/lib". The difference in "install" vs. "develop" is that it won't copy the scripts, it simply tells python that this library is located in this directory, therefor any change in your cloned directory is propagated (apart from new/renamed entry-points which requires to re-execute "make develop").

Note the "develop" puts "avocado" binary to "~/.local/bin/avocado". Using it usually requires extending the PATH, or executing "python3 scripts/avocado" from the cloned git location.

Last but not least, details on installing from git are here: https://avocado-framework.readthedocs.io/en/latest/GetStartedGuide.html#generic-installation-from-a-git-repository

Happy hacking,
Lukáš

PS: Not sure what you require in your testing, there are two debts we have compare to Autotest and that is multi-host testing https://trello.com/c/AnoH6vhP/530-rfc-multiple-machine-support-for-tests and tests surviving host reboot https://trello.com/c/mzhpqQyx/1233-add-avocado-service-to-allow-reboot-between-test-communication-and-even-safer-funcatexit

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20190225/91e6c5e5/attachment.sig>


More information about the Avocado-devel mailing list