Message ID | 20250528055417.2527453-1-yi.zhao@windriver.com |
---|---|
State | New |
Headers | show |
Series | [meta-security] scap-security-guide: disable ptest by default | expand |
Hi, Yi! Should this use inherit_defer due to the conditional? Sample: https://git.openembedded.org/meta-openembedded/commit/meta-networking/recipes-support/chrony?id=63df976d8eec0fa714e8da30f4333f8af23c57d3 Thank you! -- Clayton Casciato
On 5/28/25 20:53, Clayton Casciato wrote: > Hi, Yi! > Should this use inherit_defer due 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 > 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:yocto-patches@lists.yoctoproject.org?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:ccasciato@21sw.us?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:yocto-patches+owner@lists.yoctoproject.org> | Unsubscribe > <https://urldefense.com/v3/__https://lists.yoctoproject.org/g/yocto-patches/leave/13170635/7283133/1683771902/xyzzy__;!!AjveYdw8EvQ!ba2hNq8NE_kzvVH4c1lBFhfj4diFk3IrBD1lplXX2KiwaE-G4Mc-OD_ftdFbuWzU6JPHItBy-J1VIuHeKzF3pMBRvw$> > [yi.zhao@eng.windriver.com] > > _._,_._,_
diff --git a/recipes-compliance/scap-security-guide/scap-security-guide_0.1.76.bb b/recipes-compliance/scap-security-guide/scap-security-guide_0.1.76.bb index 73bd576..c91a5f9 100644 --- a/recipes-compliance/scap-security-guide/scap-security-guide_0.1.76.bb +++ b/recipes-compliance/scap-security-guide/scap-security-guide_0.1.76.bb @@ -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"
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. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- .../scap-security-guide/scap-security-guide_0.1.76.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)