diff options
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r-- | meta/lib/oeqa/selftest/imagefeatures.py | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/meta/lib/oeqa/selftest/imagefeatures.py b/meta/lib/oeqa/selftest/imagefeatures.py index 70ebbe4321..82ea164de1 100644 --- a/meta/lib/oeqa/selftest/imagefeatures.py +++ b/meta/lib/oeqa/selftest/imagefeatures.py | |||
@@ -43,9 +43,12 @@ class ImageFeatures(oeSelfTest): | |||
43 | proc_qemu.expect(self.get_ip_patt, timeout=100) | 43 | proc_qemu.expect(self.get_ip_patt, timeout=100) |
44 | qemu_ip = proc_qemu.match.group('qemu_ip') | 44 | qemu_ip = proc_qemu.match.group('qemu_ip') |
45 | proc_qemu.expect('qemux86 login:', timeout=100) | 45 | proc_qemu.expect('qemux86 login:', timeout=100) |
46 | except: | 46 | except Exception as e: |
47 | killpg(proc_qemu.pid, signal.SIGTERM) | 47 | try: |
48 | self.fail('Failed to start qemu.') | 48 | killpg(proc_qemu.pid, signal.SIGTERM) |
49 | except: | ||
50 | pass | ||
51 | self.fail('Failed to start qemu: %s' % e) | ||
49 | 52 | ||
50 | # Attempt to ssh with each user into qemu with empty password | 53 | # Attempt to ssh with each user into qemu with empty password |
51 | for user in [self.root_user, self.test_user]: | 54 | for user in [self.root_user, self.test_user]: |
@@ -93,9 +96,12 @@ class ImageFeatures(oeSelfTest): | |||
93 | proc_qemu.expect(self.get_ip_patt, timeout=100) | 96 | proc_qemu.expect(self.get_ip_patt, timeout=100) |
94 | qemu_ip = proc_qemu.match.group('qemu_ip') | 97 | qemu_ip = proc_qemu.match.group('qemu_ip') |
95 | proc_qemu.expect('qemux86 login:', timeout=100) | 98 | proc_qemu.expect('qemux86 login:', timeout=100) |
96 | except: | 99 | except Exception as e: |
97 | killpg(proc_qemu.pid, signal.SIGTERM) | 100 | try: |
98 | self.fail('Failed to start qemu.') | 101 | killpg(proc_qemu.pid, signal.SIGTERM) |
102 | except: | ||
103 | pass | ||
104 | self.fail('Failed to start qemu: %s' % e) | ||
99 | 105 | ||
100 | # Attempt to ssh with each user into qemu with empty password | 106 | # Attempt to ssh with each user into qemu with empty password |
101 | for user in [self.root_user, self.test_user]: | 107 | for user in [self.root_user, self.test_user]: |
@@ -147,9 +153,12 @@ class ImageFeatures(oeSelfTest): | |||
147 | proc_qemu.expect(self.prompt) | 153 | proc_qemu.expect(self.prompt) |
148 | proc_qemu.sendline('rpm --version') | 154 | proc_qemu.sendline('rpm --version') |
149 | proc_qemu.expect(self.prompt) | 155 | proc_qemu.expect(self.prompt) |
150 | except: | 156 | except Exception as e: |
151 | killpg(proc_qemu.pid, signal.SIGTERM) | 157 | try: |
152 | self.fail('Failed to boot qemu.') | 158 | killpg(proc_qemu.pid, signal.SIGTERM) |
159 | except: | ||
160 | pass | ||
161 | self.fail('Failed to start qemu: %s' % e) | ||
153 | 162 | ||
154 | found_rpm_version = proc_qemu.before | 163 | found_rpm_version = proc_qemu.before |
155 | 164 | ||