commit: 0111035412002ce7a102a1f3d93e1f411c16f90c
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 30 17:35:13 2024 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Aug 30 17:40:46 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01110354
net-misc/freerdp: rework testing
Enabling the BUILD_TESTING option causes all symbols to be exported,
which is not desirable for installed libraries.
Create a separate test build to facilitate running tests without
installing the wonky test libraries.
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
net-misc/freerdp/freerdp-9999.ebuild | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/net-misc/freerdp/freerdp-9999.ebuild
b/net-misc/freerdp/freerdp-9999.ebuild
index 51aab209a2db..5907f28cdfca 100644
--- a/net-misc/freerdp/freerdp-9999.ebuild
+++ b/net-misc/freerdp/freerdp-9999.ebuild
@@ -120,17 +120,27 @@ option_client() {
fi
}
+run_for_testing() {
+ if use test; then
+ local BUILD_DIR="${WORKDIR}/${P}_testing"
+ "$@"
+ fi
+}
+
src_configure() {
# bug #881695
filter-lto
+ freerdp_configure -DBUILD_TESTING=OFF
+ run_for_testing freerdp_configure -DBUILD_TESTING=ON
+}
+freerdp_configure() {
local mycmakeargs=(
-Wno-dev
# https://bugs.gentoo.org/927037
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF
- -DBUILD_TESTING=$(option test)
-DCHANNEL_URBDRC=$(option usb)
-DWITH_AAD=$(option aad)
-DWITH_ALSA=$(option alsa)
@@ -166,14 +176,21 @@ src_configure() {
-DWITH_WAYLAND=$(option_client wayland)
-DWITH_WEBVIEW=OFF
-DWITH_WINPR_TOOLS=$(option server)
+
+ "$@"
)
cmake_src_configure
}
+src_compile() {
+ cmake_src_compile
+ run_for_testing cmake_src_compile
+}
+
src_test() {
local myctestargs=( -E TestBacktrace )
has network-sandbox ${FEATURES} && myctestargs+=( -E TestConnect )
- cmake_src_test
+ run_for_testing cmake_src_test
}
src_install() {