mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
Convert to new override syntax
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -90,7 +90,7 @@ def opkg_query(cmd_output):
|
||||
|
||||
def failed_postinsts_abort(pkgs, log_path):
|
||||
bb.fatal("""Postinstall scriptlets of %s have failed. If the intention is to defer them to first boot,
|
||||
then please place them into pkg_postinst_ontarget_${PN} ().
|
||||
then please place them into pkg_postinst_ontarget:${PN} ().
|
||||
Deferring to first boot via 'exit 1' is no longer supported.
|
||||
Details of the failure are in %s.""" %(pkgs, log_path))
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ class DpkgPM(OpkgDpkgPM):
|
||||
multilib_variants = self.d.getVar("MULTILIB_VARIANTS");
|
||||
for variant in multilib_variants.split():
|
||||
localdata = bb.data.createCopy(self.d)
|
||||
variant_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + variant, False)
|
||||
variant_tune = localdata.getVar("DEFAULTTUNE:virtclass-multilib-" + variant, False)
|
||||
orig_arch = localdata.getVar("DPKG_ARCH")
|
||||
localdata.setVar("DEFAULTTUNE", variant_tune)
|
||||
variant_arch = localdata.getVar("DPKG_ARCH")
|
||||
|
||||
@@ -19,7 +19,7 @@ def read_pkgdatafile(fn):
|
||||
import re
|
||||
with open(fn, 'r') as f:
|
||||
lines = f.readlines()
|
||||
r = re.compile("([^:]+):\s*(.*)")
|
||||
r = re.compile("(^.+?):\s+(.*)")
|
||||
for l in lines:
|
||||
m = r.match(l)
|
||||
if m:
|
||||
|
||||
@@ -414,7 +414,7 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True, all_variants=F
|
||||
|
||||
fetch_urls(d)
|
||||
if all_variants:
|
||||
# Get files for other variants e.g. in the case of a SRC_URI_append
|
||||
# Get files for other variants e.g. in the case of a SRC_URI:append
|
||||
localdata = bb.data.createCopy(d)
|
||||
variants = (localdata.getVar('BBCLASSEXTEND') or '').split()
|
||||
if variants:
|
||||
@@ -753,7 +753,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
|
||||
|
||||
destsubdir = rd.getVar('PN')
|
||||
if srcfiles:
|
||||
bbappendlines.append(('FILESEXTRAPATHS_prepend', ':=', '${THISDIR}/${PN}:'))
|
||||
bbappendlines.append(('FILESEXTRAPATHS:prepend', ':=', '${THISDIR}/${PN}:'))
|
||||
|
||||
appendoverride = ''
|
||||
if machine:
|
||||
@@ -772,7 +772,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
|
||||
# FIXME do we care if the entry is added by another bbappend that might go away?
|
||||
if not srcurientry in rd.getVar('SRC_URI').split():
|
||||
if machine:
|
||||
appendline('SRC_URI_append%s' % appendoverride, '=', ' ' + srcurientry)
|
||||
appendline('SRC_URI:append%s' % appendoverride, '=', ' ' + srcurientry)
|
||||
else:
|
||||
appendline('SRC_URI', '+=', srcurientry)
|
||||
copyfiles[newfile] = srcfile
|
||||
@@ -786,7 +786,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
|
||||
instfunclines.append(instdirline)
|
||||
instfunclines.append('install -m %s ${WORKDIR}/%s ${D}%s' % (perms, os.path.basename(srcfile), instdestpath))
|
||||
if instfunclines:
|
||||
bbappendlines.append(('do_install_append%s()' % appendoverride, '', instfunclines))
|
||||
bbappendlines.append(('do_install:append%s()' % appendoverride, '', instfunclines))
|
||||
|
||||
if redirect_output:
|
||||
bb.note('Writing append file %s (dry-run)' % appendpath)
|
||||
@@ -804,15 +804,15 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
|
||||
extvars = {'destsubdir': destsubdir}
|
||||
|
||||
def appendfile_varfunc(varname, origvalue, op, newlines):
|
||||
if varname == 'FILESEXTRAPATHS_prepend':
|
||||
if varname == 'FILESEXTRAPATHS:prepend':
|
||||
if origvalue.startswith('${THISDIR}/'):
|
||||
popline('FILESEXTRAPATHS_prepend')
|
||||
popline('FILESEXTRAPATHS:prepend')
|
||||
extvars['destsubdir'] = rd.expand(origvalue.split('${THISDIR}/', 1)[1].rstrip(':'))
|
||||
elif varname == 'PACKAGE_ARCH':
|
||||
if machine:
|
||||
popline('PACKAGE_ARCH')
|
||||
return (machine, None, 4, False)
|
||||
elif varname.startswith('do_install_append'):
|
||||
elif varname.startswith('do_install:append'):
|
||||
func = popline(varname)
|
||||
if func:
|
||||
instfunclines = [line.strip() for line in origvalue.strip('\n').splitlines()]
|
||||
@@ -824,7 +824,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
|
||||
splitval = split_var_value(origvalue, assignment=False)
|
||||
changed = False
|
||||
removevar = varname
|
||||
if varname in ['SRC_URI', 'SRC_URI_append%s' % appendoverride]:
|
||||
if varname in ['SRC_URI', 'SRC_URI:append%s' % appendoverride]:
|
||||
removevar = 'SRC_URI'
|
||||
line = popline(varname)
|
||||
if line:
|
||||
|
||||
@@ -59,7 +59,7 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCaches):
|
||||
return False
|
||||
|
||||
# Kernel modules are well namespaced. We don't want to depend on the kernel's checksum
|
||||
# if we're just doing an RRECOMMENDS_xxx = "kernel-module-*", not least because the checksum
|
||||
# if we're just doing an RRECOMMENDS:xxx = "kernel-module-*", not least because the checksum
|
||||
# is machine specific.
|
||||
# Therefore if we're not a kernel or a module recipe (inheriting the kernel classes)
|
||||
# and we reccomend a kernel-module, we exclude the dependency.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"runtime_core-image-minimal_qemuarm_20181225195701": {
|
||||
"runtime_core-image-minimal:qemuarm_20181225195701": {
|
||||
"configuration": {
|
||||
"DISTRO": "poky",
|
||||
"HOST_DISTRO": "ubuntu-16.04",
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
"expected_results": ""
|
||||
},
|
||||
"3": {
|
||||
"action": "Install a new package to the image, for example, acpid. Set the following line in conf/local.conf: IMAGE_INSTALL_append = \" acpid\"",
|
||||
"action": "Install a new package to the image, for example, acpid. Set the following line in conf/local.conf: IMAGE_INSTALL:append = \" acpid\"",
|
||||
"expected_results": ""
|
||||
},
|
||||
"4": {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"expected_results": "Expect both qemu to boot up successfully."
|
||||
}
|
||||
},
|
||||
"summary": "test_install_cross_toolchain_can_run_multiple_qemu_for_x86"
|
||||
"summary": "test_install_cross_toolchain_can_run_multiple_qemu_for:x86"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -186,7 +186,7 @@
|
||||
"expected_results": ""
|
||||
},
|
||||
"7": {
|
||||
"action": "IMAGE_INSTALL_append: \n\t- check that the \"change\" icon is present (represented by a pen icon) \n\t- click on the \"change\" icon and check that the variable becomes a text field, populated with the current value of the variable. \n\n\t- check that the save button is disabled when the text field is empty \n\t- insert test in the text field (for example \"package1\") and hit save; be aware that there is no input validation for this variable \n\t- check that a new \"delete\" icon(a trashcan) has appeared next to the pen icon \n\t- check that clicking on the trashcan icon resets the value to \"Not set\" and makes the trashcan icon dissapear \n\n",
|
||||
"action": "IMAGE_INSTALL:append: \n\t- check that the \"change\" icon is present (represented by a pen icon) \n\t- click on the \"change\" icon and check that the variable becomes a text field, populated with the current value of the variable. \n\n\t- check that the save button is disabled when the text field is empty \n\t- insert test in the text field (for example \"package1\") and hit save; be aware that there is no input validation for this variable \n\t- check that a new \"delete\" icon(a trashcan) has appeared next to the pen icon \n\t- check that clicking on the trashcan icon resets the value to \"Not set\" and makes the trashcan icon dissapear \n\n",
|
||||
"expected_results": ""
|
||||
},
|
||||
"8": {
|
||||
@@ -1574,7 +1574,7 @@
|
||||
"expected_results": "Open bitbake variables page. \n\n\t"
|
||||
},
|
||||
"5": {
|
||||
"action": "Click on change button for IMAGE_INSTALL_append and add a variable (ex: acpid). \n\n",
|
||||
"action": "Click on change button for IMAGE_INSTALL:append and add a variable (ex: acpid). \n\n",
|
||||
"expected_results": "Variable added. \n\n\t"
|
||||
},
|
||||
"6": {
|
||||
@@ -1590,7 +1590,7 @@
|
||||
"expected_results": "You should get results for ssh packages."
|
||||
}
|
||||
},
|
||||
"summary": "Test_IMAGE_INSTALL_append_variable"
|
||||
"summary": "Test_IMAGE_INSTALL:append_variable"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ from oeqa.core.decorator.depends import OETestDepends
|
||||
from oeqa.core.decorator.data import skipIfNotFeature
|
||||
|
||||
# need some kernel fragments
|
||||
# echo "KERNEL_FEATURES_append += \" features\/kernel\-sample\/kernel\-sample.scc\"" >> local.conf
|
||||
# echo "KERNEL_FEATURES:append += \" features\/kernel\-sample\/kernel\-sample.scc\"" >> local.conf
|
||||
class KSample(OERuntimeTestCase):
|
||||
def cmd_and_check(self, cmd='', match_string=''):
|
||||
status, output = self.target.run(cmd)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=284
|
||||
# testcase. Image under test must have meta-skeleton layer in bblayers and
|
||||
# IMAGE_INSTALL_append = " service" in local.conf
|
||||
# IMAGE_INSTALL:append = " service" in local.conf
|
||||
from oeqa.runtime.case import OERuntimeTestCase
|
||||
from oeqa.core.decorator.depends import OETestDepends
|
||||
from oeqa.core.decorator.data import skipIfDataVar
|
||||
|
||||
@@ -70,7 +70,7 @@ class TestSDKExt(TestSDKBase):
|
||||
f.write('SSTATE_MIRRORS += " \\n file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR'))
|
||||
f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR'))
|
||||
f.write('INHERIT += "own-mirrors"\n')
|
||||
f.write('PREMIRRORS_prepend = " git://git.yoctoproject.org/.* git://%s/git2/git.yoctoproject.org.BASENAME \\n "\n' % test_data.get('DL_DIR'))
|
||||
f.write('PREMIRRORS:prepend = " git://git.yoctoproject.org/.* git://%s/git2/git.yoctoproject.org.BASENAME \\n "\n' % test_data.get('DL_DIR'))
|
||||
|
||||
# We need to do this in case we have a minimal SDK
|
||||
subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \
|
||||
|
||||
@@ -70,8 +70,8 @@ class BitbakeTests(OESelftestTestCase):
|
||||
|
||||
def test_invalid_patch(self):
|
||||
# This patch should fail to apply.
|
||||
self.write_recipeinc('man-db', 'FILESEXTRAPATHS_prepend := "${THISDIR}/files:"\nSRC_URI += "file://0001-Test-patch-here.patch"')
|
||||
self.write_config("INHERIT_remove = \"report-error\"")
|
||||
self.write_recipeinc('man-db', 'FILESEXTRAPATHS:prepend := "${THISDIR}/files:"\nSRC_URI += "file://0001-Test-patch-here.patch"')
|
||||
self.write_config("INHERIT:remove = \"report-error\"")
|
||||
result = bitbake('man-db -c patch', ignore_status=True)
|
||||
self.delete_recipeinc('man-db')
|
||||
bitbake('-cclean man-db')
|
||||
@@ -139,7 +139,7 @@ class BitbakeTests(OESelftestTestCase):
|
||||
self.write_recipeinc('man-db', data)
|
||||
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
|
||||
SSTATE_DIR = \"${TOPDIR}/download-selftest\"
|
||||
INHERIT_remove = \"report-error\"
|
||||
INHERIT:remove = \"report-error\"
|
||||
""")
|
||||
self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
|
||||
|
||||
@@ -213,7 +213,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
|
||||
def test_continue(self):
|
||||
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
|
||||
SSTATE_DIR = \"${TOPDIR}/download-selftest\"
|
||||
INHERIT_remove = \"report-error\"
|
||||
INHERIT:remove = \"report-error\"
|
||||
""")
|
||||
self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
|
||||
self.write_recipeinc('man-db',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
|
||||
|
||||
@@ -78,9 +78,9 @@ class SanityOptionsTest(OESelftestTestCase):
|
||||
|
||||
def test_options_warnqa_errorqa_switch(self):
|
||||
|
||||
self.write_config("INHERIT_remove = \"report-error\"")
|
||||
self.write_config("INHERIT:remove = \"report-error\"")
|
||||
if "packages-list" not in get_bb_var("ERROR_QA"):
|
||||
self.append_config("ERROR_QA_append = \" packages-list\"")
|
||||
self.append_config("ERROR_QA:append = \" packages-list\"")
|
||||
|
||||
self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
|
||||
self.add_command_to_tearDown('bitbake -c clean xcursor-transparent-theme')
|
||||
@@ -90,8 +90,8 @@ class SanityOptionsTest(OESelftestTestCase):
|
||||
self.assertTrue(line and line.startswith("ERROR:"), msg=res.output)
|
||||
self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
|
||||
self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
|
||||
self.append_config('ERROR_QA_remove = "packages-list"')
|
||||
self.append_config('WARN_QA_append = " packages-list"')
|
||||
self.append_config('ERROR_QA:remove = "packages-list"')
|
||||
self.append_config('WARN_QA:append = " packages-list"')
|
||||
res = bitbake("xcursor-transparent-theme -f -c package")
|
||||
self.delete_recipeinc('xcursor-transparent-theme')
|
||||
line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
|
||||
@@ -168,7 +168,7 @@ class ToolchainOptions(OESelftestTestCase):
|
||||
Test that Fortran works by building a Hello, World binary.
|
||||
"""
|
||||
|
||||
features = 'FORTRAN_forcevariable = ",fortran"\n'
|
||||
features = 'FORTRAN:forcevariable = ",fortran"\n'
|
||||
self.write_config(features)
|
||||
bitbake('fortran-helloworld')
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ PACKAGE_CLASSES = "package_ipk"
|
||||
IMAGE_FEATURES = ""
|
||||
IMAGE_BUILDINFO_FILE = ""
|
||||
INIT_MANAGER = "sysvinit"
|
||||
IMAGE_INSTALL_remove = "ssh-pregen-hostkeys"
|
||||
IMAGE_INSTALL:remove = "ssh-pregen-hostkeys"
|
||||
|
||||
""")
|
||||
|
||||
|
||||
@@ -975,7 +975,7 @@ class DevtoolUpdateTests(DevtoolBase):
|
||||
self.assertExists(patchfile, 'Patch file not created')
|
||||
|
||||
# Check bbappend contents
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n',
|
||||
'SRC_URI += "file://0001-Add-our-custom-version.patch"\n',
|
||||
'\n']
|
||||
@@ -990,7 +990,7 @@ class DevtoolUpdateTests(DevtoolBase):
|
||||
result = runCmd('git reset HEAD^', cwd=tempsrcdir)
|
||||
result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
|
||||
self.assertNotExists(patchfile, 'Patch file not deleted')
|
||||
expectedlines2 = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines2 = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n']
|
||||
with open(bbappendfile, 'r') as f:
|
||||
self.assertEqual(expectedlines2, f.readlines())
|
||||
|
||||
@@ -110,7 +110,7 @@ The following recipes do not have a DESCRIPTION. Please add an entry for DESCRIP
|
||||
|
||||
missing_recipes = []
|
||||
recipes = []
|
||||
prefix = "RECIPE_MAINTAINER_pn-"
|
||||
prefix = "RECIPE_MAINTAINER:pn-"
|
||||
|
||||
# We could have used all_recipes() here, but this method will find
|
||||
# every recipe if we ever move to setting RECIPE_MAINTAINER in recipe files
|
||||
|
||||
@@ -26,11 +26,11 @@ class GenericEFITest(OESelftestTestCase):
|
||||
self.write_config(self,
|
||||
"""
|
||||
EFI_PROVIDER = "%s"
|
||||
IMAGE_FSTYPES_pn-%s_append = " wic"
|
||||
IMAGE_FSTYPES:pn-%s_append = " wic"
|
||||
MACHINE = "%s"
|
||||
MACHINE_FEATURES_append = " efi"
|
||||
MACHINE_FEATURES:append = " efi"
|
||||
WKS_FILE = "efi-bootdisk.wks.in"
|
||||
IMAGE_INSTALL_append = " grub-efi systemd-boot kernel-image-bzimage"
|
||||
IMAGE_INSTALL:append = " grub-efi systemd-boot kernel-image-bzimage"
|
||||
"""
|
||||
% (self.efi_provider, self.image, self.machine))
|
||||
if not self.recipes_built:
|
||||
|
||||
@@ -24,8 +24,8 @@ class Fetch(OESelftestTestCase):
|
||||
# No mirrors, should use git to fetch successfully
|
||||
features = """
|
||||
DL_DIR = "%s"
|
||||
MIRRORS_forcevariable = ""
|
||||
PREMIRRORS_forcevariable = ""
|
||||
MIRRORS:forcevariable = ""
|
||||
PREMIRRORS:forcevariable = ""
|
||||
""" % dldir
|
||||
self.write_config(features)
|
||||
oe.path.remove(dldir, recurse=True)
|
||||
@@ -35,8 +35,8 @@ PREMIRRORS_forcevariable = ""
|
||||
features = """
|
||||
DL_DIR = "%s"
|
||||
GIT_PROXY_COMMAND = "false"
|
||||
MIRRORS_forcevariable = ""
|
||||
PREMIRRORS_forcevariable = ""
|
||||
MIRRORS:forcevariable = ""
|
||||
PREMIRRORS:forcevariable = ""
|
||||
""" % dldir
|
||||
self.write_config(features)
|
||||
oe.path.remove(dldir, recurse=True)
|
||||
@@ -47,7 +47,7 @@ PREMIRRORS_forcevariable = ""
|
||||
features = """
|
||||
DL_DIR = "%s"
|
||||
GIT_PROXY_COMMAND = "false"
|
||||
MIRRORS_forcevariable = "git://.*/.* http://downloads.yoctoproject.org/mirror/sources/"
|
||||
MIRRORS:forcevariable = "git://.*/.* http://downloads.yoctoproject.org/mirror/sources/"
|
||||
""" % dldir
|
||||
self.write_config(features)
|
||||
oe.path.remove(dldir, recurse=True)
|
||||
|
||||
@@ -24,7 +24,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
|
||||
features.append('TOOLCHAIN_TEST_HOST_USER = "root"')
|
||||
features.append('TOOLCHAIN_TEST_HOST_PORT = "22"')
|
||||
# force single threaded test execution
|
||||
features.append('EGLIBCPARALLELISM_task-check_pn-glibc-testsuite = "PARALLELMFLAGS="-j1""')
|
||||
features.append('EGLIBCPARALLELISM_task-check:pn-glibc-testsuite = "PARALLELMFLAGS="-j1""')
|
||||
self.write_config("\n".join(features))
|
||||
|
||||
bitbake("glibc-testsuite -c check")
|
||||
|
||||
@@ -229,7 +229,7 @@ USERADD_GID_TABLES += "files/static-group"
|
||||
def test_no_busybox_base_utils(self):
|
||||
config = """
|
||||
# Enable wayland
|
||||
DISTRO_FEATURES_append += "pam opengl wayland"
|
||||
DISTRO_FEATURES:append += "pam opengl wayland"
|
||||
|
||||
# Switch to systemd
|
||||
DISTRO_FEATURES += "systemd"
|
||||
|
||||
@@ -85,8 +85,8 @@ class IncompatibleLicenseTests(OESelftestTestCase):
|
||||
class IncompatibleLicensePerImageTests(OESelftestTestCase):
|
||||
def default_config(self):
|
||||
return """
|
||||
IMAGE_INSTALL_append = " bash"
|
||||
INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
|
||||
IMAGE_INSTALL:append = " bash"
|
||||
INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
|
||||
"""
|
||||
|
||||
def test_bash_default(self):
|
||||
@@ -118,17 +118,17 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
|
||||
class NoGPL3InImagesTests(OESelftestTestCase):
|
||||
def test_core_image_minimal(self):
|
||||
self.write_config("""
|
||||
INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
|
||||
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
|
||||
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')
|
||||
|
||||
@@ -58,7 +58,7 @@ class KernelDev(OESelftestTestCase):
|
||||
recipe_append = os.path.join(self.recipeskernel_dir, 'linux-yocto_%.bbappend')
|
||||
with open(recipe_append, 'w+') as fh:
|
||||
fh.write('SRC_URI += "file://%s"\n' % patch_name)
|
||||
fh.write('FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"')
|
||||
fh.write('FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"')
|
||||
|
||||
runCmd('bitbake virtual/kernel -c clean')
|
||||
runCmd('bitbake virtual/kernel -c patch')
|
||||
|
||||
@@ -30,20 +30,20 @@ python do_build() {
|
||||
addtask build
|
||||
"""
|
||||
append = """
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI_append = " file://appendtest.txt"
|
||||
SRC_URI:append = " file://appendtest.txt"
|
||||
|
||||
sysroot_stage_all_append() {
|
||||
sysroot_stage_all:append() {
|
||||
install -m 644 ${WORKDIR}/appendtest.txt ${SYSROOT_DESTDIR}/
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
append2 = """
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI_append = " file://appendtest.txt"
|
||||
SRC_URI:append = " file://appendtest.txt"
|
||||
"""
|
||||
layerappend = ''
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class LicenseTests(OESelftestTestCase):
|
||||
os.close(lic_file)
|
||||
self.track_for_cleanup(lic_path)
|
||||
|
||||
self.write_config("INHERIT_remove = \"report-error\"")
|
||||
self.write_config("INHERIT:remove = \"report-error\"")
|
||||
|
||||
self.write_recipeinc('emptytest', """
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
@@ -17,7 +17,7 @@ class MultiConfig(OESelftestTestCase):
|
||||
"""
|
||||
|
||||
config = """
|
||||
IMAGE_INSTALL_append_pn-core-image-full-cmdline = " multiconfig-image-packager-tiny multiconfig-image-packager-musl"
|
||||
IMAGE_INSTALL:append:pn-core-image-full-cmdline = " multiconfig-image-packager-tiny multiconfig-image-packager-musl"
|
||||
BBMULTICONFIG = "tiny musl"
|
||||
"""
|
||||
self.write_config(config)
|
||||
@@ -52,7 +52,7 @@ TMPDIR = "${TOPDIR}/tmp-mc-tiny"
|
||||
self.write_config(config)
|
||||
|
||||
testconfig = textwrap.dedent('''\
|
||||
MCTESTVAR_append = "1"
|
||||
MCTESTVAR:append = "1"
|
||||
''')
|
||||
self.write_config(testconfig, 'test')
|
||||
|
||||
@@ -64,7 +64,7 @@ TMPDIR = "${TOPDIR}/tmp-mc-tiny"
|
||||
self.assertIn('MCTESTVAR=test1', result.output.splitlines())
|
||||
|
||||
testconfig = textwrap.dedent('''\
|
||||
MCTESTVAR_append = "2"
|
||||
MCTESTVAR:append = "2"
|
||||
''')
|
||||
self.write_config(testconfig, 'test')
|
||||
|
||||
|
||||
@@ -116,9 +116,9 @@ class PackageTests(OESelftestTestCase):
|
||||
|
||||
# Verify gdb to read symbols from separated debug hardlink file correctly
|
||||
def test_gdb_hardlink_debug(self):
|
||||
features = 'IMAGE_INSTALL_append = " selftest-hardlink"\n'
|
||||
features += 'IMAGE_INSTALL_append = " selftest-hardlink-dbg"\n'
|
||||
features += 'IMAGE_INSTALL_append = " selftest-hardlink-gdb"\n'
|
||||
features = 'IMAGE_INSTALL:append = " selftest-hardlink"\n'
|
||||
features += 'IMAGE_INSTALL:append = " selftest-hardlink-dbg"\n'
|
||||
features += 'IMAGE_INSTALL:append = " selftest-hardlink-gdb"\n'
|
||||
self.write_config(features)
|
||||
bitbake("core-image-minimal")
|
||||
|
||||
@@ -151,7 +151,7 @@ class PackageTests(OESelftestTestCase):
|
||||
|
||||
def test_preserve_ownership(self):
|
||||
import os, stat, oe.cachedpath
|
||||
features = 'IMAGE_INSTALL_append = " selftest-chown"\n'
|
||||
features = 'IMAGE_INSTALL:append = " selftest-chown"\n'
|
||||
self.write_config(features)
|
||||
bitbake("core-image-minimal")
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class BitbakePrTests(OESelftestTestCase):
|
||||
return str(stamps[0])
|
||||
|
||||
def increment_package_pr(self, package_name):
|
||||
inc_data = "do_package_append() {\n bb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\" > ${PKGDESTWORK}/${PN}.datestamp\n}" % datetime.datetime.now()
|
||||
inc_data = "do_package:append() {\n bb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\" > ${PKGDESTWORK}/${PN}.datestamp\n}" % datetime.datetime.now()
|
||||
self.write_recipeinc(package_name, inc_data)
|
||||
res = bitbake(package_name, ignore_status=True)
|
||||
self.delete_recipeinc(package_name)
|
||||
|
||||
@@ -94,7 +94,7 @@ class RecipetoolTests(RecipetoolBase):
|
||||
|
||||
def test_recipetool_appendfile_basic(self):
|
||||
# Basic test
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n']
|
||||
_, output = self._try_recipetool_appendfile('base-files', '/etc/motd', self.testfile, '', expectedlines, ['motd'])
|
||||
self.assertNotIn('WARNING: ', output)
|
||||
@@ -112,11 +112,11 @@ class RecipetoolTests(RecipetoolBase):
|
||||
# Need a test file - should be executable
|
||||
testfile2 = os.path.join(self.corebase, 'oe-init-build-env')
|
||||
testfile2name = os.path.basename(testfile2)
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n',
|
||||
'SRC_URI += "file://%s"\n' % testfile2name,
|
||||
'\n',
|
||||
'do_install_append() {\n',
|
||||
'do_install:append() {\n',
|
||||
' install -d ${D}${base_bindir}\n',
|
||||
' install -m 0755 ${WORKDIR}/%s ${D}${base_bindir}/ls\n' % testfile2name,
|
||||
'}\n']
|
||||
@@ -138,11 +138,11 @@ class RecipetoolTests(RecipetoolBase):
|
||||
|
||||
def test_recipetool_appendfile_add(self):
|
||||
# Try arbitrary file add to a recipe
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n',
|
||||
'SRC_URI += "file://testfile"\n',
|
||||
'\n',
|
||||
'do_install_append() {\n',
|
||||
'do_install:append() {\n',
|
||||
' install -d ${D}${datadir}\n',
|
||||
' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n',
|
||||
'}\n']
|
||||
@@ -151,13 +151,13 @@ class RecipetoolTests(RecipetoolBase):
|
||||
# (so we're testing that, plus modifying an existing bbappend)
|
||||
testfile2 = os.path.join(self.corebase, 'oe-init-build-env')
|
||||
testfile2name = os.path.basename(testfile2)
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n',
|
||||
'SRC_URI += "file://testfile \\\n',
|
||||
' file://%s \\\n' % testfile2name,
|
||||
' "\n',
|
||||
'\n',
|
||||
'do_install_append() {\n',
|
||||
'do_install:append() {\n',
|
||||
' install -d ${D}${datadir}\n',
|
||||
' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n',
|
||||
' install -m 0755 ${WORKDIR}/%s ${D}${datadir}/scriptname\n' % testfile2name,
|
||||
@@ -166,11 +166,11 @@ class RecipetoolTests(RecipetoolBase):
|
||||
|
||||
def test_recipetool_appendfile_add_bindir(self):
|
||||
# Try arbitrary file add to a recipe, this time to a location such that should be installed as executable
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n',
|
||||
'SRC_URI += "file://testfile"\n',
|
||||
'\n',
|
||||
'do_install_append() {\n',
|
||||
'do_install:append() {\n',
|
||||
' install -d ${D}${bindir}\n',
|
||||
' install -m 0755 ${WORKDIR}/testfile ${D}${bindir}/selftest-recipetool-testbin\n',
|
||||
'}\n']
|
||||
@@ -179,13 +179,13 @@ class RecipetoolTests(RecipetoolBase):
|
||||
|
||||
def test_recipetool_appendfile_add_machine(self):
|
||||
# Try arbitrary file add to a recipe, this time to a location such that should be installed as executable
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n',
|
||||
'PACKAGE_ARCH = "${MACHINE_ARCH}"\n',
|
||||
'\n',
|
||||
'SRC_URI_append_mymachine = " file://testfile"\n',
|
||||
'SRC_URI:append_mymachine = " file://testfile"\n',
|
||||
'\n',
|
||||
'do_install_append_mymachine() {\n',
|
||||
'do_install:append_mymachine() {\n',
|
||||
' install -d ${D}${datadir}\n',
|
||||
' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n',
|
||||
'}\n']
|
||||
@@ -194,32 +194,32 @@ class RecipetoolTests(RecipetoolBase):
|
||||
|
||||
def test_recipetool_appendfile_orig(self):
|
||||
# A file that's in SRC_URI and in do_install with the same name
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n']
|
||||
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-orig', self.testfile, '', expectedlines, ['selftest-replaceme-orig'])
|
||||
self.assertNotIn('WARNING: ', output)
|
||||
|
||||
def test_recipetool_appendfile_todir(self):
|
||||
# A file that's in SRC_URI and in do_install with destination directory rather than file
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n']
|
||||
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-todir', self.testfile, '', expectedlines, ['selftest-replaceme-todir'])
|
||||
self.assertNotIn('WARNING: ', output)
|
||||
|
||||
def test_recipetool_appendfile_renamed(self):
|
||||
# A file that's in SRC_URI with a different name to the destination file
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n']
|
||||
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-renamed', self.testfile, '', expectedlines, ['file1'])
|
||||
self.assertNotIn('WARNING: ', output)
|
||||
|
||||
def test_recipetool_appendfile_subdir(self):
|
||||
# A file that's in SRC_URI in a subdir
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n',
|
||||
'SRC_URI += "file://testfile"\n',
|
||||
'\n',
|
||||
'do_install_append() {\n',
|
||||
'do_install:append() {\n',
|
||||
' install -d ${D}${datadir}\n',
|
||||
' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-subdir\n',
|
||||
'}\n']
|
||||
@@ -228,25 +228,25 @@ class RecipetoolTests(RecipetoolBase):
|
||||
|
||||
def test_recipetool_appendfile_inst_glob(self):
|
||||
# A file that's in do_install as a glob
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n']
|
||||
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-globfile', self.testfile, '', expectedlines, ['selftest-replaceme-inst-globfile'])
|
||||
self.assertNotIn('WARNING: ', output)
|
||||
|
||||
def test_recipetool_appendfile_inst_todir_glob(self):
|
||||
# A file that's in do_install as a glob with destination as a directory
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n']
|
||||
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-todir-globfile', self.testfile, '', expectedlines, ['selftest-replaceme-inst-todir-globfile'])
|
||||
self.assertNotIn('WARNING: ', output)
|
||||
|
||||
def test_recipetool_appendfile_patch(self):
|
||||
# A file that's added by a patch in SRC_URI
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n',
|
||||
'SRC_URI += "file://testfile"\n',
|
||||
'\n',
|
||||
'do_install_append() {\n',
|
||||
'do_install:append() {\n',
|
||||
' install -d ${D}${sysconfdir}\n',
|
||||
' install -m 0644 ${WORKDIR}/testfile ${D}${sysconfdir}/selftest-replaceme-patched\n',
|
||||
'}\n']
|
||||
@@ -260,11 +260,11 @@ class RecipetoolTests(RecipetoolBase):
|
||||
|
||||
def test_recipetool_appendfile_script(self):
|
||||
# Now, a file that's in SRC_URI but installed by a script (so no mention in do_install)
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n',
|
||||
'SRC_URI += "file://testfile"\n',
|
||||
'\n',
|
||||
'do_install_append() {\n',
|
||||
'do_install:append() {\n',
|
||||
' install -d ${D}${datadir}\n',
|
||||
' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-scripted\n',
|
||||
'}\n']
|
||||
@@ -273,7 +273,7 @@ class RecipetoolTests(RecipetoolBase):
|
||||
|
||||
def test_recipetool_appendfile_inst_func(self):
|
||||
# A file that's installed from a function called by do_install
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n']
|
||||
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-func', self.testfile, '', expectedlines, ['selftest-replaceme-inst-func'])
|
||||
self.assertNotIn('WARNING: ', output)
|
||||
@@ -283,11 +283,11 @@ class RecipetoolTests(RecipetoolBase):
|
||||
# First try without specifying recipe
|
||||
self._try_recipetool_appendfile_fail('/usr/share/selftest-replaceme-postinst', self.testfile, ['File /usr/share/selftest-replaceme-postinst may be written out in a pre/postinstall script of the following recipes:', 'selftest-recipetool-appendfile'])
|
||||
# Now specify recipe
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n',
|
||||
'SRC_URI += "file://testfile"\n',
|
||||
'\n',
|
||||
'do_install_append() {\n',
|
||||
'do_install:append() {\n',
|
||||
' install -d ${D}${datadir}\n',
|
||||
' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-postinst\n',
|
||||
'}\n']
|
||||
@@ -430,10 +430,10 @@ class RecipetoolTests(RecipetoolBase):
|
||||
urls.append('npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json')
|
||||
checkvars['SRC_URI'] = set(urls)
|
||||
checkvars['S'] = '${WORKDIR}/npm'
|
||||
checkvars['LICENSE_${PN}'] = 'MIT'
|
||||
checkvars['LICENSE_${PN}-base64'] = 'Unknown'
|
||||
checkvars['LICENSE_${PN}-accepts'] = 'MIT'
|
||||
checkvars['LICENSE_${PN}-inherits'] = 'ISC'
|
||||
checkvars['LICENSE:${PN}'] = 'MIT'
|
||||
checkvars['LICENSE:${PN}-base64'] = 'Unknown'
|
||||
checkvars['LICENSE:${PN}-accepts'] = 'MIT'
|
||||
checkvars['LICENSE:${PN}-inherits'] = 'ISC'
|
||||
inherits = ['npm']
|
||||
self._test_recipe_contents(recipefile, checkvars, inherits)
|
||||
|
||||
@@ -620,7 +620,7 @@ class RecipetoolAppendsrcBase(RecipetoolBase):
|
||||
else:
|
||||
destpath = '.' + os.sep
|
||||
|
||||
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
|
||||
expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
|
||||
'\n']
|
||||
if has_src_uri:
|
||||
uri = 'file://%s' % filename
|
||||
|
||||
@@ -52,7 +52,7 @@ class RecipeUtilsTests(OESelftestTestCase):
|
||||
+SRC_URI[md5sum] = "aaaaaa"
|
||||
SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
|
||||
|
||||
RDEPENDS_${PN} += "${PYTHON_PN}-threading"
|
||||
RDEPENDS:${PN} += "${PYTHON_PN}-threading"
|
||||
"""
|
||||
patchlines = []
|
||||
for f in patches:
|
||||
@@ -80,7 +80,7 @@ class RecipeUtilsTests(OESelftestTestCase):
|
||||
|
||||
-SRC_URI += "file://somefile"
|
||||
-
|
||||
SRC_URI_append = " file://anotherfile"
|
||||
SRC_URI:append = " file://anotherfile"
|
||||
"""
|
||||
patchlines = []
|
||||
for f in patches:
|
||||
@@ -105,7 +105,7 @@ class RecipeUtilsTests(OESelftestTestCase):
|
||||
|
||||
-SRC_URI += "file://somefile"
|
||||
-
|
||||
-SRC_URI_append = " file://anotherfile"
|
||||
-SRC_URI:append = " file://anotherfile"
|
||||
"""
|
||||
patchlines = []
|
||||
for f in patches:
|
||||
|
||||
@@ -220,7 +220,7 @@ class ReproducibleTests(OESelftestTestCase):
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
TMPDIR = "{tmpdir}"
|
||||
LICENSE_FLAGS_WHITELIST = "commercial"
|
||||
DISTRO_FEATURES_append = ' systemd pam'
|
||||
DISTRO_FEATURES:append = ' systemd pam'
|
||||
USERADDEXTENSION = "useradd-staticids"
|
||||
USERADD_ERROR_DYNAMIC = "skip"
|
||||
USERADD_UID_TABLES += "files/static-passwd"
|
||||
|
||||
@@ -120,7 +120,7 @@ class TestImage(OESelftestTestCase):
|
||||
self.skipTest('core-image-full-cmdline not buildable for poky-tiny')
|
||||
|
||||
features = 'INHERIT += "testimage"\n'
|
||||
features += 'IMAGE_INSTALL_append = " libssl"\n'
|
||||
features += 'IMAGE_INSTALL:append = " libssl"\n'
|
||||
features += 'TEST_SUITES = "ping ssh selftest"\n'
|
||||
self.write_config(features)
|
||||
|
||||
@@ -186,14 +186,14 @@ class TestImage(OESelftestTestCase):
|
||||
qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
|
||||
features = 'INHERIT += "testimage"\n'
|
||||
if 'gtk+' not in qemu_packageconfig:
|
||||
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"\n'
|
||||
features += 'PACKAGECONFIG:append:pn-qemu-system-native = " gtk+"\n'
|
||||
if 'sdl' not in qemu_packageconfig:
|
||||
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " sdl"\n'
|
||||
features += 'PACKAGECONFIG:append:pn-qemu-system-native = " sdl"\n'
|
||||
if 'opengl' not in qemu_distrofeatures:
|
||||
features += 'DISTRO_FEATURES_append = " opengl"\n'
|
||||
features += 'DISTRO_FEATURES:append = " opengl"\n'
|
||||
features += 'TEST_SUITES = "ping ssh virgl"\n'
|
||||
features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
|
||||
features += 'IMAGE_INSTALL_append = " kmscube"\n'
|
||||
features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
|
||||
features += 'IMAGE_INSTALL:append = " kmscube"\n'
|
||||
features_gtk = features + 'TEST_RUNQEMUPARAMS = "gtk gl"\n'
|
||||
self.write_config(features_gtk)
|
||||
bitbake('core-image-minimal')
|
||||
@@ -225,10 +225,10 @@ class TestImage(OESelftestTestCase):
|
||||
qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
|
||||
features = 'INHERIT += "testimage"\n'
|
||||
if 'opengl' not in qemu_distrofeatures:
|
||||
features += 'DISTRO_FEATURES_append = " opengl"\n'
|
||||
features += 'DISTRO_FEATURES:append = " opengl"\n'
|
||||
features += 'TEST_SUITES = "ping ssh virgl"\n'
|
||||
features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
|
||||
features += 'IMAGE_INSTALL_append = " kmscube"\n'
|
||||
features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
|
||||
features += 'IMAGE_INSTALL:append = " kmscube"\n'
|
||||
features += 'TEST_RUNQEMUPARAMS = "egl-headless"\n'
|
||||
self.write_config(features)
|
||||
bitbake('core-image-minimal')
|
||||
@@ -254,7 +254,7 @@ class Postinst(OESelftestTestCase):
|
||||
features += 'IMAGE_FEATURES += "package-management empty-root-password"\n'
|
||||
features += 'PACKAGE_CLASSES = "%s"\n' % classes
|
||||
if init_manager == "systemd":
|
||||
features += 'DISTRO_FEATURES_append = " systemd"\n'
|
||||
features += 'DISTRO_FEATURES:append = " systemd"\n'
|
||||
features += 'VIRTUAL-RUNTIME_init_manager = "systemd"\n'
|
||||
features += 'DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"\n'
|
||||
features += 'VIRTUAL-RUNTIME_initscripts = ""\n'
|
||||
@@ -371,14 +371,14 @@ TEST_SERVER_IP = "192.168.7.1"
|
||||
TEST_TARGET_IP = "192.168.7.2"
|
||||
|
||||
EXTRA_IMAGE_FEATURES += "tools-profile dbg-pkgs"
|
||||
IMAGE_FEATURES_append = " ssh-server-dropbear"
|
||||
IMAGE_FEATURES:append = " ssh-server-dropbear"
|
||||
|
||||
# enables kernel debug symbols
|
||||
KERNEL_EXTRA_FEATURES_append = " features/debug/debug-kernel.scc"
|
||||
KERNEL_EXTRA_FEATURES_append = " features/systemtap/systemtap.scc"
|
||||
KERNEL_EXTRA_FEATURES:append = " features/debug/debug-kernel.scc"
|
||||
KERNEL_EXTRA_FEATURES:append = " features/systemtap/systemtap.scc"
|
||||
|
||||
# add systemtap run-time into target image if it is not there yet
|
||||
IMAGE_INSTALL_append = " systemtap-runtime"
|
||||
IMAGE_INSTALL:append = " systemtap-runtime"
|
||||
"""
|
||||
|
||||
def test_crosstap_helloworld(self):
|
||||
|
||||
@@ -145,7 +145,7 @@ class Signing(OESelftestTestCase):
|
||||
feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
|
||||
feature += 'SSTATE_DIR = "%s"\n' % sstatedir
|
||||
# Any mirror might have partial sstate without .sig files, triggering failures
|
||||
feature += 'SSTATE_MIRRORS_forcevariable = ""\n'
|
||||
feature += 'SSTATE_MIRRORS:forcevariable = ""\n'
|
||||
|
||||
self.write_config(feature)
|
||||
|
||||
@@ -206,7 +206,7 @@ class LockedSignatures(OESelftestTestCase):
|
||||
# Use uuid so hash equivalance server isn't triggered
|
||||
recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend'
|
||||
recipe_append_path = os.path.join(templayerdir, 'recipes-test', test_recipe, recipe_append_file)
|
||||
feature = 'SUMMARY_${PN} = "test locked signature%s"\n' % uuid.uuid4()
|
||||
feature = 'SUMMARY:${PN} = "test locked signature%s"\n' % uuid.uuid4()
|
||||
|
||||
os.mkdir(os.path.join(templayerdir, 'recipes-test'))
|
||||
os.mkdir(os.path.join(templayerdir, 'recipes-test', test_recipe))
|
||||
|
||||
@@ -174,7 +174,7 @@ class SStateTests(SStateBase):
|
||||
|
||||
# If buildhistory is enabled, we need to disable version-going-backwards
|
||||
# QA checks for this test. It may report errors otherwise.
|
||||
self.append_config('ERROR_QA_remove = "version-going-backwards"')
|
||||
self.append_config('ERROR_QA:remove = "version-going-backwards"')
|
||||
|
||||
# For not this only checks if random sstate tasks are handled correctly as a group.
|
||||
# In the future we should add control over what tasks we check for.
|
||||
@@ -360,7 +360,7 @@ TCLIBCAPPEND = \"\"
|
||||
MACHINE = \"qemux86-64\"
|
||||
require conf/multilib.conf
|
||||
MULTILIBS = \"multilib:lib32\"
|
||||
DEFAULTTUNE_virtclass-multilib-lib32 = \"x86\"
|
||||
DEFAULTTUNE:virtclass-multilib-lib32 = \"x86\"
|
||||
BB_SIGNATURE_HANDLER = "OEBasicHash"
|
||||
"""
|
||||
configB = """
|
||||
@@ -414,7 +414,7 @@ TCLIBCAPPEND = \"\"
|
||||
MACHINE = \"qemux86\"
|
||||
require conf/multilib.conf
|
||||
MULTILIBS = "multilib:lib32"
|
||||
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
|
||||
DEFAULTTUNE:virtclass-multilib-lib32 = "x86"
|
||||
BB_SIGNATURE_HANDLER = "OEBasicHash"
|
||||
""")
|
||||
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
|
||||
@@ -425,7 +425,7 @@ TCLIBCAPPEND = \"\"
|
||||
MACHINE = \"qemux86copy\"
|
||||
require conf/multilib.conf
|
||||
MULTILIBS = "multilib:lib32"
|
||||
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
|
||||
DEFAULTTUNE:virtclass-multilib-lib32 = "x86"
|
||||
BB_SIGNATURE_HANDLER = "OEBasicHash"
|
||||
""")
|
||||
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
|
||||
@@ -462,7 +462,7 @@ TCLIBCAPPEND = \"\"
|
||||
MACHINE = \"qemux86\"
|
||||
require conf/multilib.conf
|
||||
MULTILIBS = "multilib:lib32"
|
||||
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
|
||||
DEFAULTTUNE:virtclass-multilib-lib32 = "x86"
|
||||
BB_SIGNATURE_HANDLER = "OEBasicHash"
|
||||
""")
|
||||
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
|
||||
@@ -503,7 +503,7 @@ PARALLEL_MAKE = "-j 1"
|
||||
DL_DIR = "${TOPDIR}/download1"
|
||||
TIME = "111111"
|
||||
DATE = "20161111"
|
||||
INHERIT_remove = "buildstats-summary buildhistory uninative"
|
||||
INHERIT:remove = "buildstats-summary buildhistory uninative"
|
||||
http_proxy = ""
|
||||
BB_SIGNATURE_HANDLER = "OEBasicHash"
|
||||
""")
|
||||
@@ -519,7 +519,7 @@ DL_DIR = "${TOPDIR}/download2"
|
||||
TIME = "222222"
|
||||
DATE = "20161212"
|
||||
# Always remove uninative as we're changing proxies
|
||||
INHERIT_remove = "uninative"
|
||||
INHERIT:remove = "uninative"
|
||||
INHERIT += "buildstats-summary buildhistory"
|
||||
http_proxy = "http://example.com/"
|
||||
BB_SIGNATURE_HANDLER = "OEBasicHash"
|
||||
|
||||
@@ -24,14 +24,14 @@ class SysrootTests(OESelftestTestCase):
|
||||
self.write_config("""
|
||||
PREFERRED_PROVIDER_virtual/sysroot-test = "sysroot-test-arch1"
|
||||
MACHINE = "qemux86"
|
||||
TESTSTRING_pn-sysroot-test-arch1 = "%s"
|
||||
TESTSTRING_pn-sysroot-test-arch2 = "%s"
|
||||
TESTSTRING:pn-sysroot-test-arch1 = "%s"
|
||||
TESTSTRING:pn-sysroot-test-arch2 = "%s"
|
||||
""" % (uuid1, uuid2))
|
||||
bitbake("sysroot-test")
|
||||
self.write_config("""
|
||||
PREFERRED_PROVIDER_virtual/sysroot-test = "sysroot-test-arch2"
|
||||
MACHINE = "qemux86copy"
|
||||
TESTSTRING_pn-sysroot-test-arch1 = "%s"
|
||||
TESTSTRING_pn-sysroot-test-arch2 = "%s"
|
||||
TESTSTRING:pn-sysroot-test-arch1 = "%s"
|
||||
TESTSTRING:pn-sysroot-test-arch2 = "%s"
|
||||
""" % (uuid1, uuid2))
|
||||
bitbake("sysroot-test")
|
||||
|
||||
@@ -173,8 +173,8 @@ class TinfoilTests(OESelftestTestCase):
|
||||
self.assertEqual(value, 'origvalue', 'Variable renamed using config_data.renameVar() does not appear with new name')
|
||||
# Test overrides
|
||||
tinfoil.config_data.setVar('TESTVAR', 'original')
|
||||
tinfoil.config_data.setVar('TESTVAR_overrideone', 'one')
|
||||
tinfoil.config_data.setVar('TESTVAR_overridetwo', 'two')
|
||||
tinfoil.config_data.setVar('TESTVAR:overrideone', 'one')
|
||||
tinfoil.config_data.setVar('TESTVAR:overridetwo', 'two')
|
||||
tinfoil.config_data.appendVar('OVERRIDES', ':overrideone')
|
||||
value = tinfoil.config_data.getVar('TESTVAR')
|
||||
self.assertEqual(value, 'one', 'Variable overrides not functioning correctly')
|
||||
|
||||
@@ -189,8 +189,8 @@ class Wic(WicTestCase):
|
||||
def test_iso_image(self):
|
||||
"""Test creation of hybrid iso image with legacy and EFI boot"""
|
||||
config = 'INITRAMFS_IMAGE = "core-image-minimal-initramfs"\n'\
|
||||
'MACHINE_FEATURES_append = " efi"\n'\
|
||||
'DEPENDS_pn-core-image-minimal += "syslinux"\n'
|
||||
'MACHINE_FEATURES:append = " efi"\n'\
|
||||
'DEPENDS:pn-core-image-minimal += "syslinux"\n'
|
||||
self.append_config(config)
|
||||
bitbake('core-image-minimal core-image-minimal-initramfs')
|
||||
self.remove_config(config)
|
||||
@@ -216,7 +216,7 @@ class Wic(WicTestCase):
|
||||
@only_for_arch(['i586', 'i686', 'x86_64'])
|
||||
def test_bootloader_config(self):
|
||||
"""Test creation of directdisk-bootloader-config image"""
|
||||
config = 'DEPENDS_pn-core-image-minimal += "syslinux"\n'
|
||||
config = 'DEPENDS:pn-core-image-minimal += "syslinux"\n'
|
||||
self.append_config(config)
|
||||
bitbake('core-image-minimal')
|
||||
self.remove_config(config)
|
||||
@@ -227,7 +227,7 @@ class Wic(WicTestCase):
|
||||
@only_for_arch(['i586', 'i686', 'x86_64'])
|
||||
def test_systemd_bootdisk(self):
|
||||
"""Test creation of systemd-bootdisk image"""
|
||||
config = 'MACHINE_FEATURES_append = " efi"\n'
|
||||
config = 'MACHINE_FEATURES:append = " efi"\n'
|
||||
self.append_config(config)
|
||||
bitbake('core-image-minimal')
|
||||
self.remove_config(config)
|
||||
@@ -259,7 +259,7 @@ class Wic(WicTestCase):
|
||||
"""Test default output location"""
|
||||
for fname in glob("directdisk-*.direct"):
|
||||
os.remove(fname)
|
||||
config = 'DEPENDS_pn-core-image-minimal += "syslinux"\n'
|
||||
config = 'DEPENDS:pn-core-image-minimal += "syslinux"\n'
|
||||
self.append_config(config)
|
||||
bitbake('core-image-minimal')
|
||||
self.remove_config(config)
|
||||
@@ -757,7 +757,7 @@ class Wic2(WicTestCase):
|
||||
def test_wic_image_type(self):
|
||||
"""Test building wic images by bitbake"""
|
||||
config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "wic-image-minimal"\n'\
|
||||
'MACHINE_FEATURES_append = " efi"\n'
|
||||
'MACHINE_FEATURES:append = " efi"\n'
|
||||
self.append_config(config)
|
||||
self.assertEqual(0, bitbake('wic-image-minimal').status)
|
||||
self.remove_config(config)
|
||||
@@ -777,7 +777,7 @@ class Wic2(WicTestCase):
|
||||
def test_qemu(self):
|
||||
"""Test wic-image-minimal under qemu"""
|
||||
config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "wic-image-minimal"\n'\
|
||||
'MACHINE_FEATURES_append = " efi"\n'
|
||||
'MACHINE_FEATURES:append = " efi"\n'
|
||||
self.append_config(config)
|
||||
self.assertEqual(0, bitbake('wic-image-minimal').status)
|
||||
self.remove_config(config)
|
||||
|
||||
Reference in New Issue
Block a user