Message ID | 20250418051738.2928980-1-yi.zhao@windriver.com |
---|---|
State | New |
Headers | show |
Series | [meta-security] scap-security-guide: disable ptest by default | expand |
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?
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] > -=-=-=-=-=-=-=-=-=-=-=- > >
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"
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(-)