avocado.runner: New module with TestRunner class inside.

Creates the module `avocado.runner` where the `TestRunner` class lives.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
avocado.job: Remove TestRunner class.

Remove TestRunner class from this module, it's now defined inside new
module `avocado.runner`.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
avocado.plugins: Plugins vm and remote uses avocado.runner module.

Change plugins vm and remote to use new module `avocado.runner`
that contains the TestRunner class.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Merge pull request #294 from ruda/refactory_job_and_runner_modules

Move class TestRunner inside avocado.job into a proper new module avocado.runner
avocado.plugins: Fix garbage output on remote and vm plugins.

When using the remote or vm plugins, the JSON (or XML) result from
the remote server is coming with garbage at the end.
This commit fix this by filtering the result.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Merge pull request #299 from ruda/fix_bad_input_for_remote_vm

Fix garbage output on remote and vm plugins.
Rename "drop-in test" (Dropin) to "simple test" (SimpleTest).

Due the concept of "drop-in" tests didn't match the actual
purpose of running any script or binary as a test in Avocado, we're
going to use the term "simple test" (defined in SimpleTest class)
to contrast with "native test", which are Python modules that
uses Avocado's API.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
avocado.settings: If local config doesn't exist, create an empty config file

And put a reminder of the purpose of that file, while we're at it.

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 instead of /tmp

To avoid problems with /tmp being mounted on a tmpfs in
certain systems.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
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. Also, 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>
avocado: Remove datadir plugin

Since the 'config' plugin supersedes functionality
in the 'datadir' plugin, let's remove it from avocado.
Update the configuration accordingly.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
debian packaging: Update control dependencies and changelog

The setup.py related changes are good enough to make the
avocado debian packages OK, but we were lacking the
python-pystache dependency on debian. Fix this.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #301 from ruda/simple_tests

Rename "drop-in test" (DropIn) to "simple test" (SimpleTest).
Merge pull request #297 from ldoktor/multiplexer

avocado.multiplexer: Support for multiple yaml files [v2]
avocado.core.tree: Modify TreeNode.__eq__

Compare using whitelist instead of self.__dict__ + blacklist.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>

Conflicts:
	avocado/core/tree.py
avocado.core.tree: Cache TreeNode.environment

Usually we create single tree and then multiplex it's values. This
generates lots of TreeNode.environment calls. This patch caches
TreeNode.environment calls and returns last known version.

There is one drawback, in case you modify tree structure after calling
TreeNode.environment you must call TreeNode.set_environment_dirty,
otherwise you get the outdated results.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>

Conflicts:
	avocado/core/tree.py
avocado.core.output: Add GREY color

This patch adds COLOR_DARKGREY resp. GREY color. These are going to be
used in debug version of multiplexer plugin. Without different
colors the output is unreadable.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>