oeqa: Test failure/cleanup improvements

Currently, if qemu segfaults, the tests merrily continue trying to execute
which takes time for them to timeout and is a bit silly. Worse, no logs about
the segfault are shown to the user, its silent!

This patch tries to unravel the tangled web of issues and ensures that we:

* install a SIGCHLD handler which tells the user qemu exited
* check if qemu is running, if it isn't fail the test outright
* don't leave processes behind in sshcontrol which would hold
  bitbake.lock and block shutdown

(From OE-Core rev: 5c04b1ca1e989f569d5755a646734d01a0c56cae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2015-09-04 16:59:38 +01:00
parent 3d81a56912
commit ef0fe3193e
4 changed files with 43 additions and 12 deletions

View File

@@ -144,6 +144,9 @@ class oeRuntimeTest(oeTest):
self.target = oeRuntimeTest.tc.target
super(oeRuntimeTest, self).__init__(methodName)
def setUp(self):
self.assertTrue(self.target.check(), msg = "Qemu not running?")
def tearDown(self):
# If a test fails or there is an exception
if not exc_info() == (None, None, None):