diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/runqemu.py | 19 |
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 e57f503a57..edc2e424e6 100644 --- a/meta/lib/oeqa/selftest/cases/runqemu.py +++ b/meta/lib/oeqa/selftest/cases/runqemu.py | |||
| @@ -166,14 +166,17 @@ class QemuTest(OESelftestTestCase): | |||
| 166 | # when qemu was shutdown by the above shutdown command | 166 | # when qemu was shutdown by the above shutdown command |
| 167 | qemu.runner.stop_thread() | 167 | qemu.runner.stop_thread() |
| 168 | time_track = 0 | 168 | time_track = 0 |
| 169 | while True: | 169 | try: |
| 170 | is_alive = qemu.check() | 170 | while True: |
| 171 | if not is_alive: | 171 | is_alive = qemu.check() |
| 172 | return True | 172 | if not is_alive: |
| 173 | if time_track > timeout: | 173 | return True |
| 174 | return False | 174 | if time_track > timeout: |
| 175 | time.sleep(1) | 175 | return False |
| 176 | time_track += 1 | 176 | time.sleep(1) |
| 177 | time_track += 1 | ||
| 178 | except SystemExit: | ||
| 179 | return True | ||
| 177 | 180 | ||
| 178 | def test_qemu_can_shutdown(self): | 181 | def test_qemu_can_shutdown(self): |
| 179 | self.assertExists(self.qemuboot_conf) | 182 | self.assertExists(self.qemuboot_conf) |
