From 5c04b1ca1e989f569d5755a646734d01a0c56cae Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 4 Sep 2015 16:59:38 +0100 Subject: 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 Signed-off-by: Richard Purdie --- meta/lib/oeqa/targetcontrol.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta/lib/oeqa/targetcontrol.py') diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index 542e259112..edc0d01c1e 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py @@ -188,6 +188,9 @@ class QemuTarget(BaseTarget): bb.error("Qemu log output from %s:\n%s" % (self.qemulog, f.read())) raise bb.build.FuncFailed("%s - FAILED to start qemu - check the task log and the boot log" % self.pn) + def check(self): + return self.runner.is_alive() + def stop(self): self.runner.stop() self.connection = None -- cgit 1.2.3-korg