public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Eli Schwartz" <eschwartz@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/lmms/
Date: Wed, 31 Jul 2024 21:18:02 +0000 (UTC)	[thread overview]
Message-ID: <1722460613.5cff97f8ec69978d0b899b54e4aff82587592b69.eschwartz@gentoo> (raw)

commit:     5cff97f8ec69978d0b899b54e4aff82587592b69
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 31 17:12:04 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Wed Jul 31 21:16:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cff97f8

media-sound/lmms: add missing testsuite dependency

It needs dev-qt/qttest in order to link tests successfully. And there is
also a cmake warning that Qt5::Test was linked to, but not found, and
that's a bug -- due to cmake's excellent, world-class type safety, this
is NOT obviously a detectable error when you can simply assume maybe it
means `-lQt5::Test`, but in the minimum version that the live ebuild
uses, the fact that the string name includes "::" means cmake can and in
fact does error out since "::" is reserved for imported libraries.

So the live ebuild actually fails to configure without qttest, but even
the versioned release would error out when running the testsuite and
attempting to compile the test program. Of course, the versioned release
also doesn't *connect* the testsuite, and one of the test cases appears
to fail anyway even if you manually cd and run it by hand.

Naturally, there is no buildsystem option to disable this. Instead, we
use a filthy sed to the test directory when not building tests.

Closes: https://bugs.gentoo.org/879567
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 media-sound/lmms/lmms-1.2.2-r2.ebuild | 24 +++++++++++++++++++++++-
 media-sound/lmms/lmms-9999.ebuild     | 20 +++++++++++++++++++-
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/media-sound/lmms/lmms-1.2.2-r2.ebuild b/media-sound/lmms/lmms-1.2.2-r2.ebuild
index 15bb77c03a9d..20dd54d2f656 100644
--- a/media-sound/lmms/lmms-1.2.2-r2.ebuild
+++ b/media-sound/lmms/lmms-1.2.2-r2.ebuild
@@ -21,7 +21,13 @@ S="${WORKDIR}/${PN}"
 LICENSE="GPL-2 LGPL-2"
 SLOT="0"
 
-IUSE="alsa debug fluidsynth jack libgig mp3 ogg portaudio pulseaudio sdl soundio stk vst"
+IUSE="alsa debug fluidsynth jack libgig mp3 ogg portaudio pulseaudio sdl soundio stk test vst"
+
+# FAIL!  : AutomatableModelTest::LinkTests() 'm1Changed' returned FALSE. ()
+#
+# Did not previously pass, did not previously run. Maintain status quo.
+# Fixed upstream in git.
+RESTRICT="test"
 
 COMMON_DEPEND="
 	dev-qt/qtcore:5
@@ -54,6 +60,7 @@ COMMON_DEPEND="
 "
 DEPEND="${COMMON_DEPEND}
 	dev-qt/qtx11extras:5
+	test? ( dev-qt/qttest:5 )
 "
 BDEPEND="
 	dev-qt/linguist-tools:5
@@ -74,6 +81,14 @@ PATCHES=(
 	"${FILESDIR}/${PN}-1.2.2-kwidgetsaddons.patch"
 )
 
