mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
oeqa/selftest/debuginfod: use localpkgfeed to speed server startup
Sometimes the debuginfod selftest fails due to a timeout, because it spends too long scanning a huge deploy directory that due to what tests were ran previously can contain 30K packages. The test only needs a subset of the feed, so use the new localpkgfeed class to construct a minimal feed before running the test. [ YOCTO #14937 ] (From OE-Core rev: 855376f518b28248ccd82ef5b2e89e6a8c970542) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
41e59c53c5
commit
8a04f529f2
@@ -62,7 +62,7 @@ class Debuginfod(OESelftestTestCase):
|
|||||||
|
|
||||||
raise TimeoutError("Cannot connect debuginfod, still %d scan jobs running" % latest)
|
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
|
# We assume that the caller has already bitbake'd elfutils-native:do_addto_recipe_sysroot
|
||||||
|
|
||||||
# Save some useful paths for later
|
# Save some useful paths for later
|
||||||
@@ -82,7 +82,7 @@ class Debuginfod(OESelftestTestCase):
|
|||||||
# Disable rescanning, this is a one-shot test
|
# Disable rescanning, this is a one-shot test
|
||||||
"--rescan-time=0",
|
"--rescan-time=0",
|
||||||
"--groom-time=0",
|
"--groom-time=0",
|
||||||
get_bb_var("DEPLOY_DIR"),
|
feed_dir,
|
||||||
]
|
]
|
||||||
|
|
||||||
format = get_bb_var("PACKAGE_CLASSES").split()[0]
|
format = get_bb_var("PACKAGE_CLASSES").split()[0]
|
||||||
@@ -114,11 +114,12 @@ class Debuginfod(OESelftestTestCase):
|
|||||||
self.write_config("""
|
self.write_config("""
|
||||||
TMPDIR = "${TOPDIR}/tmp-debuginfod"
|
TMPDIR = "${TOPDIR}/tmp-debuginfod"
|
||||||
DISTRO_FEATURES:append = " 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:
|
try:
|
||||||
self.start_debuginfod()
|
self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz"))
|
||||||
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env["DEBUGINFOD_URLS"] = "http://localhost:%d/" % self.port
|
env["DEBUGINFOD_URLS"] = "http://localhost:%d/" % self.port
|
||||||
@@ -141,12 +142,13 @@ DISTRO_FEATURES:append = " debuginfod"
|
|||||||
self.write_config("""
|
self.write_config("""
|
||||||
TMPDIR = "${TOPDIR}/tmp-debuginfod"
|
TMPDIR = "${TOPDIR}/tmp-debuginfod"
|
||||||
DISTRO_FEATURES:append = " debuginfod"
|
DISTRO_FEATURES:append = " debuginfod"
|
||||||
|
INHERIT += "localpkgfeed"
|
||||||
CORE_IMAGE_EXTRA_INSTALL += "elfutils xz"
|
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:
|
try:
|
||||||
self.start_debuginfod()
|
self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz"))
|
||||||
|
|
||||||
with runqemu("core-image-minimal", runqemuparams="nographic") as qemu:
|
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)
|
cmd = "DEBUGINFOD_URLS=http://%s:%d/ debuginfod-find debuginfo /usr/bin/xz" % (qemu.server_ip, self.port)
|
||||||
|
|||||||
Reference in New Issue
Block a user