diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/multiconfig.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/multiconfig.py b/meta/lib/oeqa/selftest/cases/multiconfig.py new file mode 100644 index 0000000000..3c36f6e5d2 --- /dev/null +++ b/meta/lib/oeqa/selftest/cases/multiconfig.py | |||
@@ -0,0 +1,43 @@ | |||
1 | import os | ||
2 | from oeqa.selftest.case import OESelftestTestCase | ||
3 | from oeqa.utils.commands import bitbake | ||
4 | import oeqa.utils.ftools as ftools | ||
5 | |||
6 | class MultiConfig(OESelftestTestCase): | ||
7 | |||
8 | def test_multiconfig(self): | ||
9 | """ | ||
10 | Test that a simple multiconfig build works. This uses the mcextend class and the | ||
11 | multiconfig-image-packager test recipe to build a core-image-full-cmdline image which | ||
12 | contains a tiny core-image-minimal and a musl core-image-minimal, installed as packages. | ||
13 | """ | ||
14 | |||
15 | config = """ | ||
16 | IMAGE_INSTALL_append_pn-core-image-full-cmdline = " multiconfig-image-packager-tiny multiconfig-image-packager-musl" | ||
17 | BBMULTICONFIG = "tiny musl" | ||
18 | """ | ||
19 | self.write_config(config) | ||
20 | |||
21 | muslconfig = """ | ||
22 | MACHINE = "qemux86-64" | ||
23 | DISTRO = "poky" | ||
24 | TCLIBC = "musl" | ||
25 | TMPDIR = "${TOPDIR}/tmp-mc-musl" | ||
26 | """ | ||
27 | |||
28 | tinyconfig = """ | ||
29 | MACHINE = "qemux86" | ||
30 | DISTRO = "poky-tiny" | ||
31 | TMPDIR = "${TOPDIR}/tmp-mc-tiny" | ||
32 | """ | ||
33 | |||
34 | multiconfigdir = self.builddir + "/conf/multiconfig" | ||
35 | os.makedirs(multiconfigdir, exist_ok=True) | ||
36 | self.track_for_cleanup(multiconfigdir + "/musl.conf") | ||
37 | ftools.write_file(multiconfigdir + "/musl.conf", muslconfig) | ||
38 | self.track_for_cleanup(multiconfigdir + "/tiny.conf") | ||
39 | ftools.write_file(multiconfigdir + "/tiny.conf", tinyconfig) | ||
40 | |||
41 | # Build a core-image-minimal | ||
42 | bitbake('core-image-full-cmdline') | ||
43 | |||