rlCleanupPrepend: fix warning message, Append->Prepend

Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
rlCleanupGenFinal: make cleanup use more of current (test) env

As opposed to using a brand new one, sourced from /usr.

This has several benefits:

- if the user sourced ie. a different version of beakerlib in the test,
  we shouldn't source a system-wide one

- if there's no beakerlib installed on the system, but the user created
  an environment using custom exports (ie. beakerlib test suite),
  we should use the current (test) environment instead of failing
  to source nonexistent files into the cleanup environment

- the user might have also exported custom variables/functions in
  the test and this change makes them available to the cleanup upon
  a next append/prepend function call - this currently doesn't include
  non-exported variables

Also note that we can't easily store variables/functions in a separate
file, because the move atomicity would be broken - a (rare) possibility
of an old cleanup executing with new environment would be present.
Therefore, we need to embed everything into cleanup.sh.

Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
rlCleanup*pend: create basic test coverage

I tried making a shared function and calling it from the two
test_rlCleanup* functions, but due to "onetwo" vs "twoone" and one
more condition, the shared function ended up having ~ the same amount
of lines as the two separate functions combined, while being more
complex to the human eye.

Therefore I went with the "duplicated, but simple / readable" approach.

Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
testwatcher.py: make beah EWD timeout configurable

Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
testwatcher.py: tune debug messages for better accuracy

Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
testwatcher.py: exit on fatal(), ie. wrong watcher arguments

Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
test/testwatcher.sh: a one-file test suite for testwatcher.py

Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
Run the testwatcher test during 'make check'
Silence output of rlCleanup*pend tests
Merge branch 'master' into journal