aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/runqemu.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/runqemu.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/runqemu.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py
index e57f503a577..edc2e424e6e 100644
--- a/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -166,14 +166,17 @@ class QemuTest(OESelftestTestCase):
# when qemu was shutdown by the above shutdown command
qemu.runner.stop_thread()
time_track = 0
- while True:
- is_alive = qemu.check()
- if not is_alive:
- return True
- if time_track > timeout:
- return False
- time.sleep(1)
- time_track += 1
+ try:
+ while True:
+ is_alive = qemu.check()
+ if not is_alive:
+ return True
+ if time_track > timeout:
+ return False
+ time.sleep(1)
+ time_track += 1
+ except SystemExit:
+ return True
def test_qemu_can_shutdown(self):
self.assertExists(self.qemuboot_conf)