+src_prepare() {
+	cmake_src_prepare
+
+	if use !test; then
+		sed -i '/ADD_SUBDIRECTORY(tests)/d' CMakeLists.txt || die
+	fi
+}
+
 src_configure() {
 	local mycmakeargs=(
 		-DUSE_WERROR=FALSE
@@ -99,3 +114,10 @@ src_configure() {
 
 	cmake_src_configure
 }
+
+src_test() {
+	# does not use ctest
+	cmake_build tests/tests
+	"${BUILD_DIR}"/tests/tests || die
+
+}

diff --git a/media-sound/lmms/lmms-9999.ebuild b/media-sound/lmms/lmms-9999.ebuild
index ec73afb24dd9..f003402e4f33 100644
--- a/media-sound/lmms/lmms-9999.ebuild
+++ b/media-sound/lmms/lmms-9999.ebuild
@@ -19,7 +19,9 @@ fi
 LICENSE="GPL-2 LGPL-2"
 SLOT="0"
 
-IUSE="alsa debug fluidsynth jack libgig mp3 ogg portaudio pulseaudio sdl soundio stk vst"
+IUSE="alsa debug fluidsynth jack libgig mp3 ogg portaudio pulseaudio sdl soundio stk test vst"
+
+RESTRICT="!test? ( test )"
 
 COMMON_DEPEND="
 	dev-qt/qtcore:5
@@ -52,6 +54,7 @@ COMMON_DEPEND="
 "
 DEPEND="${COMMON_DEPEND}
 	dev-qt/qtx11extras:5
+	test? ( dev-qt/qttest:5 )
 "
 BDEPEND="
 	dev-qt/linguist-tools:5
@@ -71,6 +74,14 @@ PATCHES=(
 	"${FILESDIR}/${PN}-9999-plugin-path.patch" #907285
 )
 
+src_prepare() {
+	cmake_src_prepare
+
+	if use !test; then
+		sed -i '/ADD_SUBDIRECTORY(tests)/d' CMakeLists.txt || die
+	fi
+}
+
 src_configure() {
 	local mycmakeargs=(
 		-DUSE_WERROR=FALSE
@@ -95,3 +106,10 @@ src_configure() {
 
 	cmake_src_configure
 }
+
+src_test() {
+	# tests are hidden inside a subdir and ctest does not detect them without
+	# running inside that subdir
+	local BUILD_DIR="${BUILD_DIR}/tests"
+	cmake_src_test
+}


             reply	other threads:[~2024-07-31 21:18 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31 21:18 Eli Schwartz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-31 21:18 [gentoo-commits] repo/gentoo:master commit in: media-sound/lmms/ Eli Schwartz
2024-06-25 10:57 Miroslav Šulc
2024-06-25 10:55 Miroslav Šulc
2024-06-24  7:13 Miroslav Šulc
2024-03-07 23:24 Andreas Sturmlechner
2024-03-07 11:51 Sam James
2024-03-07 11:51 Sam James
2023-05-29 13:11 Andreas Sturmlechner
2021-04-14  8:24 Lars Wendler
2021-04-14  8:24 Lars Wendler
2020-08-11 14:23 Agostino Sarubbo
2020-08-10 13:09 Agostino Sarubbo
2020-07-21  9:33 Agostino Sarubbo
2020-07-20  6:42 Agostino Sarubbo
2020-07-05 20:29 Lars Wendler
2020-06-13  8:48 Miroslav Šulc
2019-11-15  0:36 Andreas Sturmlechner
2019-10-21 11:59 Lars Wendler
2019-10-21 11:59 Lars Wendler
2019-06-11 11:12 Lars Wendler
2019-04-11  9:21 Lars Wendler
2019-03-31 10:47 Andreas Sturmlechner
2019-03-13 14:31 Lars Wendler
2019-03-13 14:31 Lars Wendler
2019-01-09 11:52 Andreas Sturmlechner
2018-08-14  8:42 Lars Wendler
2018-01-06 22:54 Mikle Kolyada
2017-12-13 21:37 NP Hardass
2017-11-30 21:40 Lars Wendler
2017-11-30 21:40 Lars Wendler
2017-10-13 21:07 Jonas Stein
2017-09-26  0:54 Andreas Sturmlechner
2017-09-26  0:54 Andreas Sturmlechner
2017-09-21  0:56 NP Hardass
2017-08-01 14:08 Amy Liffey
2017-05-05 13:27 Lars Wendler
2017-04-08  9:23 Alexis Ballier
2016-12-29 15:05 Alexis Ballier
2016-03-07 18:50 Alexis Ballier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1722460613.5cff97f8ec69978d0b899b54e4aff82587592b69.eschwartz@gentoo \
    --to=eschwartz@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox