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/network.py: introduce unused ports related utilities

Signed-off-by: Cleber Rosa <crosa@redhat.com>
GDB: introduce external libraries

This instroduces external libraries that are used by the avocado GDB
handling library. The two libraries are:

1) the spark parser, used as part of cPython builds, but not available
   a pip'able package or distro level packages;
2) the GDB MI parser from the pygdb project. Project seems to be be dead
   but the parser is really useful and fits well with avocado's needs.
   Also not pip'able or available from a distro package.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
GDB: add GNU Debugger handling library

This library is supposed to be useful both to test writers and to avocado itself.

Test writers may want to explicitly interact with the GNU debugger, run their
applications both in out outside it, generate core dumps, etc.

Avocado itself uses that library to implement the GDB plugin, that allows test
runners to run binaries inside the debugger transparently.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
gdbtest: introduce new test

This test fires a GDB instance, sends both valid and invalid commands,
runs a couple of binaries, setting breakpoints, catching signals and
generating core dumps.

Signed-off-by: Cleber Rosa <crosa@redhat.com>