From 6b41b7cc323e3bed2d0545019e7bdc8e006db1e9 Mon Sep 17 00:00:00 2001 From: Mariano Lopez Date: Sat, 5 Sep 2015 10:17:26 +0000 Subject: testimage: handle SIGTERM to conclude runqemu In the current state if a SIGTERM is sent to the testimage worker, the worker will exit but runqemu and qemu won't exit and the processes need to be killed manually to free the bitbake lock. This allows to catch the SIGTERM signal in testimage, this way it is possible to stop runqemu and qemu and allow to free the bitbake lock. Also this allows to skip the rest of the tests when running the tests in qemu or real hardware. This also solves minimal breaks in the setup of the runtime test when checking if qemu is alive. [YOCTO #8239] (From OE-Core rev: 2694d2f17d597b44fcc7aed5f6836081fa88a6b3) Signed-off-by: Benjamin Esquivel Signed-off-by: Mariano Lopez Signed-off-by: Richard Purdie --- meta/lib/oeqa/oetest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta/lib/oeqa/oetest.py') diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index ff62c30268..0fe68d4d52 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -145,7 +145,11 @@ class oeRuntimeTest(oeTest): super(oeRuntimeTest, self).__init__(methodName) def setUp(self): - self.assertTrue(self.target.check(), msg = "Qemu not running?") + # Check if test needs to run + if self.tc.sigterm: + self.fail("Got SIGTERM") + elif (type(self.target).__name__ == "QemuTarget"): + self.assertTrue(self.target.check(), msg = "Qemu not running?") def tearDown(self): # If a test fails or there is an exception -- cgit v1.2.3-54-g00ecf