summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/oetest.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2015-09-05 10:17:26 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-09 14:27:39 +0100
commit6b41b7cc323e3bed2d0545019e7bdc8e006db1e9 (patch)
tree248be2b7c1e4ea6677f9c5f63d685b3f0abe93dd /meta/lib/oeqa/oetest.py
parente570b3202071d39564c872c6f2e94a78313f5a9d (diff)
downloadpoky-6b41b7cc323e3bed2d0545019e7bdc8e006db1e9.tar.gz
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 <benjamin.esquivel@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/oetest.py')
-rw-r--r--meta/lib/oeqa/oetest.py6
1 files changed, 5 insertions, 1 deletions
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):
145 super(oeRuntimeTest, self).__init__(methodName) 145 super(oeRuntimeTest, self).__init__(methodName)
146 146
147 def setUp(self): 147 def setUp(self):
148 self.assertTrue(self.target.check(), msg = "Qemu not running?") 148 # Check if test needs to run
149 if self.tc.sigterm:
150 self.fail("Got SIGTERM")
151 elif (type(self.target).__name__ == "QemuTarget"):
152 self.assertTrue(self.target.check(), msg = "Qemu not running?")
149 153
150 def tearDown(self): 154 def tearDown(self):
151 # If a test fails or there is an exception 155 # If a test fails or there is an exception