summaryrefslogtreecommitdiff
path: root/poky/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/lib')
-rw-r--r--poky/meta/lib/oe/package_manager/deb/__init__.py4
-rw-r--r--poky/meta/lib/oe/recipeutils.py2
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/df.py2
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/runlevel.py22
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/reproducible.py38
5 files changed, 49 insertions, 19 deletions
diff --git a/poky/meta/lib/oe/package_manager/deb/__init__.py b/poky/meta/lib/oe/package_manager/deb/__init__.py
index 7fdfdaa4f..2ee68fefb 100644
--- a/poky/meta/lib/oe/package_manager/deb/__init__.py
+++ b/poky/meta/lib/oe/package_manager/deb/__init__.py
@@ -313,6 +313,10 @@ class DpkgPM(OpkgDpkgPM):
if not pkgs:
return
+ os.environ['D'] = self.target_rootfs
+ os.environ['OFFLINE_ROOT'] = self.target_rootfs
+ os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
+ os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
os.environ['INTERCEPT_DIR'] = self.intercepts_dir
if with_dependencies:
diff --git a/poky/meta/lib/oe/recipeutils.py b/poky/meta/lib/oe/recipeutils.py
index ef69ef207..407d16889 100644
--- a/poky/meta/lib/oe/recipeutils.py
+++ b/poky/meta/lib/oe/recipeutils.py
@@ -409,7 +409,7 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True, all_variants=F
fetch.download()
for pth in fetch.localpaths():
if pth not in localpaths:
- localpaths.append(pth)
+ localpaths.append(os.path.abspath(pth))
uri_values.append(srcuri)
fetch_urls(d)
diff --git a/poky/meta/lib/oeqa/runtime/cases/df.py b/poky/meta/lib/oeqa/runtime/cases/df.py
index 89fd0fb90..bb155c9cf 100644
--- a/poky/meta/lib/oeqa/runtime/cases/df.py
+++ b/poky/meta/lib/oeqa/runtime/cases/df.py
@@ -4,12 +4,14 @@
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfDataVar, skipIfInDataVar
from oeqa.runtime.decorator.package import OEHasPackage
class DfTest(OERuntimeTestCase):
@OETestDepends(['ssh.SSHTest.test_ssh'])
@OEHasPackage(['coreutils', 'busybox'])
+ @skipIfInDataVar('IMAGE_FEATURES', 'read-only-rootfs', 'Test case df requires a writable rootfs')
def test_df(self):
cmd = "df -P / | sed -n '2p' | awk '{print $4}'"
(status,output) = self.target.run(cmd)
diff --git a/poky/meta/lib/oeqa/runtime/cases/runlevel.py b/poky/meta/lib/oeqa/runtime/cases/runlevel.py
new file mode 100644
index 000000000..3a4df8ace
--- /dev/null
+++ b/poky/meta/lib/oeqa/runtime/cases/runlevel.py
@@ -0,0 +1,22 @@
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+
+import time
+
+class RunLevel_Test(OERuntimeTestCase):
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_runlevel_3(self):
+ (status, output) = self.target.run("init 3 && sleep 5 && runlevel")
+ runlevel= '5 3'
+ self.assertEqual(output, runlevel, msg='Failed to set current runlevel to runlevel 3, current runlevel : %s' % output[-1])
+ (status, output) = self.target.run("uname -a")
+ self.assertEqual(status, 0, msg='Failed to run uname command, output: %s' % output)
+
+ @OETestDepends(['runlevel.RunLevel_Test.test_runlevel_3'])
+ def test_runlevel_5(self):
+ (status, output) = self.target.run("init 5 && sleep 5 && runlevel")
+ runlevel = '3 5'
+ self.assertEqual(output, runlevel, msg='Failed to set current runlevel to runlevel 5, current runlevel : %s' % output[-1])
+ (status, output) = self.target.run('export DISPLAY=:0 && x11perf -aa10text')
+ self.assertEqual(status, 0, msg='Failed to run 2D graphic test, output: %s' % output)
diff --git a/poky/meta/lib/oeqa/selftest/cases/reproducible.py b/poky/meta/lib/oeqa/selftest/cases/reproducible.py
index deddf6e50..0963c2f11 100644
--- a/poky/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/poky/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -24,13 +24,13 @@ import datetime
# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201127-hwds3mcl/
# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201203-sua0pzvc/
# (both packages/ and packages-excluded/)
+
+# ruby-ri-docs, meson:
+#https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20210215-0_td9la2/packages/diff-html/
exclude_packages = [
- 'acpica-src',
'babeltrace2-ptest',
'bootchart2-doc',
'cups',
- 'cwautomacros',
- 'dtc',
'efivar',
'epiphany',
'gcr',
@@ -45,7 +45,6 @@ exclude_packages = [
'gstreamer1.0-python',
'gtk-doc',
'igt-gpu-tools',
- 'kernel-devsrc',
'libaprutil',
'libcap-ng',
'libhandy-1-src',
@@ -56,31 +55,25 @@ exclude_packages = [
'lttng-tools-dbg',
'lttng-tools-ptest',
'ltp',
- 'meson',
+ 'meson',
'ovmf-shell-efi',
'parted-ptest',
'perf',
'python3-cython',
'qemu',
- 'quilt-ptest',
'rsync',
- 'ruby',
+ 'ruby-ri-docs',
'swig',
'syslinux-misc',
- 'systemd-bootchart',
- 'valgrind-ptest',
- 'vim',
- 'watchdog',
- 'xmlto',
- 'xorg-minimal-fonts'
+ 'systemd-bootchart'
]
def is_excluded(package):
package_name = os.path.basename(package)
for i in exclude_packages:
if package_name.startswith(i):
- return True
- return False
+ return i
+ return None
MISSING = 'MISSING'
DIFFERENT = 'DIFFERENT'
@@ -106,14 +99,17 @@ class PackageCompareResults(object):
self.different = []
self.different_excluded = []
self.same = []
+ self.active_exclusions = set()
def add_result(self, r):
self.total.append(r)
if r.status == MISSING:
self.missing.append(r)
elif r.status == DIFFERENT:
- if is_excluded(r.reference):
+ exclusion = is_excluded(r.reference)
+ if exclusion:
self.different_excluded.append(r)
+ self.active_exclusions.add(exclusion)
else:
self.different.append(r)
else:
@@ -127,7 +123,10 @@ class PackageCompareResults(object):
self.same.sort()
def __str__(self):
- return 'same=%i different=%i different_excluded=%i missing=%i total=%i' % (len(self.same), len(self.different), len(self.different_excluded), len(self.missing), len(self.total))
+ return 'same=%i different=%i different_excluded=%i missing=%i total=%i\nunused_exclusions=%s' % (len(self.same), len(self.different), len(self.different_excluded), len(self.missing), len(self.total), self.unused_exclusions())
+
+ def unused_exclusions(self):
+ return sorted(set(exclude_packages) - self.active_exclusions)
def compare_file(reference, test, diffutils_sysroot):
result = CompareResult()
@@ -260,9 +259,10 @@ class ReproducibleTests(OESelftestTestCase):
# mirror, forcing a complete build from scratch
config += textwrap.dedent('''\
SSTATE_DIR = "${TMPDIR}/sstate"
- SSTATE_MIRROR = ""
+ SSTATE_MIRRORS = ""
''')
+ 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))
@@ -289,6 +289,7 @@ class ReproducibleTests(OESelftestTestCase):
self.logger.info('Non-reproducible packages will be copied to %s', save_dir)
vars_A = self.do_test_build('reproducibleA', self.build_from_sstate)
+
vars_B = self.do_test_build('reproducibleB', False)
# NOTE: The temp directories from the reproducible build are purposely
@@ -303,6 +304,7 @@ class ReproducibleTests(OESelftestTestCase):
deploy_A = vars_A['DEPLOY_DIR_' + c.upper()]
deploy_B = vars_B['DEPLOY_DIR_' + c.upper()]
+ self.logger.info('Checking %s packages for differences...' % c)
result = self.compare_packages(deploy_A, deploy_B, diffutils_sysroot)
self.logger.info('Reproducibility summary for %s: %s' % (c, result))