summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/bbtests.py7
-rw-r--r--meta/lib/oeqa/targetcontrol.py4
-rw-r--r--meta/lib/oeqa/utils/commands.py4
3 files changed, 9 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index 17da0fd32c..0693ba8cf8 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -75,8 +75,11 @@ class BitbakeTests(OESelftestTestCase):
75 result = bitbake('man-db -c patch', ignore_status=True) 75 result = bitbake('man-db -c patch', ignore_status=True)
76 self.delete_recipeinc('man-db') 76 self.delete_recipeinc('man-db')
77 bitbake('-cclean man-db') 77 bitbake('-cclean man-db')
78 line = self.getline(result, "Function failed: patch_do_patch") 78 found = False
79 self.assertTrue(line and line.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output) 79 for l in result.output.split('\n'):
80 if l.startswith("ERROR:") and "failed" in l and "do_patch" in l:
81 found = l
82 self.assertTrue(found and found.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output)
80 83
81 def test_force_task_1(self): 84 def test_force_task_1(self):
82 # test 1 from bug 5875 85 # test 1 from bug 5875
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 15e617c95a..1445e3ecfb 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -175,7 +175,7 @@ class QemuTarget(BaseTarget):
175 if os.path.exists(self.qemulog): 175 if os.path.exists(self.qemulog):
176 with open(self.qemulog, 'r') as f: 176 with open(self.qemulog, 'r') as f:
177 bb.error("Qemu log output from %s:\n%s" % (self.qemulog, f.read())) 177 bb.error("Qemu log output from %s:\n%s" % (self.qemulog, f.read()))
178 raise bb.build.FuncFailed("%s - FAILED to start qemu - check the task log and the boot log" % self.pn) 178 raise RuntimeError("%s - FAILED to start qemu - check the task log and the boot log" % self.pn)
179 179
180 def check(self): 180 def check(self):
181 return self.runner.is_alive() 181 return self.runner.is_alive()
@@ -192,7 +192,7 @@ class QemuTarget(BaseTarget):
192 self.server_ip = self.runner.server_ip 192 self.server_ip = self.runner.server_ip
193 self.connection = SSHControl(ip=self.ip, logfile=self.sshlog) 193 self.connection = SSHControl(ip=self.ip, logfile=self.sshlog)
194 else: 194 else:
195 raise bb.build.FuncFailed("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn) 195 raise RuntimError("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn)
196 196
197 def run_serial(self, command, timeout=60): 197 def run_serial(self, command, timeout=60):
198 return self.runner.run_serial(command, timeout=timeout) 198 return self.runner.run_serial(command, timeout=timeout)
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 59ebfbe125..7140bc73d2 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -337,8 +337,8 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None,
337 qemu.deploy() 337 qemu.deploy()
338 try: 338 try:
339 qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd, discard_writes=discard_writes) 339 qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd, discard_writes=discard_writes)
340 except bb.build.FuncFailed: 340 except EXception as e:
341 msg = 'Failed to start QEMU - see the logs in %s' % logdir 341 msg = str(e) + '\nFailed to start QEMU - see the logs in %s' % logdir
342 if os.path.exists(qemu.qemurunnerlog): 342 if os.path.exists(qemu.qemurunnerlog):
343 with open(qemu.qemurunnerlog, 'r') as f: 343 with open(qemu.qemurunnerlog, 'r') as f:
344 msg = msg + "Qemurunner log output from %s:\n%s" % (qemu.qemurunnerlog, f.read()) 344 msg = msg + "Qemurunner log output from %s:\n%s" % (qemu.qemurunnerlog, f.read())