On Sun, 28 Dec 2025 at 19:09, Adrian Freihofer via
lists.openembedded.org
<[email protected]> wrote:
> -    def write_config(self, data, multiconfig=None):
> +    def write_config(self, data, multiconfig=None, fragments=None):
>          """Write to config file"""
>          if multiconfig:
>              multiconfigdir = "%s/conf/multiconfig" % self.builddir
> @@ -174,6 +175,12 @@ class OESelftestTestCase(OETestCase):
>          self.logger.debug("Writing to: %s\n%s\n" % (dest_path, data))
>          ftools.write_file(dest_path, data)
>
> +        if fragments:
> +            toolscfg_str = '# Added by oe-selftest' + os.linesep + \
> +                'OE_FRAGMENTS += "' + ' '.join(fragments) + '"' + os.linesep
> +            self.logger.debug("Over writing fragments: %s\n%s" % 
> (self.toolcfgconf_path, toolscfg_str))
> +            ftools.write_file(self.toolcfgconf_path, toolscfg_str)

This should be using 'bitbake-config-build enable-fragment' rather
than write to the file directly. It should also not overwrite the
file: the 'main' build may enable important fragments for the overall
sefltest, or the machine they run on (e.g. the yocto ci is using
autobuilder fragments throughout) and they should be kept.

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#228600): 
https://lists.openembedded.org/g/openembedded-core/message/228600
Mute This Topic: https://lists.openembedded.org/mt/116974207/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to