All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-security][PATCH] scap-security-guide: disable ptest by default
@ 2025-04-18  5:17 Yi Zhao
  2025-04-18 10:42 ` [yocto-patches] " Gyorgy Sarvari
  0 siblings, 1 reply; 4+ messages in thread
From: Yi Zhao @ 2025-04-18  5:17 UTC (permalink / raw)
  To: yocto-patches

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(-)

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..168af33 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"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [yocto-patches] [meta-security][PATCH] scap-security-guide: disable ptest by default
  2025-04-18  5:17 [meta-security][PATCH] scap-security-guide: disable ptest by default Yi Zhao
@ 2025-04-18 10:42 ` Gyorgy Sarvari
  2025-04-18 13:09   ` Yi Zhao
  0 siblings, 1 reply; 4+ messages in thread
From: Gyorgy Sarvari @ 2025-04-18 10:42 UTC (permalink / raw)
  To: yocto-patches

On 4/18/25 07:17, Yi Zhao via lists.yoctoproject.org wrote:
> +SSG_PTEST_ENABLED = "0"
Wouldn't "?=" be better, so it could be modified easier from local.conf
(&co) and env vars also, instead of only bbappend?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto-patches] [meta-security][PATCH] scap-security-guide: disable ptest by default
  2025-04-18 10:42 ` [yocto-patches] " Gyorgy Sarvari
@ 2025-04-18 13:09   ` Yi Zhao
  0 siblings, 0 replies; 4+ messages in thread
From: Yi Zhao @ 2025-04-18 13:09 UTC (permalink / raw)
  To: yocto-patches, Gyorgy Sarvari


On 4/18/25 18:42, Gyorgy Sarvari via lists.yoctoproject.org wrote:
> On 4/18/25 07:17, Yi Zhao via lists.yoctoproject.org wrote:
>> +SSG_PTEST_ENABLED = "0"
> Wouldn't "?=" be better, so it could be modified easier from local.conf
> (&co) and env vars also, instead of only bbappend?

Thanks, I will send v2.


//Yi



>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#1383): https://lists.yoctoproject.org/g/yocto-patches/message/1383
> Mute This Topic: https://lists.yoctoproject.org/mt/112326886/7283133
> Group Owner: yocto-patches+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13170635/7283133/1683771902/xyzzy [yi.zhao@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto-patches] [meta-security][PATCH] scap-security-guide: disable ptest by default
  2025-05-28 12:53 ` Clayton Casciato
@ 2025-05-30  2:58   ` Yi Zhao
  0 siblings, 0 replies; 4+ messages in thread
From: Yi Zhao @ 2025-05-30  2:58 UTC (permalink / raw)
  To: yocto-patches, ccasciato

[-- Attachment #1: Type: text/plain, Size: 2777 bytes --]


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]
>
> _._,_._,_

[-- Attachment #2: Type: text/html, Size: 4190 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-30  2:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-18  5:17 [meta-security][PATCH] scap-security-guide: disable ptest by default Yi Zhao
2025-04-18 10:42 ` [yocto-patches] " Gyorgy Sarvari
2025-04-18 13:09   ` Yi Zhao
  -- strict thread matches above, loose matches on Subject: below --
2025-05-28  5:54 Yi Zhao
2025-05-28 12:53 ` Clayton Casciato
2025-05-30  2:58   ` [yocto-patches] " Yi Zhao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.