diff options
author | Mike Gilbert <floppym@gentoo.org> | 2024-08-30 13:35:13 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2024-08-30 13:40:46 -0400 |
commit | 0111035412002ce7a102a1f3d93e1f411c16f90c (patch) | |
tree | 2f41a2bd9980afc1be238b4059367691d784438f /net-misc | |
parent | app-misc/cmatrix: drop 2.0-r4 (diff) | |
download | gentoo-0111035412002ce7a102a1f3d93e1f411c16f90c.tar.gz gentoo-0111035412002ce7a102a1f3d93e1f411c16f90c.tar.bz2 gentoo-0111035412002ce7a102a1f3d93e1f411c16f90c.zip |
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@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/freerdp/freerdp-9999.ebuild | 21 |
1 files 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() { |