summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-25 22:13:55 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-25 23:15:38 +0100
commit64c531282e756965365c742751846250a2c1d3f1 (patch)
tree9465e1b0df8c230e24da1cccd71c5723e85317ff /meta/lib/oeqa/selftest
parent164b1b54c4b3127733bcd0a21b379bb6869693cc (diff)
downloadopenembedded-core-64c531282e756965365c742751846250a2c1d3f1.tar.gz
openembedded-core-64c531282e756965365c742751846250a2c1d3f1.tar.bz2
openembedded-core-64c531282e756965365c742751846250a2c1d3f1.zip
oeqa: Add exception handling around qemu process cleanup
The qemu processes may no longer exist at the end of the test so don't error if that is the case by ignoring any exceptions. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/imagefeatures.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/imagefeatures.py b/meta/lib/oeqa/selftest/imagefeatures.py
index 82ea164de1..1795b7bcf3 100644
--- a/meta/lib/oeqa/selftest/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/imagefeatures.py
@@ -68,7 +68,10 @@ class ImageFeatures(oeSelfTest):
proc_ssh.terminate()
# Cleanup
- killpg(proc_qemu.pid, signal.SIGTERM)
+ try:
+ killpg(proc_qemu.pid, signal.SIGTERM)
+ except:
+ pass
@testcase(1115)
def test_all_users_can_connect_via_ssh_without_password(self):
@@ -121,7 +124,10 @@ class ImageFeatures(oeSelfTest):
proc_ssh.terminate()
# Cleanup
- killpg(proc_qemu.pid, signal.SIGTERM)
+ try:
+ killpg(proc_qemu.pid, signal.SIGTERM)
+ except:
+ pass
@testcase(1114)
def test_rpm_version_4_support_on_image(self):
@@ -167,7 +173,10 @@ class ImageFeatures(oeSelfTest):
'RPM version is not {}, found instead {}.'.format(rpm_version, found_rpm_version))
# Cleanup (close qemu)
- killpg(proc_qemu.pid, signal.SIGTERM)
+ try:
+ killpg(proc_qemu.pid, signal.SIGTERM)
+ except:
+ pass
@testcase(1116)
def test_clutter_image_can_be_built(self):