Merge pull request #95 from avocado-framework/small_lint_fixes

avocado.utils: Small unused variable fixes
avocado.core.exceptions: Introduce TestTimeoutError exception

Intended to be used in the special case a test times out.
Also, explain better what a TestError is supposed to be
(right now the description causes confusion).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.test: Add Test __getstate__ for serialization

In order to make the Test class serializable, implement
__getstate__ in a way that only exports the pickleable
attributes. This will be necessary for the following
patches that will insulate individual test executions
in forked processes.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.core.exceptions: Modifications to CmdError for serialization

In order to serialize the CmdError class, we need to
allow passing None command and CmdResult objects to
the class constructor.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.job: Run avocado tests isolated in sub processes

In order to ensure avocado tests won't mess with the
main avocado process' environment, execute them in
forked subprocesses. If the test params have a
'timeout' attribute, use it as the timeout param
of the .join() multiprocess method, allowing the
subprocesses to be killed after timeout seconds if
they did not complete.

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

Add a timeout test module for avocado, to exercise the
test timeout functionality. This test is supposed to
fail by timeout.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
selftests/functional: Add timeout functional testing

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