summaryrefslogtreecommitdiff
path: root/poky/meta/lib/oeqa/selftest/cases
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/lib/oeqa/selftest/cases')
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/fitimage.py36
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/gotoolchain.py15
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py26
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/oescripts.py2
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/reproducible.py54
5 files changed, 58 insertions, 75 deletions
diff --git a/poky/meta/lib/oeqa/selftest/cases/fitimage.py b/poky/meta/lib/oeqa/selftest/cases/fitimage.py
index 0958036a6..02692de82 100644
--- a/poky/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/poky/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -69,9 +69,9 @@ FIT_DESC = "A model description"
'type = "ramdisk";',
'load = <0x88000000>;',
'entry = <0x88000000>;',
- 'default = "conf@1";',
- 'kernel = "kernel@1";',
- 'ramdisk = "ramdisk@1";'
+ 'default = "conf-1";',
+ 'kernel = "kernel-1";',
+ 'ramdisk = "ramdisk-1";'
]
with open(fitimage_its_path) as its_file:
@@ -137,12 +137,12 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'"
"%s FIT image doesn't exist" % (fitimage_path))
req_itspaths = [
- ['/', 'images', 'kernel@1'],
- ['/', 'images', 'kernel@1', 'signature@1'],
- ['/', 'images', 'fdt@am335x-boneblack.dtb'],
- ['/', 'images', 'fdt@am335x-boneblack.dtb', 'signature@1'],
- ['/', 'configurations', 'conf@am335x-boneblack.dtb'],
- ['/', 'configurations', 'conf@am335x-boneblack.dtb', 'signature@1'],
+ ['/', 'images', 'kernel-1'],
+ ['/', 'images', 'kernel-1', 'signature-1'],
+ ['/', 'images', 'fdt-am335x-boneblack.dtb'],
+ ['/', 'images', 'fdt-am335x-boneblack.dtb', 'signature-1'],
+ ['/', 'configurations', 'conf-am335x-boneblack.dtb'],
+ ['/', 'configurations', 'conf-am335x-boneblack.dtb', 'signature-1'],
]
itspath = []
@@ -158,7 +158,7 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'"
elif line.endswith('{'):
itspath.append(line[:-1].strip())
itspaths.append(itspath[:])
- elif itspath and itspath[-1] == 'signature@1':
+ elif itspath and itspath[-1] == 'signature-1':
itsdotpath = '.'.join(itspath)
if not itsdotpath in sigs:
sigs[itsdotpath] = {}
@@ -182,7 +182,7 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'"
}
for itspath, values in sigs.items():
- if 'conf@' in itspath:
+ if 'conf-' in itspath:
reqsigvalues = reqsigvalues_config
else:
reqsigvalues = reqsigvalues_image
@@ -210,9 +210,9 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'"
signed_sections[in_signed] = {}
key, value = line.split(':', 1)
signed_sections[in_signed][key.strip()] = value.strip()
- self.assertIn('kernel@1', signed_sections)
- self.assertIn('fdt@am335x-boneblack.dtb', signed_sections)
- self.assertIn('conf@am335x-boneblack.dtb', signed_sections)
+ self.assertIn('kernel-1', signed_sections)
+ self.assertIn('fdt-am335x-boneblack.dtb', signed_sections)
+ self.assertIn('conf-am335x-boneblack.dtb', signed_sections)
for signed_section, values in signed_sections.items():
value = values.get('Sign algo', None)
self.assertEqual(value, 'sha256,rsa2048:oe-selftest', 'Signature algorithm for %s not expected value' % signed_section)
@@ -298,7 +298,7 @@ FIT_HASH_ALG = "sha256"
its_lines = [line.strip() for line in its_file.readlines()]
exp_node_lines = [
- 'kernel@1 {',
+ 'kernel-1 {',
'description = "Linux kernel";',
'data = /incbin/("' + initramfs_bundle + '");',
'type = "kernel";',
@@ -307,7 +307,7 @@ FIT_HASH_ALG = "sha256"
'compression = "none";',
'load = <' + kernel_load + '>;',
'entry = <' + kernel_entry + '>;',
- 'hash@1 {',
+ 'hash-1 {',
'algo = "' + fit_hash_alg +'";',
'};',
'};'
@@ -327,7 +327,7 @@ FIT_HASH_ALG = "sha256"
else:
self.assertTrue(test_passed == True,"kernel node does not match expectation")
- rx_configs = re.compile("^conf@.*")
+ rx_configs = re.compile("^conf-.*")
its_configs = list(filter(rx_configs.match, its_lines))
for cfg_str in its_configs:
@@ -348,7 +348,7 @@ FIT_HASH_ALG = "sha256"
else:
print("kernel keyword found in the description line")
- if 'kernel = "kernel@1";' not in node:
+ if 'kernel = "kernel-1";' not in node:
self.assertTrue(test_passed == True,"kernel line not found")
break
else:
diff --git a/poky/meta/lib/oeqa/selftest/cases/gotoolchain.py b/poky/meta/lib/oeqa/selftest/cases/gotoolchain.py
index 3119520f0..4fc3605f4 100644
--- a/poky/meta/lib/oeqa/selftest/cases/gotoolchain.py
+++ b/poky/meta/lib/oeqa/selftest/cases/gotoolchain.py
@@ -46,26 +46,25 @@ class oeGoToolchainSelfTest(OESelftestTestCase):
shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True)
super(oeGoToolchainSelfTest, cls).tearDownClass()
- def run_sdk_go_command(self, gocmd):
- cmd = "cd %s; " % self.tmpdir_SDKQA
+ def run_sdk_go_command(self, gocmd, proj, name):
+ cmd = "cd %s/src/%s/%s; " % (self.go_path, proj, name)
cmd = cmd + ". %s; " % self.env_SDK
cmd = cmd + "export GOPATH=%s; " % self.go_path
cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd
return runCmd(cmd).status
def test_go_dep_build(self):
- proj = "github.com/golang"
- name = "dep"
- ver = "v0.3.1"
+ proj = "github.com/direnv"
+ name = "direnv"
+ ver = "v2.27.0"
archive = ".tar.gz"
url = "https://%s/%s/archive/%s%s" % (proj, name, ver, archive)
runCmd("cd %s; wget %s" % (self.tmpdir_SDKQA, url))
runCmd("cd %s; tar -xf %s" % (self.tmpdir_SDKQA, ver+archive))
runCmd("mkdir -p %s/src/%s" % (self.go_path, proj))
- runCmd("mv %s/dep-0.3.1 %s/src/%s/%s"
+ runCmd("mv %s/direnv-2.27.0 %s/src/%s/%s"
% (self.tmpdir_SDKQA, self.go_path, proj, name))
- retv = self.run_sdk_go_command('build %s/%s/cmd/dep'
- % (proj, name))
+ retv = self.run_sdk_go_command('build', proj, name)
self.assertEqual(retv, 0,
msg="Running go build failed for %s" % name)
diff --git a/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py b/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py
index 2a6382a1a..152da6332 100644
--- a/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py
+++ b/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py
@@ -15,66 +15,66 @@ class IncompatibleLicenseTests(OESelftestTestCase):
# Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
# cannot be built when INCOMPATIBLE_LICENSE contains this SPDX license
def test_incompatible_spdx_license(self):
- self.lic_test('incompatible-license', 'GPL-3.0', 'GPL-3.0')
+ self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPL-3.0-only')
# Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
# cannot be built when INCOMPATIBLE_LICENSE contains an alias (in
# SPDXLICENSEMAP) of this SPDX license
def test_incompatible_alias_spdx_license(self):
- self.lic_test('incompatible-license', 'GPL-3.0', 'GPLv3')
+ self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPLv3')
# Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
# cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded license
# matching this SPDX license
def test_incompatible_spdx_license_wildcard(self):
- self.lic_test('incompatible-license', 'GPL-3.0', '*GPL-3.0')
+ self.lic_test('incompatible-license', 'GPL-3.0-only', '*GPL-3.0-only')
# Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
# cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded alias
# license matching this SPDX license
def test_incompatible_alias_spdx_license_wildcard(self):
- self.lic_test('incompatible-license', 'GPL-3.0', '*GPLv3')
+ self.lic_test('incompatible-license', 'GPL-3.0-only', '*GPLv3')
# Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
# license cannot be built when INCOMPATIBLE_LICENSE contains this SPDX
# license
def test_incompatible_spdx_license_alias(self):
- self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPL-3.0')
+ self.lic_test('incompatible-license-alias', 'GPL-3.0-only', 'GPL-3.0-only')
# Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
# license cannot be built when INCOMPATIBLE_LICENSE contains this alias
def test_incompatible_alias_spdx_license_alias(self):
- self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPLv3')
+ self.lic_test('incompatible-license-alias', 'GPL-3.0-only', 'GPLv3')
# Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
# license cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded
# license matching this SPDX license
def test_incompatible_spdx_license_alias_wildcard(self):
- self.lic_test('incompatible-license-alias', 'GPL-3.0', '*GPL-3.0')
+ self.lic_test('incompatible-license-alias', 'GPL-3.0-only', '*GPL-3.0')
# Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
# license cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded
# alias license matching the SPDX license
def test_incompatible_alias_spdx_license_alias_wildcard(self):
- self.lic_test('incompatible-license-alias', 'GPL-3.0', '*GPLv3')
+ self.lic_test('incompatible-license-alias', 'GPL-3.0-only', '*GPLv3')
# Verify that a package with multiple SPDX licenses (from
# AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains
# some of them
def test_incompatible_spdx_licenses(self):
- self.lic_test('incompatible-licenses', 'GPL-3.0 LGPL-3.0', 'GPL-3.0 LGPL-3.0')
+ self.lic_test('incompatible-licenses', 'GPL-3.0-only LGPL-3.0-only', 'GPL-3.0-only LGPL-3.0-only')
# Verify that a package with multiple SPDX licenses (from
# AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a
# wildcard to some of them
def test_incompatible_spdx_licenses_wildcard(self):
- self.lic_test('incompatible-licenses', 'GPL-3.0 LGPL-3.0', '*GPL-3.0')
+ self.lic_test('incompatible-licenses', 'GPL-3.0-only LGPL-3.0-only', '*GPL-3.0-only')
# Verify that a package with multiple SPDX licenses (from
# AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a
# wildcard matching all licenses
def test_incompatible_all_licenses_wildcard(self):
- self.lic_test('incompatible-licenses', 'GPL-2.0 GPL-3.0 LGPL-3.0', '*')
+ self.lic_test('incompatible-licenses', 'GPL-2.0-only GPL-3.0-only LGPL-3.0-only', '*')
# Verify that a package with a non-SPDX license (neither in
# AVAILABLE_LICENSES nor in SPDXLICENSEMAP) cannot be built when
@@ -91,7 +91,7 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
def test_bash_default(self):
self.write_config(self.default_config())
- error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0+"
+ error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0-or-later"
result = bitbake('core-image-minimal', ignore_status=True)
if error_msg not in result.output:
@@ -99,7 +99,7 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
def test_bash_and_license(self):
self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " & SomeLicense"')
- error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0+"
+ error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0-or-later"
result = bitbake('core-image-minimal', ignore_status=True)
if error_msg not in result.output:
diff --git a/poky/meta/lib/oeqa/selftest/cases/oescripts.py b/poky/meta/lib/oeqa/selftest/cases/oescripts.py
index 726daff7c..8a10ff357 100644
--- a/poky/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/poky/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -167,7 +167,7 @@ class OEListPackageconfigTests(OEScriptTests):
def test_packageconfig_flags_option_all(self):
results = runCmd('%s/contrib/list-packageconfig-flags.py -a' % self.scripts_dir)
expected_endlines = []
- expected_endlines.append("pinentry-1.1.0")
+ expected_endlines.append("pinentry-1.1.1")
expected_endlines.append("PACKAGECONFIG ncurses libcap")
expected_endlines.append("PACKAGECONFIG[qt] --enable-pinentry-qt, --disable-pinentry-qt, qtbase-native qtbase")
expected_endlines.append("PACKAGECONFIG[gtk2] --enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0")
diff --git a/poky/meta/lib/oeqa/selftest/cases/reproducible.py b/poky/meta/lib/oeqa/selftest/cases/reproducible.py
index 0963c2f11..0d0259477 100644
--- a/poky/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/poky/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -28,44 +28,16 @@ import datetime
# ruby-ri-docs, meson:
#https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20210215-0_td9la2/packages/diff-html/
exclude_packages = [
- 'babeltrace2-ptest',
- 'bootchart2-doc',
- 'cups',
- 'efivar',
- 'epiphany',
- 'gcr',
- 'git',
'glide',
'go-dep',
'go-helloworld',
'go-runtime',
'go_',
- 'groff',
- 'gst-devtools',
- 'gstreamer1.0-python',
- 'gtk-doc',
- 'igt-gpu-tools',
- 'libaprutil',
- 'libcap-ng',
- 'libhandy-1-src',
- 'libid3tag',
- 'libproxy',
- 'libsecret-dev',
- 'libsecret-src',
- 'lttng-tools-dbg',
- 'lttng-tools-ptest',
- 'ltp',
- 'meson',
+ 'go-',
+ 'meson',
'ovmf-shell-efi',
- 'parted-ptest',
'perf',
- 'python3-cython',
- 'qemu',
- 'rsync',
- 'ruby-ri-docs',
- 'swig',
- 'syslinux-misc',
- 'systemd-bootchart'
+ 'ruby-ri-docs'
]
def is_excluded(package):
@@ -137,7 +109,7 @@ def compare_file(reference, test, diffutils_sysroot):
result.status = MISSING
return result
- r = runCmd(['cmp', '--quiet', reference, test], native_sysroot=diffutils_sysroot, ignore_status=True)
+ r = runCmd(['cmp', '--quiet', reference, test], native_sysroot=diffutils_sysroot, ignore_status=True, sync=False)
if r.status:
result.status = DIFFERENT
@@ -173,8 +145,14 @@ class DiffoscopeTests(OESelftestTestCase):
self.assertTrue(os.path.exists(os.path.join(tmpdir, 'index.html')), "HTML index not found!")
class ReproducibleTests(OESelftestTestCase):
- package_classes = ['deb', 'ipk']
- images = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'world']
+ # Test the reproducibility of whatever is built between sstate_targets and targets
+
+ package_classes = ['deb', 'ipk', 'rpm']
+
+ # targets are the things we want to test the reproducibility of
+ targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world']
+ # sstate targets are things to pull from sstate to potentially cut build/debugging time
+ sstate_targets = []
save_results = False
if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ:
save_results = os.environ['OEQA_DEBUGGING_SAVED_OUTPUT']
@@ -255,6 +233,11 @@ class ReproducibleTests(OESelftestTestCase):
tmpdir=tmpdir)
if not use_sstate:
+ if self.sstate_targets:
+ self.logger.info("Building prebuild for %s (sstate allowed)..." % (name))
+ self.write_config(config)
+ bitbake(' '.join(self.sstate_targets))
+
# This config fragment will disable using shared and the sstate
# mirror, forcing a complete build from scratch
config += textwrap.dedent('''\
@@ -265,7 +248,8 @@ class ReproducibleTests(OESelftestTestCase):
self.logger.info("Building %s (sstate%s allowed)..." % (name, '' if use_sstate else ' NOT'))
self.write_config(config)
d = get_bb_vars(capture_vars)
- bitbake(' '.join(self.images))
+ # targets used to be called images
+ bitbake(' '.join(getattr(self, 'images', self.targets)))
return d
def test_reproducible_builds(self):