avocado.test: Support params passing to DropinTests

This patch injects all params as env variables to
DropinTests. This is very useful for multiplexing
these tests.

Additionally the env_variables.sh example test was
adjusted to print CUSTOM_VARIABLE, which can be used
in selftest.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Merge pull request #288 from ldoktor/envtest

avocado.test: Support params passing to DropinTests [v2]
avocado.job: Fix deadlock in TestRunner.run()

multiprocessing.Queue().put() is asynchronous and in case the test died
critically before the put() was executed, TestRunner.run() waited for
infinity for early_state. This patch uses
multiprocessing.queues.SimpleQueue(), where it's guaranteed that after
executing put() the data are already in the SimpleQueue.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Merge branch 'ldoktor_abort_hang'
avocado: Print config file paths in datadir and list subcommands

It is useful information to the user where the config file
is, to reinforce where avocado is picking the default values.
So add it to the output of `datadir` and `list` subcommands.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.plugin: Visual plugin output tweaks

Get to a more toned down output for the subcommands
'datadir', 'plugins' and 'list'.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.plugins.plugin: Add parser attribute to Plugin object

This way we define more clearly the attributes of the
plugin object (many of them will implement a parser
object).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.plugins: Split sysinfo and test_lister plugins

Put the sysinfo and test_lister plugins into separate
plugin files. Although not strictly necessary, the
neat 1 plugin - 1 source file relation makes things
organized and easy to understand.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.settings: Use local version of config file over system wide

If not available, one local config file will be created
from the system wide one.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado: Move settings.ini to avocado.conf

As discussed in the Trello card

https://trello.com/c/WsDMg7RP/161-initial-support-for-avocado-config-files-server-and-client

Move settings.ini to avocado.conf. The basic idea is
that the name is more intuitive.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.plugins: Add config plugin

Add the config plugin, that introduces the 'config'
subcommand. This shows to the user the config keys
available in the system.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
etc/avocado.conf: Use /var/tmp/avocado instead of /tmp
avocado.settings: Read from both system wide and user config

Whatever is in the system wide settings can be later
overriden by users. Also, change the settings.config_path
attribute to settings.config_paths, and change it to
a list. This way users can see the order in which their
config files are parsed.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado: Add etc/avocado/conf.d directory

Introduce a system wide conf.d directory, that
is supposed to ship config files for avocado
plugins. The order for config parsing is:

 * System wide avocado config (/etc/avocado/avocado.conf)
 * System wide avocado plugins config (/etc/avocado/conf.d/*.conf)
 * Local config for the user running avocado (~/.config/avocado/avocado.conf)

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
docs: Add Configuration documentation

Add a section that explains how the avocado config system
works.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>