avocado/result.py: remove confusing and unused 'console_plugin' attribute

Signed-off-by: Cleber Rosa <crosa@redhat.com>
result plugins: replace the set_output_option() method

For a simpler command_line_arg_name attribute. This way, there's no
need to define a method, simply define the attribute value. It's
consistent with the attributes (enabled, etc) defined in the Plugin
class.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
result plugins: replace the set_output() method

With a simpler (and already existing) attribute. Having a method
suggests that it's going to be called multiple times, which is not
the case.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Merge pull request #206 from clebergnu/simplify_result_plugins

Simplify result plugins
journal plugin: put the journal file in the right directory

Here right directory means the top log job result directory,
along with the job id file and the job.log file, etc.

Looks like there was a change in the meaning of `job.logdir`
and because of that, the journal plugin was saving the file
one directory up the tree.

Also, we needed the job logdir as part of the test state, just
like we need the job unique id.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
docs/index: Reorder contribution guide order

It should go last in the list of topics, preceding only
the API docs.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
docs: Updating test references

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
vm plugin: use test states instead of test instances

As it's the norm now with other plugins.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
docs: Update env variables documentation

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #208 from clebergnu/vm_test_state

vm plugin: use test states instead of test instances
Merge pull request #209 from lmr/docs-update

Docs update
Merge pull request #207 from clebergnu/journal_location

journal plugin: put the journal file in the right directory
avocado.core.tree: Modify repr() and str() behavior.

To make things easy for debugging, changing the default
behavior of repr() and str() to the class TreeNode.

* For repr() just output the node name.
  Example: TreeNode(name='prod')
* For str() output the node path and the variables from the environment.
  Example: /root/env/prod: foo=123, bar=456

So the output looks like that:

... after a break pointing into the multiplex() function...

(Pdb) print args[0]
[TreeNode(name='short'), TreeNode(name='medium'), TreeNode(name='long'), TreeNode(name='longest')]

(Pdb) print args[0][0]
/root/short: sleep_length=0.5

Signed-off-by: Ruda Moura <rmoura@redhat.com>
avocado.multiplexer: filters accepts strings or lists of strings.

For the filter_only and filter_out functions for filtering,
always accept a string or a list of string for for the parameters.

So this is possible to parse a YAML file like:

foo:
    filter-only: /root/env/prod

or

foo:
    filter-only: [/root/env/prod]

The previous behavior was treating the string as sequence,
so the filters were using the chars as input values.

Signed-off-by: Ruda Moura <rmoura@redhat.com>
avocado.job: better output when variants are zero.

Provide a better output when the number of variants of a multiplex
is zero (for a giving set of tests and one multiplex file).

Also, when there is no tests passed, report early.

Signed-off-by: Ruda Moura <rmoura@redhat.com>
selftests: Unit tests for path_parent() and any_sibling().

Include unit test for support functions used in the multiplexer.py
module: path_parent() and any_sibling().

Signed-off-by: Ruda Moura <rmoura@redhat.com>
avocado.multiplexer: improvements in path_parent and any_sibling.

Include documentation for path_parent and any_sibling and
use variable names more relevant.

In function any_sibling, if the number of arguments is less than 2,
then returns False, because it is obviously alone.

Signed-off-by: Ruda Moura <rmoura@redhat.com>