selftest/multiconfig: Test that multiconfigs in separate layers works
PATCH 1/1 selftest/multiconfig: Test that multiconfigs in separate layers works
We should test that mutliconfigs from a layer work, not just build/conf. This adds such a test.
[YOCTO #13566]
--- meta-selftest/conf/multiconfig/muslmc.conf | 2 ++ meta/lib/oeqa/selftest/cases/multiconfig.py | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 meta-selftest/conf/multiconfig/muslmc.conf
meta-selftest/conf/multiconfig/muslmc.conf new file +2 -0
@@ -0,0 +1,2 @@ +TCLIBC = "musl" +TMPDIR = "${TOPDIR}/tmp-mc-musl"
meta/lib/oeqa/selftest/cases/multiconfig.py +13 -0
@@ -70,3 +70,16 @@ TMPDIR = "${TOPDIR}/tmp-mc-tiny" result = bitbake('mc:test:multiconfig-test-parse -c showvar') self.assertIn('MCTESTVAR=test2', result.output.splitlines()) + + def test_multiconfig_inlayer(self): + """ + Test that a multiconfig from meta-selftest works. + """ + + config = """ +BBMULTICONFIG = "muslmc" +""" + self.write_config(config) + + # Build a core-image-minimal, only dry run needed to check config is present + bitbake('mc:muslmc:bash -n')
Signature · 1 line
2.34.1
Hi Richard,
The same test using the same TMPDIR will be useful as there are some layers doing that.
AFAIK the archiver and the rm_works don't like it very much.
The OE-core rm_work bbclass doesn't like multiconfig with the same TMPDIR. This issue with the rm_works is because the native packages use the same directory and bitbake
will run the native tasks twice, one for each machine. I need to exclude them to get a green build:
RM_WORK_EXCLUDE:append = " texinfo-dummy-native gettext-minimal-native gnu-config"
Another interesting detail is that these recipes that have the source dir in the working dir: $S == $WORKDIR
Jose
Richard Purdie <[email protected]> escreveu no dia quinta, 9/06/2022 à(s) 10:42:
Quoted 59 lines
We should test that mutliconfigs from a layer work, not just build/conf. This adds such a test.
[YOCTO #13566]
Signed-off-by Richard Purdie <[email protected]>--- meta-selftest/conf/multiconfig/muslmc.conf | 2 ++ meta/lib/oeqa/selftest/cases/multiconfig.py | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 meta-selftest/conf/multiconfig/muslmc.confmeta-selftest/conf/multiconfig/muslmc.conf new file +2
-0@@ -0,0 +1,2 @@ +TCLIBC = "musl" +TMPDIR = "${TOPDIR}/tmp-mc-musl"meta/lib/oeqa/selftest/cases/multiconfig.py +12
-0@@ -70,3 +70,16 @@ TMPDIR = "${TOPDIR}/tmp-mc-tiny" result = bitbake('mc:test:multiconfig-test-parse -c showvar') self.assertIn('MCTESTVAR=test2', result.output.splitlines()) + + def test_multiconfig_inlayer(self): + """ + Test that a multiconfig from meta-selftest works. + """ + + config = """ +BBMULTICONFIG = "muslmc" +""" + self.write_config(config) + + # Build a core-image-minimal, only dry run needed to check configis present
+ bitbake('mc:muslmc:bash -n')
--
2.34.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#166767):
https://lists.openembedded.org/g/openembedded-core/message/166767
Mute This Topic: https://lists.openembedded.org/mt/91641952/5052612
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Best regards, José Quaresma
Hi Jose,
Quoted 3 lines · Jose Quaresma
The same test using the same TMPDIR will be useful as there are some layers doing that.
AFAIK the archiver and therm_worksdon't like it very much.
Note that the same TMPDIR is only supported if you're only changing MACHINE. If you're changing distro config, all bets are off and you shouldn't be sharing TMPDIR.
I wish we had warning messages when users did that but we currently don't. It should be possible to add but isn't straightforward.
Quoted 11 lines
The OE-core
rm_workbbclass doesn't like multiconfig with the same TMPDIR.
This issue with the rm_works is because the native packages use the same directory and bitbake
will run the native tasks twice, one for each machine. I need to exclude them to get a green build:
RM_WORK_EXCLUDE:append = " texinfo-dummy-native gettext-minimal- native gnu-config"
Another interesting detail is that these recipes that have the source dir in
the working dir: $S == $WORKDIR
If they're building twice, the configuration is differing and they probably shouldn't be sharing TMPDIR. If there is a configuration you think should work I'd be interested in the two configs to see why it builds twice.
Cheers,
Richard