summaryrefslogtreecommitdiff
path: root/poky/meta/lib
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2019-11-04 21:55:29 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-11-04 21:56:09 +0300
commit64c979e88e6d0917b6fe45e52e381affec150afd (patch)
treea0e35da2075116b2d1d43813cc3f7f57f99d843a /poky/meta/lib
parent868407c65d79e82e83c37f7c32bef9a2e2bc4cd5 (diff)
downloadopenbmc-64c979e88e6d0917b6fe45e52e381affec150afd.tar.xz
poky: subtree update:52a625582e..7035b4b21e
Adrian Bunk (9): squashfs-tools: Upgrade to 4.4 screen: Upgrade 4.6.2 -> 4.7.0 stress-ng: Upgrade 0.10.00 -> 0.10.08 nspr: Upgrade 4.21 -> 4.23 gcc: Remove stale gcc 8 patchfile gnu-efi: Upgrade 3.0.9 -> 3.0.10 python3-numpy: Stop shipping manual config files coreutils: Move stdbuf into an own package coreutils-stdbuf gnu-efi: Upgrade 3.0.10 -> 3.0.11 Alessio Igor Bogani (1): systemtap: support usrmerge Alexander Hirsch (1): libksba: Fix license specification Alexander Kanavin (6): gcr: update to 3.34.0 btrfs-tools: update to 5.3 libmodulemd-v1: update to 1.8.16 selftest: skip virgl test on centos 7 entirely nfs-utils: do not depend on bash unnecessarily selftest: add a test for gpl3-free images Alistair Francis (4): opensbi: Bump from 0.4 to 0.5 u-boot: Bump from 2019.07 to 2019.10 qemuriscv64: Build smode U-Boot libsdl2: Fix build failure when using mesa 19.2.1 Andreas Müller (4): adwaita-icon-theme: upgrade 3.32.0 -> 3.34.0 gsettings-desktop-schemas: upgrade 3.32.0 -> 3.34.0 IMAGE_LINGUAS_COMPLEMENTARY: auto-add language packages other than locales libical: add PACKAGECONFIG glib and enable it by default André Draszik (10): testimage.bbclass: support hardware-controlled targets testimage.bbclass: enable ssh agent forwarding oeqa/runtime/df: don't fail on long device names oeqa/core/decorator: add skipIfFeature oeqa/runtime/opkg: skip install on read-only-rootfs oeqa/runtime/systemd: skip unit enable/disable on read-only-rootfs ruby: update to v2.6.4 ruby: some ptest fixes oeqa/runtime/context.py: ignore more files when loading controllers connman: mark connman-wait-online as SYSTEMD_PACKAGE Bruce Ashfield (6): linux-yocto/4.19: update to v4.19.78 linux-yocto/5.2: update to v5.2.20 perf: fix v5.4+ builds perf: create directories before copying single files perf: add 'cap' PACKAGECONFIG perf: drop 'include' copy Carlos Rafael Giani (12): gstreamer1.0: upgrade to version 1.16.1 gstreamer1.0-plugins-base: upgrade to version 1.16.1 gstreamer1.0-plugins-good: upgrade to version 1.16.1 gstreamer1.0-plugins-bad: upgrade to version 1.16.1 gstreamer1.0-plugins-ugly: upgrade to version 1.16.1 gstreamer1.0-libav: upgrade to version 1.16.1 gstreamer1.0-vaapi: upgrade to version 1.16.1 gstreamer1.0-omx: upgrade to version 1.16.1 gstreamer1.0-python: upgrade to version 1.16.1 gstreamer1.0-rtsp-server: upgrade to version 1.16.1 gst-validate: upgrade to version 1.16.1 gstreamer: Change SRC_URI to use HTTPS access instead of HTTP Changqing Li (4): qemu: Fix CVE-2019-12068 python: Fix CVE-2019-10160 sudo: fix CVE-2019-14287 mdadm: fix do_package failed when changed local.conf but not cleaned Chee Yang Lee (2): wic/help: change 'wic write' help description wic/engine: use 'linux-swap' for swap file system Chen Qi (3): go: fix CVE-2019-16276 python3: fix CVE-2019-16935 python: fix CVE-2019-16935 Chris Laplante via bitbake-devel (2): bitbake: bitbake: contrib/vim: initial commit, with unmodified code from indent/python.vim bitbake: bitbake: contrib/vim: Modify Python indentation to work with 'python do_task {' Christopher Larson (2): bitbake: fetch2/git: fetch shallow revs when needed bitbake: tests/fetch: add test for fetching shallow revs Dan Callaghan (1): elfutils: add PACKAGECONFIG for compression algorithms Douglas Royds via Openembedded-core (1): icecc: Export ICECC_CC and friends via wrapper-script Eduardo Abinader (1): devtool: add ssh key option to deploy-target param Eugene Smirnov (1): wic/rawcopy: Support files in sub-directories Ferry Toth (1): sudo: Fix fetching sources Frazer Leslie Clews (2): makedevs: fix format strings in makedevs.c in print statements makedevs: fix invalidScanfFormatWidth to prevent overflowing usr_buf George McCollister (1): openssl: make OPENSSL_ENGINES match install path Haiqing Bai (1): unfs3: fixed the issue that unfsd consumes 100% CPU He Zhe (1): ltp: Fix overcommit_memory failure Hongxu Jia (1): openssh: fix CVE-2019-16905 Joe Slater (2): libtiff: fix CVE-2019-17546 libxslt: fix CVE-2019-18197 Kai Kang (1): bind: fix CVE-2019-6471 and CVE-2018-5743 Liwei Song (1): util-linux: fix PKNAME name is NULL when use lsblk [LIN1019-2963] Mattias Hansson (1): base.bbclass: add dependency on pseudo from do_prepare_recipe_sysroot Max Tomago (1): python-native: Remove debug.patch Maxime Roussin-Bélanger (2): meta: update and add missing homepage/bugtracker links meta: add missing description in recipes-gnome Michael Ho (1): cmake.bbclass: add HOSTTOOLS_DIR to CMAKE_FIND_ROOT_PATH Mike Crowe (2): kernel-fitimage: Cope with non-standard kernel deploy subdirectory kernel-devicetree: Cope with non-standard kernel deploy subdirectory Mikko Rapeli (1): systemd.bbclass: enable all services specified in ${SYSTEMD_SERVICE} Nicola Lunghi (1): ofono: tidy up the recipe Ola x Nilsson (10): oeqa/selftest/recipetool: Use with to control file handle lifetime oe.types.path: Use with to control file handle lifetime lib/oe/packagedata: Use with to control file handle lifetime lib/oe/package_manager: Use with to control file handle lifetime report-error.bbclass: Use with to control file handle lifetime package.bbclass: Use with to manage file handle lifetimes devtool-source.bbclass: Use with to manage file handle lifetime libc-package.bbclass: Use with to manage filehandle in do_spit_gconvs bitbake: bitbake: prserv/serv: Use with while reading pidfile bitbake: bitbake: ConfHandler: Use with to manage filehandle lifetime Oleksandr Kravchuk (4): ell: update to 0.23 ell: update to 0.25 ell: update to 0.26 ofono: update to 1.31 Ricardo Ribalda Delgado (1): i2c-tools: Add missing RDEPEND Richard Leitner (1): kernel-fitimage: introduce FIT_SIGN_ALG Richard Purdie (4): tinderclient: Drop obsolete class meson: Backport fix to assist meta-oe breakage nfs-utils: Improve handling when no exported fileysystems qemu: Avoid potential build configuration contamination Robert Yang (1): bluez5: Fix for --enable-btpclient Ross Burton (29): sanity: check the format of SDK_VENDOR file: explicitly disable seccomp python3: -dev should depend on distutils gawk: add PACKAGECONFIG for readline python3: alternative name is python3-config not python-config python3: ensure that all forms of python3-config are in python3-dev oeqa/selftest: use specialist assert* methods bluez5: refresh upstreamed patches xorgproto: fix summary libx11: upgrade to 1.6.9 xorgproto: upgrade to 2019.2 llvm: add missing Upstream-Status tags buildhistory-analysis: filter out -src changes by default squashfs-tools: remove redundant source checksums squashfs-tools: clean up compile/install tasks wpa-supplicant: fix CVE-2019-16275 gcr: remove intltool-native elfutils: disable bzip cve-check: ensure all known CVEs are in the report git: some tools are no longer perl, so move to main recipe git: cleanup man install qemu-helper-native: add missing option to getopt() call qemu-helper-native: showing help shouldn't be an error qemu-helper-native: pass compiler flags oeqa/selftest: add test for oe-run-native cve-check: failure to parse versions should be more visible gst-examples: rename so PV is in filename sanity: check for more bits of Python recipeutils-test: use a small dependency in the dummy recipe Sai Hari Chandana Kalluri (1): devtool: Add --remove-work option for devtool reset command Scott Rifenbark (9): ref-manual: First pass of 2.8 migration changes (WIP) poky.ent: Updated the release date to October 2019 dev-manual: Added info to "Selecting an Initialization Manager" ref-manual: 2nd pass 3.0 migration documenation: Changed "2.8" to "3.0". ref-manual: Removed deprecated link to ref-classes-bluetooth ref-manual, dev-manual: Clean up of a commit ref-manual: Updated the BUSYBOX_SPLIT_SUID variable. ref-manual, dev-manual: Added CMake toolchain files. Stefan Agner (1): uninative: check .done file instead of tarball Tom Benn (1): dbus: update dbus-1.init to reflect new PID file Trevor Gamblin (5): aspell: upgrade from 0.60.7 to 0.60.8 binutils: fix CVE-2019-17450 binutils: fix CVE-2019-17451 ncurses: fix CVE-2019-17594, CVE-2019-17595 libgcrypt: upgrade 1.8.4 -> 1.8.5 Trevor Woerner (1): libcap-ng: undefined reference to `pthread_atfork' Wenlin Kang (1): sysstat: fix CVE-2019-16167 Yann Dirson (1): mesa: fix meson configure fix when 'dri' is excluded from PACKAGECONFIG Yeoh Ee Peng (1): scripts/oe-pkgdata-util: Enable list-pkgs to print ordered packages Yi Zhao (2): libsdl2: fix CVE-2019-13616 libgcrypt: fix CVE-2019-12904 Zang Ruochen (6): bison:upgrade 3.4.1 -> 3.4.2 e2fsprogs:upgrade 1.45.3 -> 1.45.4 libxvmc:upgrade 1.0.11 -> 1.0.12 python3-pip:upgrade 19.2.3 -> 19.3.1 python-setuptools:upgrade 41.2.0 -> 41.4.0 libcap-ng:upgrade 0.7.9 -> 0.7.10 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I50bc42f74dffdc406ffc0dea034e41462fe6e06b
Diffstat (limited to 'poky/meta/lib')
-rw-r--r--poky/meta/lib/oe/buildhistory_analysis.py2
-rw-r--r--poky/meta/lib/oe/package_manager.py10
-rw-r--r--poky/meta/lib/oe/packagedata.py5
-rw-r--r--poky/meta/lib/oe/types.py4
-rw-r--r--poky/meta/lib/oeqa/core/decorator/data.py18
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/df.py2
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/opkg.py4
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/systemd.py16
-rw-r--r--poky/meta/lib/oeqa/runtime/context.py2
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/bblayers.py8
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/bbtests.py17
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/imagefeatures.py2
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py18
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/oescripts.py6
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/recipetool.py4
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/runtime_test.py2
16 files changed, 91 insertions, 29 deletions
diff --git a/poky/meta/lib/oe/buildhistory_analysis.py b/poky/meta/lib/oe/buildhistory_analysis.py
index 708e1b388..5b28774c9 100644
--- a/poky/meta/lib/oe/buildhistory_analysis.py
+++ b/poky/meta/lib/oe/buildhistory_analysis.py
@@ -413,7 +413,7 @@ def compare_dict_blobs(path, ablob, bblob, report_all, report_ver):
if abs(percentchg) < monitor_numeric_threshold:
continue
elif (not report_all) and key in list_fields:
- if key == "FILELIST" and path.endswith("-dbg") and bstr.strip() != '':
+ if key == "FILELIST" and (path.endswith("-dbg") or path.endswith("-src")) and bstr.strip() != '':
continue
if key in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
(depvera, depverb) = compare_pkg_lists(astr, bstr)
diff --git a/poky/meta/lib/oe/package_manager.py b/poky/meta/lib/oe/package_manager.py
index 7c373715a..c7135ce91 100644
--- a/poky/meta/lib/oe/package_manager.py
+++ b/poky/meta/lib/oe/package_manager.py
@@ -298,7 +298,7 @@ class DpkgIndexer(Indexer):
release.write("Label: %s\n" % arch)
cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive
-
+
index_cmds.append(cmd)
deb_dirs_found = True
@@ -570,6 +570,8 @@ class PackageManager(object, metaclass=ABCMeta):
for lang in split_linguas:
globs += " *-locale-%s" % lang
+ for complementary_linguas in (self.d.getVar('IMAGE_LINGUAS_COMPLEMENTARY') or "").split():
+ globs += (" " + complementary_linguas) % lang
if globs is None:
return
@@ -655,7 +657,7 @@ def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencie
pn = d.getVar("PN")
seendirs = set()
multilibs = {}
-
+
bb.utils.remove(subrepo_dir, recurse=True)
bb.utils.mkdirhier(subrepo_dir)
@@ -1006,8 +1008,8 @@ class RpmPM(PackageManager):
def load_old_install_solution(self):
if not os.path.exists(self.solution_manifest):
return []
-
- return open(self.solution_manifest, 'r').read().split()
+ with open(self.solution_manifest, 'r') as fd:
+ return fd.read().split()
def _script_num_prefix(self, path):
files = os.listdir(path)
diff --git a/poky/meta/lib/oe/packagedata.py b/poky/meta/lib/oe/packagedata.py
index cbde380b0..a82085a79 100644
--- a/poky/meta/lib/oe/packagedata.py
+++ b/poky/meta/lib/oe/packagedata.py
@@ -17,9 +17,8 @@ def read_pkgdatafile(fn):
if os.access(fn, os.R_OK):
import re
- f = open(fn, 'r')
- lines = f.readlines()
- f.close()
+ with open(fn, 'r') as f:
+ lines = f.readlines()
r = re.compile("([^:]+):\s*(.*)")
for l in lines:
m = r.match(l)
diff --git a/poky/meta/lib/oe/types.py b/poky/meta/lib/oe/types.py
index 77ee7ee54..bbbabafbf 100644
--- a/poky/meta/lib/oe/types.py
+++ b/poky/meta/lib/oe/types.py
@@ -154,7 +154,8 @@ def path(value, relativeto='', normalize='true', mustexist='false'):
if boolean(mustexist):
try:
- open(value, 'r')
+ with open(value, 'r'):
+ pass
except IOError as exc:
if exc.errno == errno.ENOENT:
raise ValueError("{0}: {1}".format(value, os.strerror(errno.ENOENT)))
@@ -183,4 +184,3 @@ def qemu_use_kvm(kvm, target_arch):
elif build_arch == target_arch:
use_kvm = True
return use_kvm
-
diff --git a/poky/meta/lib/oeqa/core/decorator/data.py b/poky/meta/lib/oeqa/core/decorator/data.py
index babc9789d..12d462f20 100644
--- a/poky/meta/lib/oeqa/core/decorator/data.py
+++ b/poky/meta/lib/oeqa/core/decorator/data.py
@@ -113,3 +113,21 @@ class skipIfNotFeature(OETestDecorator):
self.logger.debug(msg)
if not has_feature(self.case.td, self.value):
self.case.skipTest(self.msg)
+
+@registerDecorator
+class skipIfFeature(OETestDecorator):
+ """
+ Skip test based on DISTRO_FEATURES.
+
+ value must not be in distro features or it will skip the test
+ with msg as the reason.
+ """
+
+ attrs = ('value', 'msg')
+
+ def setUpDecorator(self):
+ msg = ('Checking if %s is not in DISTRO_FEATURES '
+ 'or IMAGE_FEATURES' % (self.value))
+ self.logger.debug(msg)
+ if has_feature(self.case.td, self.value):
+ self.case.skipTest(self.msg)
diff --git a/poky/meta/lib/oeqa/runtime/cases/df.py b/poky/meta/lib/oeqa/runtime/cases/df.py
index d8d79f32e..89fd0fb90 100644
--- a/poky/meta/lib/oeqa/runtime/cases/df.py
+++ b/poky/meta/lib/oeqa/runtime/cases/df.py
@@ -11,7 +11,7 @@ class DfTest(OERuntimeTestCase):
@OETestDepends(['ssh.SSHTest.test_ssh'])
@OEHasPackage(['coreutils', 'busybox'])
def test_df(self):
- cmd = "df / | sed -n '2p' | awk '{print $4}'"
+ cmd = "df -P / | sed -n '2p' | awk '{print $4}'"
(status,output) = self.target.run(cmd)
msg = 'Not enough space on image. Current size is %s' % output
self.assertTrue(int(output)>5120, msg=msg)
diff --git a/poky/meta/lib/oeqa/runtime/cases/opkg.py b/poky/meta/lib/oeqa/runtime/cases/opkg.py
index bb8b6d99d..750706161 100644
--- a/poky/meta/lib/oeqa/runtime/cases/opkg.py
+++ b/poky/meta/lib/oeqa/runtime/cases/opkg.py
@@ -5,7 +5,7 @@
import os
from oeqa.utils.httpserver import HTTPService
from oeqa.runtime.case import OERuntimeTestCase
-from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
+from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature, skipIfFeature
from oeqa.runtime.decorator.package import OEHasPackage
class OpkgTest(OERuntimeTestCase):
@@ -45,6 +45,8 @@ class OpkgRepoTest(OpkgTest):
'Test requires package-management to be in IMAGE_FEATURES')
@skipIfNotDataVar('IMAGE_PKGTYPE', 'ipk',
'IPK is not the primary package manager')
+ @skipIfFeature('read-only-rootfs',
+ 'Test does not work with read-only-rootfs in IMAGE_FEATURES')
@OEHasPackage(['opkg'])
def test_opkg_install_from_repo(self):
self.setup_source_config_for_package_install()
diff --git a/poky/meta/lib/oeqa/runtime/cases/systemd.py b/poky/meta/lib/oeqa/runtime/cases/systemd.py
index c11fa49b0..7c44abe8e 100644
--- a/poky/meta/lib/oeqa/runtime/cases/systemd.py
+++ b/poky/meta/lib/oeqa/runtime/cases/systemd.py
@@ -9,7 +9,7 @@ from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.data import skipIfDataVar, skipIfNotDataVar
from oeqa.runtime.decorator.package import OEHasPackage
-from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.core.decorator.data import skipIfNotFeature, skipIfFeature
class SystemdTest(OERuntimeTestCase):
@@ -114,12 +114,26 @@ class SystemdServiceTests(SystemdTest):
self.systemctl('is-active', 'avahi-daemon.service', verbose=True)
@OETestDepends(['systemd.SystemdServiceTests.test_systemd_status'])
+ @skipIfFeature('read-only-rootfs',
+ 'Test is only meant to run without read-only-rootfs in IMAGE_FEATURES')
def test_systemd_disable_enable(self):
self.systemctl('disable', 'avahi-daemon.service')
self.systemctl('is-enabled', 'avahi-daemon.service', expected=1)
self.systemctl('enable', 'avahi-daemon.service')
self.systemctl('is-enabled', 'avahi-daemon.service')
+ @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status'])
+ @skipIfNotFeature('read-only-rootfs',
+ 'Test is only meant to run with read-only-rootfs in IMAGE_FEATURES')
+ def test_systemd_disable_enable_ro(self):
+ status = self.target.run('mount -orw,remount /')[0]
+ self.assertTrue(status == 0, msg='Remounting / as r/w failed')
+ try:
+ self.test_systemd_disable_enable()
+ finally:
+ status = self.target.run('mount -oro,remount /')[0]
+ self.assertTrue(status == 0, msg='Remounting / as r/o failed')
+
class SystemdJournalTests(SystemdTest):
@OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic'])
diff --git a/poky/meta/lib/oeqa/runtime/context.py b/poky/meta/lib/oeqa/runtime/context.py
index 77d58eefa..ef738a335 100644
--- a/poky/meta/lib/oeqa/runtime/context.py
+++ b/poky/meta/lib/oeqa/runtime/context.py
@@ -138,7 +138,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
def add_controller_list(path):
if not os.path.exists(os.path.join(path, '__init__.py')):
raise OSError('Controllers directory %s exists but is missing __init__.py' % path)
- files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_')])
+ files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_') and not f.startswith('.#')])
for f in files:
module = 'oeqa.controllers.' + f[:-3]
if module not in controllerslist:
diff --git a/poky/meta/lib/oeqa/selftest/cases/bblayers.py b/poky/meta/lib/oeqa/selftest/cases/bblayers.py
index 954488dfd..f131d9856 100644
--- a/poky/meta/lib/oeqa/selftest/cases/bblayers.py
+++ b/poky/meta/lib/oeqa/selftest/cases/bblayers.py
@@ -14,21 +14,21 @@ class BitbakeLayers(OESelftestTestCase):
def test_bitbakelayers_showcrossdepends(self):
result = runCmd('bitbake-layers show-cross-depends')
- self.assertTrue('aspell' in result.output, msg = "No dependencies were shown. bitbake-layers show-cross-depends output: %s" % result.output)
+ self.assertIn('aspell', result.output)
def test_bitbakelayers_showlayers(self):
result = runCmd('bitbake-layers show-layers')
- self.assertTrue('meta-selftest' in result.output, msg = "No layers were shown. bitbake-layers show-layers output: %s" % result.output)
+ self.assertIn('meta-selftest', result.output)
def test_bitbakelayers_showappends(self):
recipe = "xcursor-transparent-theme"
bb_file = self.get_recipe_basename(recipe)
result = runCmd('bitbake-layers show-appends')
- self.assertTrue(bb_file in result.output, msg="%s file was not recognised. bitbake-layers show-appends output: %s" % (bb_file, result.output))
+ self.assertIn(bb_file, result.output)
def test_bitbakelayers_showoverlayed(self):
result = runCmd('bitbake-layers show-overlayed')
- self.assertTrue('aspell' in result.output, msg="aspell overlayed recipe was not recognised bitbake-layers show-overlayed %s" % result.output)
+ self.assertIn('aspell', result.output)
def test_bitbakelayers_flatten(self):
recipe = "xcursor-transparent-theme"
diff --git a/poky/meta/lib/oeqa/selftest/cases/bbtests.py b/poky/meta/lib/oeqa/selftest/cases/bbtests.py
index 9461c7ed1..dc423ec43 100644
--- a/poky/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/poky/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -44,7 +44,7 @@ class BitbakeTests(OESelftestTestCase):
find_build_completed = re.search(r"Tasks Summary:.*(\n.*)*NOTE: Test for bb\.event\.BuildCompleted", result.output)
self.assertTrue(find_build_started, msg = "Match failed in:\n%s" % result.output)
self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output)
- self.assertFalse('Test for bb.event.InvalidEvent' in result.output, msg = "\"Test for bb.event.InvalidEvent\" message found during bitbake process. bitbake output: %s" % result.output)
+ self.assertNotIn('Test for bb.event.InvalidEvent', result.output)
def test_local_sstate(self):
bitbake('m4-native')
@@ -59,7 +59,7 @@ class BitbakeTests(OESelftestTestCase):
def test_bitbake_invalid_target(self):
result = bitbake('asdf', ignore_status=True)
- self.assertTrue("ERROR: Nothing PROVIDES 'asdf'" in result.output, msg = "Though no 'asdf' target exists, bitbake didn't output any err. message. bitbake output: %s" % result.output)
+ self.assertIn("ERROR: Nothing PROVIDES 'asdf'", result.output)
def test_warnings_errors(self):
result = bitbake('-b asdf', ignore_status=True)
@@ -123,7 +123,7 @@ class BitbakeTests(OESelftestTestCase):
for f in ['pn-buildlist', 'task-depends.dot']:
self.addCleanup(os.remove, f)
self.assertTrue('Task dependencies saved to \'task-depends.dot\'' in result.output, msg = "No task dependency \"task-depends.dot\" file was generated for the given task target. bitbake output: %s" % result.output)
- self.assertTrue(recipe in ftools.read_file(os.path.join(self.builddir, 'task-depends.dot')), msg = "No \"%s\" dependency found in task-depends.dot file." % recipe)
+ self.assertIn(recipe, ftools.read_file(os.path.join(self.builddir, 'task-depends.dot')))
def test_image_manifest(self):
bitbake('core-image-minimal')
@@ -147,8 +147,7 @@ INHERIT_remove = \"report-error\"
bitbake('-ccleanall man-db')
self.delete_recipeinc('man-db')
self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output)
- self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \
-doesn't exist, yet no error message encountered. bitbake output: %s" % result.output)
+ self.assertIn('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:', result.output)
line = self.getline(result, 'Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.')
self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \
doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output)
@@ -173,7 +172,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
def test_environment(self):
self.write_config("TEST_ENV=\"localconf\"")
result = runCmd('bitbake -e | grep TEST_ENV=')
- self.assertTrue('localconf' in result.output, msg = "bitbake didn't report any value for TEST_ENV variable. To test, run 'bitbake -e | grep TEST_ENV='")
+ self.assertIn('localconf', result.output)
def test_dry_run(self):
result = runCmd('bitbake -n m4-native')
@@ -193,10 +192,10 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
self.track_for_cleanup(preconf)
ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"")
result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
- self.assertTrue('prefile' in result.output, "Preconfigure file \"prefile.conf\"was not taken into consideration. ")
+ self.assertIn('prefile', result.output)
self.write_config("TEST_PREFILE=\"localconf\"")
result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
- self.assertTrue('localconf' in result.output, "Preconfigure file \"prefile.conf\"was not taken into consideration.")
+ self.assertIn('localconf', result.output)
def test_postfile(self):
postconf = os.path.join(self.builddir, 'conf/postfile.conf')
@@ -204,7 +203,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"")
self.write_config("TEST_POSTFILE=\"localconf\"")
result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')
- self.assertTrue('postfile' in result.output, "Postconfigure file \"postfile.conf\"was not taken into consideration.")
+ self.assertIn('postfile', result.output)
def test_checkuri(self):
result = runCmd('bitbake -c checkuri m4')
diff --git a/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py b/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
index cf2a42aab..ef2eefa86 100644
--- a/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -124,7 +124,7 @@ class ImageFeatures(OESelftestTestCase):
# check if result image is sparse
image_stat = os.stat(image_path)
- self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512)
+ self.assertGreater(image_stat.st_size, image_stat.st_blocks * 512)
# check if the resulting gzip is valid
self.assertTrue(runCmd('gzip -t %s' % gzip_path))
diff --git a/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py b/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py
index 424a9e69c..904b5b409 100644
--- a/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py
+++ b/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py
@@ -73,3 +73,21 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
bitbake('core-image-minimal')
+class NoGPL3InImagesTests(OESelftestTestCase):
+ def test_core_image_minimal(self):
+ self.write_config("""
+INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
+""")
+ bitbake('core-image-minimal')
+
+ def test_core_image_full_cmdline(self):
+ self.write_config("""
+INHERIT += "testimage"\n
+INCOMPATIBLE_LICENSE_pn-core-image-full-cmdline = "GPL-3.0 LGPL-3.0"\n
+RDEPENDS_packagegroup-core-full-cmdline-utils_remove = "bash bc coreutils cpio ed findutils gawk grep mc mc-fish mc-helpers mc-helpers-perl sed tar time"\n
+RDEPENDS_packagegroup-core-full-cmdline-dev-utils_remove = "diffutils m4 make patch"\n
+RDEPENDS_packagegroup-core-full-cmdline-multiuser_remove = "gzip"\n
+""")
+ bitbake('core-image-full-cmdline')
+ bitbake('-c testimage core-image-full-cmdline')
+
diff --git a/poky/meta/lib/oeqa/selftest/cases/oescripts.py b/poky/meta/lib/oeqa/selftest/cases/oescripts.py
index c169885cf..80d8b2c4c 100644
--- a/poky/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/poky/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -121,3 +121,9 @@ class OEGitproxyTests(OESelftestTestCase):
if dash is None:
self.skipTest("No \"dash\" found on test system.")
self.run_oegitproxy(custom_shell=dash)
+
+class OeRunNativeTest(OESelftestTestCase):
+ def test_oe_run_native(self):
+ bitbake("qemu-helper-native -c addto_recipe_sysroot")
+ result = runCmd("oe-run-native qemu-helper-native tunctl -h")
+ self.assertIn("Delete: tunctl -d device-name [-f tun-clone-device]", result.output)
diff --git a/poky/meta/lib/oeqa/selftest/cases/recipetool.py b/poky/meta/lib/oeqa/selftest/cases/recipetool.py
index 1c701a40b..c1562c63b 100644
--- a/poky/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/poky/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -685,7 +685,9 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
self._test_appendsrcfile(testrecipe, filepath, srcdir=subdir)
bitbake('%s:do_unpack' % testrecipe)
- self.assertEqual(open(self.testfile, 'r').read(), open(os.path.join(srcdir, filepath), 'r').read())
+ with open(self.testfile, 'r') as testfile:
+ with open(os.path.join(srcdir, filepath), 'r') as makefilein:
+ self.assertEqual(testfile.read(), makefilein.read())
def test_recipetool_appendsrcfiles_basic(self, destdir=None):
newfiles = [self.testfile]
diff --git a/poky/meta/lib/oeqa/selftest/cases/runtime_test.py b/poky/meta/lib/oeqa/selftest/cases/runtime_test.py
index 3f212bd0e..7d3922ce4 100644
--- a/poky/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/poky/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -179,6 +179,8 @@ class TestImage(OESelftestTestCase):
distro = oe.lsb.distro_identifier()
if distro and distro == 'debian-8':
self.skipTest('virgl isn\'t working with Debian 8')
+ if distro and distro == 'centos-7':
+ self.skipTest('virgl isn\'t working with Centos 7')
qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
features = 'INHERIT += "testimage"\n'