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>
avocado.multiplexer: Use dict instead of OrderedDict for envs

This one was left out of the previous patch. OrderedDicts are not
needed for environment. Only order of children is important.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
avocado.core.tree: Modify is_leaf()

no need to compare size, simple `not self.children` does the same job.

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

Conflicts:
	avocado/core/tree.py
avocado.core.tree: Remove unused argument in iter_children_preorder

argument node is not used and can be safely removed.

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

Conflicts:
	avocado/core/tree.py
avocado.core.tree: Docstrings, pylint/pep8 fixes

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
avocado.multiplexer: Support for debug run

This complex patchset adds debug version of yaml parser. It stores
the origin of each value from environment. For list it stores
per-slice origin too.

Debug mode is NOT suitable for run-ner, only for multiplex-er. It
corrupts the values by adding the origin after the value.

The unittests were adjusted and enhanced. I added explanation into the
examples/mux-selftests.yaml describing what the weird names stands for
and what they test. I added couple of check which stress the old tests
and couple of them test the new features.

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

avocado.multiplexer: Support for debug run [v3]
Code refactory.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Discover tests inside a directory.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Do not allow empty test ''

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Fix test_empty_test_list.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Don't need to pass queue on loader module.

Pass test queue when creating the instance when running the test,
so don't need to use a queue when doing test discovery.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
DebugJob in loader module.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Move test discovery to job module.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Create method _multiplex_params_list().

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Use discover_urls() and discover_url().

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Use sorted() and follow subdirs.

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