scap-security-guide: disable ptest by default
PATCH 1/1 scap-security-guide: disable ptest by default
Enabling ptest will significantly increase build time. Additionally, since the ptest distro_feature is enabled by default in poky distro, build time can be very long, which is annoying.
On my build server:
Enable ptest:
$ time build scap-security-guide real 266m41.257s user 1m16.895s sys 0m1.553s
Disable ptest:
$ time build scap-security-guide real 1m29.228s user 0m4.604s sys 0m0.175s
Add a switch SSG_PTEST_ENABLED and set it to 0 to disable ptest by default.
--- .../scap-security-guide/scap-security-guide_0.1.76.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
recipes-compliance/scap-security-guide/scap-security-guide_0.1.76.bb +3 -1
@@ -18,7 +18,9 @@ DEPENDS = "openscap-native python3-pyyaml-native python3-jinja2-native libxml2-n S = "${UNPACKDIR}/git" B = "${S}/build" -inherit cmake pkgconfig python3native python3targetconfig ptest +SSG_PTEST_ENABLED ?= "0" + +inherit cmake pkgconfig python3native python3targetconfig ${@bb.utils.contains('SSG_PTEST_ENABLED', '1', 'ptest', '', d)} STAGING_OSCAP_BUILDDIR = "${TMPDIR}/work-shared/openscap/oscap-build-artifacts" export OSCAP_CPE_PATH="${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/cpe"
Signature · 1 line
2.34.1
Hi, Yi!
Should this use inherit_defer due to the conditional?
Thank you!
--
Clayton Casciato
Quoted 2 lines · Clayton Casciato
Hi, Yi!
Should this useinherit_deferdue to the conditional?
Hi Clayton,
I've tested this. But setting SSG_PTEST_ENABLED to 1 in the recipe or setting it in local.conf has no effect when using inherit_defer.
Here are my changes:
-inherit cmake pkgconfig python3native python3targetconfig ptest +inherit cmake pkgconfig python3native python3targetconfig
+
+inherit_defer ${@bb.utils.contains('SSG_PTEST_ENABLED', '1', 'ptest', '', d)} +
+SSG_PTEST_ENABLED ?= "0"
//Yi
Quoted 16 lines
Sample:
https://git.openembedded.org/meta-openembedded/commit/meta-networking/recipes-support/chrony?id=63df976d8eec0fa714e8da30f4333f8af23c57d3 <https://urldefense.com/v3/__https://git.openembedded.org/meta-openembedded/commit/meta-networking/recipes-support/chrony?id=63df976d8eec0fa714e8da30f4333f8af23c57d3__;!!AjveYdw8EvQ!ba2hNq8NE_kzvVH4c1lBFhfj4diFk3IrBD1lplXX2KiwaE-G4Mc-OD_ftdFbuWzU6JPHItBy-J1VIuHeKzGUJxqe1Q$>
Thank you!
--
Clayton Casciato
_._,_._,_
------------------------------------------------------------------------
Links:You receive all messages sent to this group.
View/Reply Online (#1583) <https://urldefense.com/v3/__https://lists.yoctoproject.org/g/yocto-patches/message/1583__;!!AjveYdw8EvQ!ba2hNq8NE_kzvVH4c1lBFhfj4diFk3IrBD1lplXX2KiwaE-G4Mc-OD_ftdFbuWzU6JPHItBy-J1VIuHeKzF7GJrksA$> | Reply to Group <mailto:[email protected]?subject=Re:%20Re%3A%20%5Byocto-patches%5D%20%5Bmeta-security%5D%5BPATCH%5D%20scap-security-guide%3A%20disable%20ptest%20by%20default> | Reply to Sender <mailto:[email protected]?subject=Private:%20Re:%20Re%3A%20%5Byocto-patches%5D%20%5Bmeta-security%5D%5BPATCH%5D%20scap-security-guide%3A%20disable%20ptest%20by%20default> | Mute This Topic <https://urldefense.com/v3/__https://lists.yoctoproject.org/mt/113339598/7283133__;!!AjveYdw8EvQ!ba2hNq8NE_kzvVH4c1lBFhfj4diFk3IrBD1lplXX2KiwaE-G4Mc-OD_ftdFbuWzU6JPHItBy-J1VIuHeKzEyysYlsw$> | New Topic <https://urldefense.com/v3/__https://lists.yoctoproject.org/g/yocto-patches/post__;!!AjveYdw8EvQ!ba2hNq8NE_kzvVH4c1lBFhfj4diFk3IrBD1lplXX2KiwaE-G4Mc-OD_ftdFbuWzU6JPHItBy-J1VIuHeKzE2PLdrJw$>
Your Subscription <https://urldefense.com/v3/__https://lists.yoctoproject.org/g/yocto-patches/editsub/7283133__;!!AjveYdw8EvQ!ba2hNq8NE_kzvVH4c1lBFhfj4diFk3IrBD1lplXX2KiwaE-G4Mc-OD_ftdFbuWzU6JPHItBy-J1VIuHeKzF7FBOd0g$> | Contact Group Owner <mailto:[email protected]> | Unsubscribe <https://urldefense.com/v3/__https://lists.yoctoproject.org/g/yocto-patches/leave/13170635/7283133/1683771902/xyzzy__;!!AjveYdw8EvQ!ba2hNq8NE_kzvVH4c1lBFhfj4diFk3IrBD1lplXX2KiwaE-G4Mc-OD_ftdFbuWzU6JPHItBy-J1VIuHeKzF3pMBRvw$> [[email protected]]
_._,_._,_