blob: d21bf0a4110ddad12a1795c5f5895596c7eaf034 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
2# SPDX-License-Identifier: MIT
3#
4
Brad Bishop19323692019-04-05 15:28:33 -04005import os
6from oeqa.selftest.case import OESelftestTestCase
7from oeqa.utils.commands import bitbake
8import oeqa.utils.ftools as ftools
9
10class MultiConfig(OESelftestTestCase):
11
12 def test_multiconfig(self):
13 """
14 Test that a simple multiconfig build works. This uses the mcextend class and the
15 multiconfig-image-packager test recipe to build a core-image-full-cmdline image which
16 contains a tiny core-image-minimal and a musl core-image-minimal, installed as packages.
17 """
18
19 config = """
20IMAGE_INSTALL_append_pn-core-image-full-cmdline = " multiconfig-image-packager-tiny multiconfig-image-packager-musl"
21BBMULTICONFIG = "tiny musl"
22"""
23 self.write_config(config)
24
25 muslconfig = """
26MACHINE = "qemux86-64"
27DISTRO = "poky"
28TCLIBC = "musl"
29TMPDIR = "${TOPDIR}/tmp-mc-musl"
30"""
31
32 tinyconfig = """
33MACHINE = "qemux86"
34DISTRO = "poky-tiny"
35TMPDIR = "${TOPDIR}/tmp-mc-tiny"
36"""
37
38 multiconfigdir = self.builddir + "/conf/multiconfig"
39 os.makedirs(multiconfigdir, exist_ok=True)
40 self.track_for_cleanup(multiconfigdir + "/musl.conf")
41 ftools.write_file(multiconfigdir + "/musl.conf", muslconfig)
42 self.track_for_cleanup(multiconfigdir + "/tiny.conf")
43 ftools.write_file(multiconfigdir + "/tiny.conf", tinyconfig)
44
45 # Build a core-image-minimal
46 bitbake('core-image-full-cmdline')
47