avocado: Make each test to print its label at the beginning of each test

Fixes bug #77.

Replace the basic logging.StreamHandler used to control
avocado stdout for a version that allows us to skip printing
newlines at each message. Then use this stream handler to
log the test label at the beginning of each test, rather
than at the end. When the tests are done, they can now simply
print STATUS strings appropriately, therefore not requiring
to log the test label.

Both the HumanTestResult and VMTestResult classes were
adapted to use this new soluton.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.test: Refactor traceback printing code

Reorganize and reduce code repetition by creating functions
to conveniently log/store tracebacks.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils.archive: Warn of bad members inside archives

When performing tests with the latest LTP tarball, I found
a bad return from Tarfile().extract_file(), that could be
either a badly formed tarball or a Tarfile() bug. Either
way, the archive module was equipped to deal with such a
situation, not failing the test altogether.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils.process: Make functions to log stdout/err as it happens

Fixes bug #78

In order to make process.run() and friends to log stdout/err
as they are generated, create a BgSubProcess object that has
threads that poll those streams continuously, channeling the
outputs through the logging system, and also storing it in
the result attribute.

Maybe this implementation could use some more love to make
it fully thread safe, with locks. This is just a first
version to show it is possible in a cleaner fashion than
what is implemented in autotest currently.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.job: Fix bug running dropin tests

The heuristics to determine wether a test is a dropin
was wrong since we introduced multiplexing. This patch
fixes it.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
selftests/all/functional: Add more basic functional tests

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #84 from avocado-framework/better-test-reporting

avocado: Make each test to print its label at the beginning of each test