commit:     4d0a6ed89648091f6e250d6aa866cd2e7c1a29fe
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 21 04:55:31 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 21 04:57:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d0a6ed8

dev-debug/systemtap: make tests more robust

They failed for me with my usual CFLAGS otherwise (the sanity check / smoketest
failed, even).

Bug: https://bugs.gentoo.org/868408
Bug: https://bugs.gentoo.org/935333
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-debug/systemtap/systemtap-5.1.ebuild  | 16 +++++++++++++++-
 dev-debug/systemtap/systemtap-9999.ebuild | 16 +++++++++++++++-
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/dev-debug/systemtap/systemtap-5.1.ebuild 
b/dev-debug/systemtap/systemtap-5.1.ebuild
index 0bdad429da92..df5d1a5ea9c7 100644
--- a/dev-debug/systemtap/systemtap-5.1.ebuild
+++ b/dev-debug/systemtap/systemtap-5.1.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{10..12} pypy3 )
 
-inherit autotools linux-info python-single-r1
+inherit autotools flag-o-matic linux-info python-single-r1 toolchain-funcs
 
 DESCRIPTION="Linux trace/probe tool"
 HOMEPAGE="https://sourceware.org/systemtap/";
@@ -132,6 +132,20 @@ src_configure() {
        CONFIG_SHELL="${BROOT}"/bin/bash PYTHON3="${PYTHON}" econf 
"${myeconfargs[@]}"
 }
 
+src_test() {
+       # TODO: Install tests like dev-debug/dtrace[install-tests] and
+       # e.g. Fedora does.
+       (
+               strip-flags
+               filter-flags '-fcf-protection=*'
+               filter-flags '-fdiagnostics-color=*' '-fdiagnostics-urls=*'
+               filter-flags '-g*'
+               filter-lto
+               tc-ld-force-bfd
+               emake -Onone -k check CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" 
LDFLAGS="${LDFLAGS}"
+       )
+}
+
 src_install() {
        default
        python_optimize

diff --git a/dev-debug/systemtap/systemtap-9999.ebuild 
b/dev-debug/systemtap/systemtap-9999.ebuild
index 0bdad429da92..df5d1a5ea9c7 100644
--- a/dev-debug/systemtap/systemtap-9999.ebuild
+++ b/dev-debug/systemtap/systemtap-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{10..12} pypy3 )
 
-inherit autotools linux-info python-single-r1
+inherit autotools flag-o-matic linux-info python-single-r1 toolchain-funcs
 
 DESCRIPTION="Linux trace/probe tool"
 HOMEPAGE="https://sourceware.org/systemtap/";
@@ -132,6 +132,20 @@ src_configure() {
        CONFIG_SHELL="${BROOT}"/bin/bash PYTHON3="${PYTHON}" econf 
"${myeconfargs[@]}"
 }
 
+src_test() {
+       # TODO: Install tests like dev-debug/dtrace[install-tests] and
+       # e.g. Fedora does.
+       (
+               strip-flags
+               filter-flags '-fcf-protection=*'
+               filter-flags '-fdiagnostics-color=*' '-fdiagnostics-urls=*'
+               filter-flags '-g*'
+               filter-lto
+               tc-ld-force-bfd
+               emake -Onone -k check CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" 
LDFLAGS="${LDFLAGS}"
+       )
+}
+
 src_install() {
        default
        python_optimize

Reply via email to