diff options
author | Ross Burton <ross.burton@arm.com> | 2024-05-14 16:15:21 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-15 16:39:19 +0100 |
commit | 8a04f529f2603acaf4ae72fbeccbd2e4ef862be1 (patch) | |
tree | 1b06329259a648745bcc85d324558e43945754df /meta/lib | |
parent | 41e59c53c508f63d0a6dd6fc6cd4f8a60be13d7f (diff) | |
download | poky-8a04f529f2603acaf4ae72fbeccbd2e4ef862be1.tar.gz |
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>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/debuginfod.py | 14 |
1 files changed, 8 insertions, 6 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): | |||
62 | 62 | ||
63 | raise TimeoutError("Cannot connect debuginfod, still %d scan jobs running" % latest) | 63 | raise TimeoutError("Cannot connect debuginfod, still %d scan jobs running" % latest) |
64 | 64 | ||
65 | def start_debuginfod(self): | 65 | def start_debuginfod(self, feed_dir): |
66 | # We assume that the caller has already bitbake'd elfutils-native:do_addto_recipe_sysroot | 66 | # We assume that the caller has already bitbake'd elfutils-native:do_addto_recipe_sysroot |
67 | 67 | ||
68 | # Save some useful paths for later | 68 | # Save some useful paths for later |
@@ -82,7 +82,7 @@ class Debuginfod(OESelftestTestCase): | |||
82 | # Disable rescanning, this is a one-shot test | 82 | # Disable rescanning, this is a one-shot test |
83 | "--rescan-time=0", | 83 | "--rescan-time=0", |
84 | "--groom-time=0", | 84 | "--groom-time=0", |
85 | get_bb_var("DEPLOY_DIR"), | 85 | feed_dir, |
86 | ] | 86 | ] |
87 | 87 | ||
88 | format = get_bb_var("PACKAGE_CLASSES").split()[0] | 88 | format = get_bb_var("PACKAGE_CLASSES").split()[0] |
@@ -114,11 +114,12 @@ class Debuginfod(OESelftestTestCase): | |||
114 | self.write_config(""" | 114 | self.write_config(""" |
115 | TMPDIR = "${TOPDIR}/tmp-debuginfod" | 115 | TMPDIR = "${TOPDIR}/tmp-debuginfod" |
116 | DISTRO_FEATURES:append = " debuginfod" | 116 | DISTRO_FEATURES:append = " debuginfod" |
117 | INHERIT += "localpkgfeed" | ||
117 | """) | 118 | """) |
118 | bitbake("elfutils-native:do_addto_recipe_sysroot xz xz:do_package") | 119 | bitbake("elfutils-native:do_addto_recipe_sysroot xz xz:do_package xz:do_localpkgfeed") |
119 | 120 | ||
120 | try: | 121 | try: |
121 | self.start_debuginfod() | 122 | self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz")) |
122 | 123 | ||
123 | env = os.environ.copy() | 124 | env = os.environ.copy() |
124 | env["DEBUGINFOD_URLS"] = "http://localhost:%d/" % self.port | 125 | env["DEBUGINFOD_URLS"] = "http://localhost:%d/" % self.port |
@@ -141,12 +142,13 @@ DISTRO_FEATURES:append = " debuginfod" | |||
141 | self.write_config(""" | 142 | self.write_config(""" |
142 | TMPDIR = "${TOPDIR}/tmp-debuginfod" | 143 | TMPDIR = "${TOPDIR}/tmp-debuginfod" |
143 | DISTRO_FEATURES:append = " debuginfod" | 144 | DISTRO_FEATURES:append = " debuginfod" |
145 | INHERIT += "localpkgfeed" | ||
144 | CORE_IMAGE_EXTRA_INSTALL += "elfutils xz" | 146 | CORE_IMAGE_EXTRA_INSTALL += "elfutils xz" |
145 | """) | 147 | """) |
146 | bitbake("core-image-minimal elfutils-native:do_addto_recipe_sysroot") | 148 | bitbake("core-image-minimal elfutils-native:do_addto_recipe_sysroot xz:do_localpkgfeed") |
147 | 149 | ||
148 | try: | 150 | try: |
149 | self.start_debuginfod() | 151 | self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz")) |
150 | 152 | ||
151 | with runqemu("core-image-minimal", runqemuparams="nographic") as qemu: | 153 | with runqemu("core-image-minimal", runqemuparams="nographic") as qemu: |
152 | cmd = "DEBUGINFOD_URLS=http://%s:%d/ debuginfod-find debuginfo /usr/bin/xz" % (qemu.server_ip, self.port) | 154 | cmd = "DEBUGINFOD_URLS=http://%s:%d/ debuginfod-find debuginfo /usr/bin/xz" % (qemu.server_ip, self.port) |