public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: dev-util/gammaray/, dev-util/gammaray/files/
@ 2021-11-08  6:08 Anna Vyalkova
  0 siblings, 0 replies; only message in thread
From: Anna Vyalkova @ 2021-11-08  6:08 UTC (permalink / raw
  To: gentoo-commits

commit:     4930f4d334fbc586c0c968e0e8159e8c28a610f2
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Nov  8 06:04:05 2021 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Nov  8 06:07:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4930f4d3

dev-util/gammaray: fix tests

Closes: https://bugs.gentoo.org/784203
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 .../files/gammaray-2.11.3-deselect-tests.patch     | 45 ++++++++++++++++++++++
 dev-util/gammaray/gammaray-2.11.3.ebuild           | 27 +++++++------
 2 files changed, 60 insertions(+), 12 deletions(-)

diff --git a/dev-util/gammaray/files/gammaray-2.11.3-deselect-tests.patch b/dev-util/gammaray/files/gammaray-2.11.3-deselect-tests.patch
new file mode 100644
index 000000000..801629e8a
--- /dev/null
+++ b/dev-util/gammaray/files/gammaray-2.11.3-deselect-tests.patch
@@ -0,0 +1,45 @@
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -288,17 +288,6 @@
+   gammaray_add_test(earlyexittest earlyexittest.cpp)
+   target_include_directories(earlyexittest PRIVATE ${CMAKE_BINARY_DIR}/launcher)
+   target_link_libraries(earlyexittest gammaray_core gammaray_launcher)
+-
+-  if(HAVE_QT_WIDGETS)
+-    gammaray_add_test(launchertest launchertest.cpp)
+-    target_include_directories(launchertest PRIVATE ${CMAKE_BINARY_DIR}/launcher)
+-    target_link_libraries(launchertest gammaray_core gammaray_launcher)
+-  endif()
+-
+-  if(TARGET gammaray_client)
+-    gammaray_add_test(clientconnectiontest clientconnectiontest.cpp)
+-    target_link_libraries(clientconnectiontest gammaray_core gammaray_launcher gammaray_client)
+-  endif()
+ endif()
+ 
+ #
+@@ -419,14 +408,6 @@
+   endif()
+ 
+   if(Qt5Quick_FOUND)
+-    gammaray_add_quick_test(quickinspectortest
+-      quickinspectortest.cpp
+-      quickinspectortest.qrc
+-        $<TARGET_OBJECTS:modeltestobj>
+-    )
+-    target_include_directories(quickinspectortest SYSTEM PRIVATE ${Qt5Quick_PRIVATE_INCLUDE_DIRS})
+-    target_link_libraries(quickinspectortest gammaray_core gammaray_quickinspector_shared Qt5::Quick)
+-
+     gammaray_add_quick_test(quickinspectortest2
+       quickinspectortest2.cpp
+       quickinspectortest.qrc
+@@ -438,9 +419,6 @@
+     if(NOT Qt5Quick_VERSION VERSION_LESS 5.9.3)
+       add_test(NAME quickinspectortest2_softwarecontext COMMAND quickinspectortest2)
+       set_tests_properties(quickinspectortest2_softwarecontext PROPERTIES ENVIRONMENT "QT_QUICK_BACKEND=softwarecontext")
+-
+-      add_test(NAME quickinspectortest_softwarecontext COMMAND quickinspectortest)
+-      set_tests_properties(quickinspectortest_softwarecontext PROPERTIES ENVIRONMENT "QT_QUICK_BACKEND=softwarecontext")
+     endif()
+ 
+     gammaray_add_quick_test(quickinspectorpickingtest

diff --git a/dev-util/gammaray/gammaray-2.11.3.ebuild b/dev-util/gammaray/gammaray-2.11.3.ebuild
index 98c015610..d31d81afc 100644
--- a/dev-util/gammaray/gammaray-2.11.3.ebuild
+++ b/dev-util/gammaray/gammaray-2.11.3.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 CMAKE_REMOVE_MODULES_LIST=( BackwardConfig )
-inherit cmake optfeature xdg
+inherit cmake optfeature virtualx xdg
 
 DESCRIPTION="High-level runtime introspection tool for Qt applications"
 HOMEPAGE="https://www.kdab.com/gammaray https://github.com/KDAB/GammaRay"
@@ -19,12 +19,9 @@ fi
 
 LICENSE="BSD-2 GPL-2+ MIT"
 SLOT=0
-IUSE="3d bluetooth designer doc geolocation printsupport script scxml svg test qml wayland webengine"
-
-# broken tests
-RESTRICT="test"
 
-DOCS=( CHANGES CONTRIBUTORS.txt README.txt )
+IUSE="3d bluetooth designer doc geolocation printsupport script scxml svg test qml wayland webengine"
+RESTRICT="!test? ( test )"
 
 # TODO: fix automagic sci-libs/vtk (and many other) dependencies
 RDEPEND="
@@ -52,11 +49,15 @@ DEPEND="${RDEPEND}
 	test? ( dev-qt/qttest:5 )
 "
 
+DOCS=( CHANGES CONTRIBUTORS.txt README.txt )
+
+PATCHES=( "${FILESDIR}"/${P}-deselect-tests.patch )
+
 src_prepare(){
-	sed -i \
-		-e "/BackwardConfig.cmake/d" \
-		-e "/set(KDE_INSTALL_USE_QT_SYS_PATHS/d" -i CMakeLists.txt || die
 	sed -i "/add_backward(gammaray_core)/d" core/CMakeLists.txt || die
+	sed -i CMakeLists.txt  \
+		-e "/BackwardConfig.cmake/d" \
+		-e "/set(KDE_INSTALL_USE_QT_SYS_PATHS/d" || die
 
 	cmake_src_prepare
 }
@@ -85,15 +86,17 @@ src_configure(){
 		-DGAMMARAY_BUILD_DOCS=$(usex doc)
 		-DGAMMARAY_BUILD_UI=ON
 		-DGAMMARAY_DISABLE_FEEDBACK=ON
-
-		# fix install paths
-# 		-DDOC_INSTALL_DIR="doc/${PF}"
 		-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
 	)
 
 	cmake_src_configure
 }
 
+src_test() {
+# 	export QT_QPA_PLATFORM=offscreen
+	virtx cmake_src_test
+}
+
 src_install() {
 	cmake_src_install
 	rm -r "${ED}"/usr/share/doc/${PN} || die


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-08  6:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-08  6:08 [gentoo-commits] repo/proj/guru:dev commit in: dev-util/gammaray/, dev-util/gammaray/files/ Anna Vyalkova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox