diff options
Diffstat (limited to 'poky/meta/lib/oeqa')
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/buildgalculator.py | 1 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/parselogs.py | 2 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/selftest/cases/bbtests.py | 7 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/selftest/cases/wic.py | 18 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/targetcontrol.py | 4 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/utils/commands.py | 4 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/utils/qemurunner.py | 4 |
7 files changed, 21 insertions, 19 deletions
diff --git a/poky/meta/lib/oeqa/runtime/cases/buildgalculator.py b/poky/meta/lib/oeqa/runtime/cases/buildgalculator.py index 6dd1faee0..e5cc3e288 100644 --- a/poky/meta/lib/oeqa/runtime/cases/buildgalculator.py +++ b/poky/meta/lib/oeqa/runtime/cases/buildgalculator.py @@ -25,6 +25,7 @@ class GalculatorTest(OERuntimeTestCase): @OEHasPackage(['gcc']) @OEHasPackage(['make']) @OEHasPackage(['autoconf']) + @OEHasPackage(['gtk+3']) def test_galculator(self): self.project.download_archive() self.project.run_configure() diff --git a/poky/meta/lib/oeqa/runtime/cases/parselogs.py b/poky/meta/lib/oeqa/runtime/cases/parselogs.py index eb2ebb195..19c9c52a0 100644 --- a/poky/meta/lib/oeqa/runtime/cases/parselogs.py +++ b/poky/meta/lib/oeqa/runtime/cases/parselogs.py @@ -292,7 +292,7 @@ class ParseLogsTest(OERuntimeTestCase): grepcmd = 'grep ' grepcmd += '-Ei "' for error in errors: - grepcmd += error + '|' + grepcmd += '\<' + error + '\>' + '|' grepcmd = grepcmd[:-1] grepcmd += '" ' + str(log) + " | grep -Eiv \'" diff --git a/poky/meta/lib/oeqa/selftest/cases/bbtests.py b/poky/meta/lib/oeqa/selftest/cases/bbtests.py index 17da0fd32..0693ba8cf 100644 --- a/poky/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/poky/meta/lib/oeqa/selftest/cases/bbtests.py @@ -75,8 +75,11 @@ class BitbakeTests(OESelftestTestCase): result = bitbake('man-db -c patch', ignore_status=True) self.delete_recipeinc('man-db') bitbake('-cclean man-db') - line = self.getline(result, "Function failed: patch_do_patch") - self.assertTrue(line and line.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output) + found = False + for l in result.output.split('\n'): + if l.startswith("ERROR:") and "failed" in l and "do_patch" in l: + found = l + self.assertTrue(found and found.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output) def test_force_task_1(self): # test 1 from bug 5875 diff --git a/poky/meta/lib/oeqa/selftest/cases/wic.py b/poky/meta/lib/oeqa/selftest/cases/wic.py index 928c476eb..fcdd55059 100644 --- a/poky/meta/lib/oeqa/selftest/cases/wic.py +++ b/poky/meta/lib/oeqa/selftest/cases/wic.py @@ -684,11 +684,10 @@ class Wic2(WicTestCase): @only_for_arch(['i586', 'i686', 'x86_64']) def test_biosplusefi_plugin_qemu(self): """Test biosplusefi plugin in qemu""" - for fstype in ("ext4", "wic"): - config = 'IMAGE_FSTYPES = "%s"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n' % fstype - self.append_config(config) - self.assertEqual(0, bitbake('core-image-minimal').status) - self.remove_config(config) + config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n' + self.append_config(config) + self.assertEqual(0, bitbake('core-image-minimal').status) + self.remove_config(config) with runqemu('core-image-minimal', ssh=False, image_fstype='wic') as qemu: # Check that we have ONLY two /dev/sda* partitions (/boot and /) @@ -722,11 +721,10 @@ class Wic2(WicTestCase): # If an image hasn't been built yet, directory ${STAGING_DATADIR}/syslinux won't exists and _get_bootimg_dir() # will raise with "Couldn't find correct bootimg_dir" # The easiest way to work-around this issue is to make sure we already built an image here, hence the bitbake call - for fstype in ("ext4", "wic"): - config = 'IMAGE_FSTYPES = "%s"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n' % fstype - self.append_config(config) - self.assertEqual(0, bitbake('core-image-minimal').status) - self.remove_config(config) + config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n' + self.append_config(config) + self.assertEqual(0, bitbake('core-image-minimal').status) + self.remove_config(config) img = 'core-image-minimal' with NamedTemporaryFile("w", suffix=".wks") as wks: diff --git a/poky/meta/lib/oeqa/targetcontrol.py b/poky/meta/lib/oeqa/targetcontrol.py index 15e617c95..1445e3ecf 100644 --- a/poky/meta/lib/oeqa/targetcontrol.py +++ b/poky/meta/lib/oeqa/targetcontrol.py @@ -175,7 +175,7 @@ class QemuTarget(BaseTarget): if os.path.exists(self.qemulog): with open(self.qemulog, 'r') as f: bb.error("Qemu log output from %s:\n%s" % (self.qemulog, f.read())) - raise bb.build.FuncFailed("%s - FAILED to start qemu - check the task log and the boot log" % self.pn) + raise RuntimeError("%s - FAILED to start qemu - check the task log and the boot log" % self.pn) def check(self): return self.runner.is_alive() @@ -192,7 +192,7 @@ class QemuTarget(BaseTarget): self.server_ip = self.runner.server_ip self.connection = SSHControl(ip=self.ip, logfile=self.sshlog) else: - raise bb.build.FuncFailed("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn) + raise RuntimError("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn) def run_serial(self, command, timeout=60): return self.runner.run_serial(command, timeout=timeout) diff --git a/poky/meta/lib/oeqa/utils/commands.py b/poky/meta/lib/oeqa/utils/commands.py index 59ebfbe12..7140bc73d 100644 --- a/poky/meta/lib/oeqa/utils/commands.py +++ b/poky/meta/lib/oeqa/utils/commands.py @@ -337,8 +337,8 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemu.deploy() try: qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd, discard_writes=discard_writes) - except bb.build.FuncFailed: - msg = 'Failed to start QEMU - see the logs in %s' % logdir + except EXception as e: + msg = str(e) + '\nFailed to start QEMU - see the logs in %s' % logdir if os.path.exists(qemu.qemurunnerlog): with open(qemu.qemurunnerlog, 'r') as f: msg = msg + "Qemurunner log output from %s:\n%s" % (qemu.qemurunnerlog, f.read()) diff --git a/poky/meta/lib/oeqa/utils/qemurunner.py b/poky/meta/lib/oeqa/utils/qemurunner.py index b1999fde8..fe8b77d97 100644 --- a/poky/meta/lib/oeqa/utils/qemurunner.py +++ b/poky/meta/lib/oeqa/utils/qemurunner.py @@ -126,7 +126,7 @@ class QemuRunner: env["DEPLOY_DIR_IMAGE"] = self.deploy_dir_image if not launch_cmd: - launch_cmd = 'runqemu %s %s ' % ('snapshot' if discard_writes else '', runqemuparams) + launch_cmd = 'runqemu %s' % ('snapshot' if discard_writes else '') if self.use_kvm: self.logger.debug('Using kvm for runqemu') launch_cmd += ' kvm' @@ -136,7 +136,7 @@ class QemuRunner: launch_cmd += ' nographic' if self.use_slirp: launch_cmd += ' slirp' - launch_cmd += ' %s %s' % (self.machine, self.rootfs) + launch_cmd += ' %s %s %s' % (runqemuparams, self.machine, self.rootfs) return self.launch(launch_cmd, qemuparams=qemuparams, get_ip=get_ip, extra_bootparams=extra_bootparams, env=env) |