avocado: Fix install and execution under virtual environment

The use of virtual environments is a very useful feature
for developers and helps us to sanity check code instalability.
However, we were not able to use it because the data file
install has to be different for virt env and for regular
system wide install (RPMs).

This patch makes avocado aware of the execution mode,
and sets the install process so that it works differently
(and fine) for both normal install and virtenv install.

Additionally, this fixes a bug I introduced on installing
test files, that broke the avocado rpms.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.job: Do not forward SIGINT to subprocesses

This ends up making the subprocesses to receive the
SIGINT multiple times, leading to the multiprocess
logging to misbehave.

Also, remove the ctrl+c test, given that we couldn't
figure out a way to properly reproduce a SIGINT passed
to the process group of the running avocado instance.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #139 from lmr/fix-virtenv

avocado: Fix install and execution under virtual environment
avocado.job: On interrupt, don't explicitly raise exceptions

So we don't trigger multiprocess logging inadvertedly.
Just fill out the instance with appropriate data.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.job: Try to get test state once more before filling abort state

This way we can correctly catch tests that just timed out.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
selftests/functional: Ensure no abort error message appears on time out

This way we avoid the bug that was fixed on the previous commit.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.job: Send SIGKILL on Ctrl+C to all subprocesses

Turns out some subprocesses might misbehave (see tests
like trinity - run on a VM), so it's not enough to send
the interrupt signal. For a clean stop output wise,
SIGKILL is necessary.

As a side effect, the previous Ctrl+C can be resurrected,
this time renamed to _interrupt, since we're not really
simulating Ctrl+C.

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

Interrupt fixes