summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases')
-rw-r--r--meta/lib/oeqa/selftest/cases/debuginfod.py14
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py77
-rw-r--r--meta/lib/oeqa/selftest/cases/layerappend.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/oescripts.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py34
-rw-r--r--meta/lib/oeqa/selftest/cases/recipeutils.py4
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/runtime_test.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/rust.py5
-rw-r--r--meta/lib/oeqa/selftest/cases/sstatetests.py31
10 files changed, 101 insertions, 72 deletions
diff --git a/meta/lib/oeqa/selftest/cases/debuginfod.py b/meta/lib/oeqa/selftest/cases/debuginfod.py
index 505b4be837..46c0cd87bb 100644
--- a/meta/lib/oeqa/selftest/cases/debuginfod.py
+++ b/meta/lib/oeqa/selftest/cases/debuginfod.py
@@ -62,7 +62,7 @@ class Debuginfod(OESelftestTestCase):
raise TimeoutError("Cannot connect debuginfod, still %d scan jobs running" % latest)
- def start_debuginfod(self):
+ def start_debuginfod(self, feed_dir):
# We assume that the caller has already bitbake'd elfutils-native:do_addto_recipe_sysroot
# Save some useful paths for later
@@ -82,7 +82,7 @@ class Debuginfod(OESelftestTestCase):
# Disable rescanning, this is a one-shot test
"--rescan-time=0",
"--groom-time=0",
- get_bb_var("DEPLOY_DIR"),
+ feed_dir,
]
format = get_bb_var("PACKAGE_CLASSES").split()[0]
@@ -114,11 +114,12 @@ class Debuginfod(OESelftestTestCase):
self.write_config("""
TMPDIR = "${TOPDIR}/tmp-debuginfod"
DISTRO_FEATURES:append = " debuginfod"
+INHERIT += "localpkgfeed"
""")
- bitbake("elfutils-native:do_addto_recipe_sysroot xz xz:do_package")
+ bitbake("elfutils-native:do_addto_recipe_sysroot xz xz:do_package xz:do_localpkgfeed")
try:
- self.start_debuginfod()
+ self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz"))
env = os.environ.copy()
env["DEBUGINFOD_URLS"] = "http://localhost:%d/" % self.port
@@ -141,12 +142,13 @@ DISTRO_FEATURES:append = " debuginfod"
self.write_config("""
TMPDIR = "${TOPDIR}/tmp-debuginfod"
DISTRO_FEATURES:append = " debuginfod"
+INHERIT += "localpkgfeed"
CORE_IMAGE_EXTRA_INSTALL += "elfutils xz"
""")
- bitbake("core-image-minimal elfutils-native:do_addto_recipe_sysroot")
+ bitbake("core-image-minimal elfutils-native:do_addto_recipe_sysroot xz:do_localpkgfeed")
try:
- self.start_debuginfod()
+ self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz"))
with runqemu("core-image-minimal", runqemuparams="nographic") as qemu:
cmd = "DEBUGINFOD_URLS=http://%s:%d/ debuginfod-find debuginfo /usr/bin/xz" % (qemu.server_ip, self.port)
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 51949e3c93..1cafb922ea 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -286,10 +286,13 @@ class DevtoolTestCase(OESelftestTestCase):
else:
self.skipTest('No tap devices found - you must set up tap devices with scripts/runqemu-gen-tapdevs before running this test')
- def _test_devtool_add_git_url(self, git_url, version, pn, resulting_src_uri):
+ def _test_devtool_add_git_url(self, git_url, version, pn, resulting_src_uri, srcrev=None):
self.track_for_cleanup(self.workspacedir)
self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool add --version %s %s %s' % (version, pn, git_url))
+ command = 'devtool add --version %s %s %s' % (version, pn, git_url)
+ if srcrev :
+ command += ' --srcrev %s' %srcrev
+ result = runCmd(command)
self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
# Check the recipe name is correct
recipefile = get_bb_var('FILE', pn)
@@ -479,11 +482,12 @@ class DevtoolAddTests(DevtoolBase):
def test_devtool_add_git_style2(self):
version = 'v3.1.0'
+ srcrev = 'v3.1.0'
pn = 'mbedtls'
# this will trigger reformat_git_uri with branch parameter in url
git_url = "'git://git@github.com/ARMmbed/mbedtls.git;protocol=https'"
- resulting_src_uri = "gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master"
- self._test_devtool_add_git_url(git_url, version, pn, resulting_src_uri)
+ resulting_src_uri = "git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master"
+ self._test_devtool_add_git_url(git_url, version, pn, resulting_src_uri, srcrev)
def test_devtool_add_library(self):
# Fetch source
@@ -749,6 +753,25 @@ class DevtoolModifyTests(DevtoolBase):
result = runCmd('devtool status')
self.assertNotIn('mdadm', result.output)
+ def test_devtool_modify_go(self):
+ import oe.path
+ from tempfile import TemporaryDirectory
+ with TemporaryDirectory(prefix='devtoolqa') as tempdir:
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c clean go-helloworld')
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool modify go-helloworld -x %s' % tempdir)
+ self.assertExists(
+ oe.path.join(tempdir, 'src', 'golang.org', 'x', 'example', 'go.mod'),
+ 'Extracted source could not be found'
+ )
+ self.assertExists(
+ oe.path.join(self.workspacedir, 'conf', 'layer.conf'),
+ 'Workspace directory not created'
+ )
+ matches = glob.glob(oe.path.join(self.workspacedir, 'appends', 'go-helloworld_*.bbappend'))
+ self.assertTrue(matches, 'bbappend not created %s' % result.output)
+
def test_devtool_buildclean(self):
def assertFile(path, *paths):
f = os.path.join(path, *paths)
@@ -875,13 +898,8 @@ class DevtoolModifyTests(DevtoolBase):
self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
- srcfile = os.path.join(tempdir, 'oe-local-files/share/dot.bashrc')
- srclink = os.path.join(tempdir, 'share/dot.bashrc')
+ srcfile = os.path.join(tempdir, 'share/dot.bashrc')
self.assertExists(srcfile, 'Extracted source could not be found')
- if os.path.islink(srclink) and os.path.exists(srclink) and os.path.samefile(srcfile, srclink):
- correct_symlink = True
- self.assertTrue(correct_symlink, 'Source symlink to oe-local-files is broken')
-
matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % testrecipe))
self.assertTrue(matches, 'bbappend not created')
# Test devtool status
@@ -952,9 +970,9 @@ class DevtoolModifyTests(DevtoolBase):
# others git:// in SRC_URI
# cointains a patch
testrecipe = 'hello-rs'
- bb_vars = get_bb_vars(['SRC_URI', 'FILE', 'WORKDIR', 'CARGO_HOME'], testrecipe)
+ bb_vars = get_bb_vars(['SRC_URI', 'FILE', 'UNPACKDIR', 'CARGO_HOME'], testrecipe)
recipefile = bb_vars['FILE']
- workdir = bb_vars['WORKDIR']
+ unpackdir = bb_vars['UNPACKDIR']
cargo_home = bb_vars['CARGO_HOME']
src_uri = bb_vars['SRC_URI'].split()
self.assertTrue(src_uri[0].startswith('git://'),
@@ -1025,7 +1043,7 @@ class DevtoolModifyTests(DevtoolBase):
self.assertEqual(parms['type'], 'git-dependency', 'git dependencies uri should have "type=git-dependency"')
raw_url = raw_url.replace("git://", '%s://' % parms['protocol'])
patch_line = '[patch."%s"]' % raw_url
- path_patched = os.path.join(workdir, parms['destsuffix'])
+ path_patched = os.path.join(unpackdir, parms['destsuffix'])
path_override_line = '%s = { path = "%s" }' % (parms['name'], path_patched)
# Would have been better to use tomllib to read this file :/
self.assertIn(patch_line, cargo_config_contents)
@@ -1274,7 +1292,7 @@ class DevtoolUpdateTests(DevtoolBase):
with open(bbappendfile, 'r') as f:
self.assertEqual(expectedlines, f.readlines())
# Drop new commit and check patch gets deleted
- result = runCmd('git reset HEAD^', cwd=tempsrcdir)
+ result = runCmd('git reset HEAD^ --hard', 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',
@@ -1283,6 +1301,7 @@ class DevtoolUpdateTests(DevtoolBase):
self.assertEqual(expectedlines2, f.readlines())
# Put commit back and check we can run it if layer isn't in bblayers.conf
os.remove(bbappendfile)
+ result = runCmd("sed 's!\\(#define VERSION\\W*\"[^\"]*\\)\"!\\1-custom\"!' -i ReadMe.c", cwd=tempsrcdir)
result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir)
result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir)
result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
@@ -1357,7 +1376,7 @@ class DevtoolUpdateTests(DevtoolBase):
with open(bbappendfile, 'r') as f:
self.assertEqual(expectedlines, set(f.readlines()))
# Drop new commit and check SRCREV changes
- result = runCmd('git reset HEAD^', cwd=tempsrcdir)
+ result = runCmd('git reset HEAD^ --hard', cwd=tempsrcdir)
result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
self.assertNotExists(os.path.join(appenddir, testrecipe), 'Patch directory should not be created')
result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
@@ -1369,6 +1388,7 @@ class DevtoolUpdateTests(DevtoolBase):
self.assertEqual(expectedlines, set(f.readlines()))
# Put commit back and check we can run it if layer isn't in bblayers.conf
os.remove(bbappendfile)
+ result = runCmd('echo "# Additional line" >> Makefile.am', cwd=tempsrcdir)
result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempsrcdir)
result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir)
result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
@@ -1400,11 +1420,12 @@ class DevtoolUpdateTests(DevtoolBase):
# Try building just to ensure we haven't broken that
bitbake("%s" % testrecipe)
# Edit / commit local source
- runCmd('echo "/* Foobar */" >> oe-local-files/makedevs.c', cwd=tempdir)
- runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
+ runCmd('echo "/* Foobar */" >> makedevs.c', cwd=tempdir)
+ runCmd('echo "Foo" > new-local', cwd=tempdir)
runCmd('echo "Bar" > new-file', cwd=tempdir)
runCmd('git add new-file', cwd=tempdir)
runCmd('git commit -m "Add new file"', cwd=tempdir)
+ runCmd('git add new-local', cwd=tempdir)
runCmd('devtool update-recipe %s' % testrecipe)
expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
(' M', '.*/makedevs/makedevs.c$'),
@@ -1430,8 +1451,8 @@ class DevtoolUpdateTests(DevtoolBase):
self.assertExists(local_file, 'File makedevs.c not created')
self.assertExists(patchfile, 'File new_local not created')
- def test_devtool_update_recipe_local_files_2(self):
- """Check local source files support when oe-local-files is in Git"""
+ def _test_devtool_update_recipe_local_files_2(self):
+ """Check local source files support when editing local files in Git"""
testrecipe = 'devtool-test-local'
recipefile = get_bb_var('FILE', testrecipe)
recipedir = os.path.dirname(recipefile)
@@ -1446,17 +1467,13 @@ class DevtoolUpdateTests(DevtoolBase):
result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
# Check git repo
self._check_src_repo(tempdir)
- # Add oe-local-files to Git
- runCmd('rm oe-local-files/.gitignore', cwd=tempdir)
- runCmd('git add oe-local-files', cwd=tempdir)
- runCmd('git commit -m "Add local sources"', cwd=tempdir)
# Edit / commit local sources
- runCmd('echo "# Foobar" >> oe-local-files/file1', cwd=tempdir)
+ runCmd('echo "# Foobar" >> file1', cwd=tempdir)
runCmd('git commit -am "Edit existing file"', cwd=tempdir)
- runCmd('git rm oe-local-files/file2', cwd=tempdir)
+ runCmd('git rm file2', cwd=tempdir)
runCmd('git commit -m"Remove file"', cwd=tempdir)
- runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
- runCmd('git add oe-local-files/new-local', cwd=tempdir)
+ runCmd('echo "Foo" > new-local', cwd=tempdir)
+ runCmd('git add new-local', cwd=tempdir)
runCmd('git commit -m "Add new local file"', cwd=tempdir)
runCmd('echo "Gar" > new-file', cwd=tempdir)
runCmd('git add new-file', cwd=tempdir)
@@ -1465,7 +1482,7 @@ class DevtoolUpdateTests(DevtoolBase):
os.path.dirname(recipefile))
# Checkout unmodified file to working copy -> devtool should still pick
# the modified version from HEAD
- runCmd('git checkout HEAD^ -- oe-local-files/file1', cwd=tempdir)
+ runCmd('git checkout HEAD^ -- file1', cwd=tempdir)
runCmd('devtool update-recipe %s' % testrecipe)
expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
(' M', '.*/file1$'),
@@ -1540,7 +1557,7 @@ class DevtoolUpdateTests(DevtoolBase):
# (don't bother with cleaning the recipe on teardown, we won't be building it)
result = runCmd('devtool modify %s' % testrecipe)
# Modify one file
- runCmd('echo "Another line" >> file2', cwd=os.path.join(self.workspacedir, 'sources', testrecipe, 'oe-local-files'))
+ runCmd('echo "Another line" >> file2', cwd=os.path.join(self.workspacedir, 'sources', testrecipe))
self.add_command_to_tearDown('cd %s; rm %s/*; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
result = runCmd('devtool update-recipe %s' % testrecipe)
expected_status = [(' M', '.*/%s/file2$' % testrecipe)]
@@ -1769,6 +1786,8 @@ class DevtoolExtractTests(DevtoolBase):
# Definitions
testrecipe = 'mdadm'
testfile = '/sbin/mdadm'
+ if "usrmerge" in get_bb_var('DISTRO_FEATURES'):
+ testfile = '/usr/sbin/mdadm'
testimage = 'oe-selftest-image'
testcommand = '/sbin/mdadm --help'
# Build an image to run
diff --git a/meta/lib/oeqa/selftest/cases/layerappend.py b/meta/lib/oeqa/selftest/cases/layerappend.py
index 379ed589ad..64b17117cc 100644
--- a/meta/lib/oeqa/selftest/cases/layerappend.py
+++ b/meta/lib/oeqa/selftest/cases/layerappend.py
@@ -37,7 +37,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI:append = " file://appendtest.txt"
sysroot_stage_all:append() {
- install -m 644 ${WORKDIR}/appendtest.txt ${SYSROOT_DESTDIR}/
+ install -m 644 ${UNPACKDIR}/appendtest.txt ${SYSROOT_DESTDIR}/
}
"""
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
index f69efccfee..fcfe54af74 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -175,7 +175,7 @@ class OEListPackageconfigTests(OESelftestTestCase):
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.2.1")
+ expected_endlines.append("pinentry-1.3.0")
expected_endlines.append("PACKAGECONFIG ncurses")
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/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index aebea42502..42202b7831 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -120,9 +120,15 @@ class RecipetoolAppendTests(RecipetoolBase):
self._try_recipetool_appendfile_fail('/dev/console', self.testfile, ['ERROR: /dev/console cannot be handled by this tool'])
def test_recipetool_appendfile_alternatives(self):
+ lspath = '/bin/ls'
+ dirname = "base_bindir"
+ if "usrmerge" in get_bb_var('DISTRO_FEATURES'):
+ lspath = '/usr/bin/ls'
+ dirname = "bindir"
+
# Now try with a file we know should be an alternative
# (this is very much a fake example, but one we know is reliably an alternative)
- self._try_recipetool_appendfile_fail('/bin/ls', self.testfile, ['ERROR: File /bin/ls is an alternative possibly provided by the following recipes:', 'coreutils', 'busybox'])
+ self._try_recipetool_appendfile_fail(lspath, self.testfile, ['ERROR: File %s is an alternative possibly provided by the following recipes:' % lspath, 'coreutils', 'busybox'])
# Need a test file - should be executable
testfile2 = os.path.join(self.corebase, 'oe-init-build-env')
testfile2name = os.path.basename(testfile2)
@@ -131,12 +137,12 @@ class RecipetoolAppendTests(RecipetoolBase):
'SRC_URI += "file://%s"\n' % testfile2name,
'\n',
'do_install:append() {\n',
- ' install -d ${D}${base_bindir}\n',
- ' install -m 0755 ${WORKDIR}/%s ${D}${base_bindir}/ls\n' % testfile2name,
+ ' install -d ${D}${%s}\n' % dirname,
+ ' install -m 0755 ${UNPACKDIR}/%s ${D}${%s}/ls\n' % (testfile2name, dirname),
'}\n']
- self._try_recipetool_appendfile('coreutils', '/bin/ls', testfile2, '-r coreutils', expectedlines, [testfile2name])
+ self._try_recipetool_appendfile('coreutils', lspath, testfile2, '-r coreutils', expectedlines, [testfile2name])
# Now try bbappending the same file again, contents should not change
- bbappendfile, _ = self._try_recipetool_appendfile('coreutils', '/bin/ls', self.testfile, '-r coreutils', expectedlines, [testfile2name])
+ bbappendfile, _ = self._try_recipetool_appendfile('coreutils', lspath, self.testfile, '-r coreutils', expectedlines, [testfile2name])
# But file should have
copiedfile = os.path.join(os.path.dirname(bbappendfile), 'coreutils', testfile2name)
result = runCmd('diff -q %s %s' % (testfile2, copiedfile), ignore_status=True)
@@ -158,7 +164,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/something\n',
'}\n']
self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase', expectedlines, ['testfile'])
# Try adding another file, this time where the source file is executable
@@ -173,8 +179,8 @@ class RecipetoolAppendTests(RecipetoolBase):
'\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,
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/something\n',
+ ' install -m 0755 ${UNPACKDIR}/%s ${D}${datadir}/scriptname\n' % testfile2name,
'}\n']
self._try_recipetool_appendfile('netbase', '/usr/share/scriptname', testfile2, '-r netbase', expectedlines, ['testfile', testfile2name])
@@ -186,7 +192,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${bindir}\n',
- ' install -m 0755 ${WORKDIR}/testfile ${D}${bindir}/selftest-recipetool-testbin\n',
+ ' install -m 0755 ${UNPACKDIR}/testfile ${D}${bindir}/selftest-recipetool-testbin\n',
'}\n']
_, output = self._try_recipetool_appendfile('netbase', '/usr/bin/selftest-recipetool-testbin', self.testfile, '-r netbase', expectedlines, ['testfile'])
self.assertNotIn('WARNING: ', output)
@@ -201,7 +207,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append:mymachine() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/something\n',
'}\n']
_, output = self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase -m mymachine', expectedlines, ['mymachine/testfile'])
self.assertNotIn('WARNING: ', output)
@@ -235,7 +241,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-subdir\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/selftest-replaceme-subdir\n',
'}\n']
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-subdir', self.testfile, '', expectedlines, ['testfile'])
self.assertNotIn('WARNING: ', output)
@@ -262,7 +268,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${sysconfdir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${sysconfdir}/selftest-replaceme-patched\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${sysconfdir}/selftest-replaceme-patched\n',
'}\n']
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/etc/selftest-replaceme-patched', self.testfile, '', expectedlines, ['testfile'])
for line in output.splitlines():
@@ -280,7 +286,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-scripted\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/selftest-replaceme-scripted\n',
'}\n']
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-scripted', self.testfile, '', expectedlines, ['testfile'])
self.assertNotIn('WARNING: ', output)
@@ -303,7 +309,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-postinst\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/selftest-replaceme-postinst\n',
'}\n']
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-postinst', self.testfile, '-r selftest-recipetool-appendfile', expectedlines, ['testfile'])
diff --git a/meta/lib/oeqa/selftest/cases/recipeutils.py b/meta/lib/oeqa/selftest/cases/recipeutils.py
index 2cb4445f81..9949737172 100644
--- a/meta/lib/oeqa/selftest/cases/recipeutils.py
+++ b/meta/lib/oeqa/selftest/cases/recipeutils.py
@@ -72,7 +72,7 @@ class RecipeUtilsTests(OESelftestTestCase):
expected_patch = """
--- a/recipes-test/recipeutils/recipeutils-test_1.2.bb
+++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb
-@@ -8,6 +8,4 @@
+@@ -11,6 +11,4 @@
BBCLASSEXTEND = "native nativesdk"
@@ -97,7 +97,7 @@ class RecipeUtilsTests(OESelftestTestCase):
expected_patch = """
--- a/recipes-test/recipeutils/recipeutils-test_1.2.bb
+++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb
-@@ -8,6 +8,3 @@
+@@ -11,6 +11,3 @@
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 80e830136f..97a9c3da90 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -16,6 +16,8 @@ import os
import datetime
exclude_packages = [
+ 'rust-rustdoc',
+ 'rust-dbg'
]
def is_excluded(package):
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 12000aac16..13aa5f16c9 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -273,7 +273,7 @@ TEST_RUNQEMUPARAMS += " slirp"
import subprocess, os
distro = oe.lsb.distro_identifier()
- if distro and (distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'ubuntu-16.04', 'ubuntu-18.04'] or
+ if distro and (distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'centos-9', 'ubuntu-16.04', 'ubuntu-18.04'] or
distro.startswith('almalinux') or distro.startswith('rocky')):
self.skipTest('virgl headless cannot be tested with %s' %(distro))
diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py
index ad14189c6d..4ccbe9867b 100644
--- a/meta/lib/oeqa/selftest/cases/rust.py
+++ b/meta/lib/oeqa/selftest/cases/rust.py
@@ -210,9 +210,8 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
tmpdir = get_bb_var("TMPDIR", "rust")
# Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools.
- cmd = " export PATH=%s/recipe-sysroot-native/usr/bin:$PATH;" % rustlibpath
- cmd = cmd + " export TARGET_VENDOR=\"-poky\";"
- cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, tcpath, tmpdir)
+ cmd = "export TARGET_VENDOR=\"-poky\";"
+ cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/python3-native:%s/recipe-sysroot-native/usr/bin:%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, rustlibpath, rustlibpath, tcpath, tmpdir)
cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath
# Trigger testing.
cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 86d6cd7464..94ad6e38b6 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -917,15 +917,25 @@ INHERIT += "base-do-configure-modified"
""",
expected_sametmp_output, expected_difftmp_output)
-@OETestTag("yocto-mirrors")
-class SStateMirrors(SStateBase):
- def check_bb_output(self, output, exceptions, check_cdn):
+class SStateCheckObjectPresence(SStateBase):
+ def check_bb_output(self, output, targets, exceptions, check_cdn):
def is_exception(object, exceptions):
for e in exceptions:
if re.search(e, object):
return True
return False
+ # sstate is checked for existence of these, but they never get written out to begin with
+ exceptions += ["{}.*image_qa".format(t) for t in targets.split()]
+ exceptions += ["{}.*deploy_source_date_epoch".format(t) for t in targets.split()]
+ exceptions += ["{}.*image_complete".format(t) for t in targets.split()]
+ exceptions += ["linux-yocto.*shared_workdir"]
+ # these get influnced by IMAGE_FSTYPES tweaks in yocto-autobuilder-helper's config.json (on x86-64)
+ # additionally, they depend on noexec (thus, absent stamps) package, install, etc. image tasks,
+ # which makes tracing other changes difficult
+ exceptions += ["{}.*create_spdx".format(t) for t in targets.split()]
+ exceptions += ["{}.*create_runtime_spdx".format(t) for t in targets.split()]
+
output_l = output.splitlines()
for l in output_l:
if l.startswith("Sstate summary"):
@@ -960,18 +970,9 @@ class SStateMirrors(SStateBase):
self.assertEqual(len(failed_urls), missing_objects, "Amount of reported missing objects does not match failed URLs: {}\nFailed URLs:\n{}\nFetcher diagnostics:\n{}".format(missing_objects, "\n".join(failed_urls), "\n".join(failed_urls_extrainfo)))
self.assertEqual(len(failed_urls), 0, "Missing objects in the cache:\n{}\nFetcher diagnostics:\n{}".format("\n".join(failed_urls), "\n".join(failed_urls_extrainfo)))
+@OETestTag("yocto-mirrors")
+class SStateMirrors(SStateCheckObjectPresence):
def run_test(self, machine, targets, exceptions, check_cdn = True, ignore_errors = False):
- # sstate is checked for existence of these, but they never get written out to begin with
- exceptions += ["{}.*image_qa".format(t) for t in targets.split()]
- exceptions += ["{}.*deploy_source_date_epoch".format(t) for t in targets.split()]
- exceptions += ["{}.*image_complete".format(t) for t in targets.split()]
- exceptions += ["linux-yocto.*shared_workdir"]
- # these get influnced by IMAGE_FSTYPES tweaks in yocto-autobuilder-helper's config.json (on x86-64)
- # additionally, they depend on noexec (thus, absent stamps) package, install, etc. image tasks,
- # which makes tracing other changes difficult
- exceptions += ["{}.*create_spdx".format(t) for t in targets.split()]
- exceptions += ["{}.*create_runtime_spdx".format(t) for t in targets.split()]
-
if check_cdn:
self.config_sstate(True)
self.append_config("""
@@ -987,7 +988,7 @@ MACHINE = "{}"
bitbake("-S none {}".format(targets))
if ignore_errors:
return
- self.check_bb_output(result.output, exceptions, check_cdn)
+ self.check_bb_output(result.output, targets, exceptions, check_cdn)
def test_cdn_mirror_qemux86_64(self):
exceptions = []