avocado.test: Use unique_id to build temporary path.

if job.unique_id is available in test, use this information
to build the temporary path used in attribute workdir.

The template format is $TMP/job-<unique_id>-<random>/.

Signed-off-by: Ruda Moura <rmoura@redhat.com>
Merge pull request #167 from ruda/test_temporary_dir

avocado.test: Use job.unique_id to build temporary path.
avocado.docs: Update documentation regarding argument parsing.

Update documentation regarding the last update on argument parsing.
Like option --silent goes to run subcommand and there's no
need to quote for multiples test names.

Signed-off-by: Ruda Moura <rmoura@redhat.com>
Merge pull request #170 from ruda/argument_parse_docs

avocado.docs: Update documentation regarding argument parsing.
Makefile: Delete SOURCES directory as well

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.job: Removing unused variable

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.core.tree: Remove unused variables

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.plugins.multiplexer: Fix -c option

Make the multiplexer plugin to properly produce the
environment relative to each variant. Before, we
had an exception when calling option -c.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tests/synctest.py: Modify multiplex file

Make it have the same meaning as with the previous
multiplex system (9 variants, loop and sync parameters
with short, medium and long variants).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.core.output: Introduce Paginator class for cleaner 'q' handling

In avocado, we use 'less' for a paginator. When one presses
'q' in the paginator, an IOError is raised (the subprocess
opened with os.popen has just quit), so let's introduce a
Paginator class, that can handle cleanly 'q' without asking
API users to handle the exception themselves.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #171 from lmr/trivial-fixes-sprint12

Trivial fixes sprint12
avocado.utils: Introduce data_factory library

We frequently need to generate data for framework or
testing purposes. Introducing data_factory, a library
dedicated to this purpose.

With this, we can make other parts of avocado to use
it and supersede old functions used on this regard.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado: Make rest of the framework use the data_factory functions

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils: Add wait library

Add a library for functions with the same pattern: wait for
another function to evaluate to True, for a certain amount
of time.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils: Add astring library

Add string manipulation APIs to the avocado.utils namespace.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils: Split download and url related libraries

To avoid a few oddities inside avocado code.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils.path: Add get_path API

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils.io: Add logging related functions

So we can introduce aexpect.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils.process: Add PID manipulation APIs

So that we can do things such as killing an entire
process tree, necessary for aexpect functionality.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils: Add aexpect library

Add aexpect, a near exact copy of the code that
has been used by virt-test for a long time. It
is a library for controlling interactive process,
similar to pexpect, but with some additional
properties:

* Programs may stay alive between tests and jobs
* More sophisticated class structure

Signed-off-by: Lucas Menghel Rodrigues