1 |
commit: 4930f4d334fbc586c0c968e0e8159e8c28a610f2 |
2 |
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
3 |
AuthorDate: Mon Nov 8 06:04:05 2021 +0000 |
4 |
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
5 |
CommitDate: Mon Nov 8 06:07:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4930f4d3 |
7 |
|
8 |
dev-util/gammaray: fix tests |
9 |
|
10 |
Closes: https://bugs.gentoo.org/784203 |
11 |
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in> |
12 |
|
13 |
.../files/gammaray-2.11.3-deselect-tests.patch | 45 ++++++++++++++++++++++ |
14 |
dev-util/gammaray/gammaray-2.11.3.ebuild | 27 +++++++------ |
15 |
2 files changed, 60 insertions(+), 12 deletions(-) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 000000000..801629e8a |
20 |
--- /dev/null |
21 |
+++ b/dev-util/gammaray/files/gammaray-2.11.3-deselect-tests.patch |
22 |
@@ -0,0 +1,45 @@ |
23 |
+--- a/tests/CMakeLists.txt |
24 |
++++ b/tests/CMakeLists.txt |
25 |
+@@ -288,17 +288,6 @@ |
26 |
+ gammaray_add_test(earlyexittest earlyexittest.cpp) |
27 |
+ target_include_directories(earlyexittest PRIVATE ${CMAKE_BINARY_DIR}/launcher) |
28 |
+ target_link_libraries(earlyexittest gammaray_core gammaray_launcher) |
29 |
+- |
30 |
+- if(HAVE_QT_WIDGETS) |
31 |
+- gammaray_add_test(launchertest launchertest.cpp) |
32 |
+- target_include_directories(launchertest PRIVATE ${CMAKE_BINARY_DIR}/launcher) |
33 |
+- target_link_libraries(launchertest gammaray_core gammaray_launcher) |
34 |
+- endif() |
35 |
+- |
36 |
+- if(TARGET gammaray_client) |
37 |
+- gammaray_add_test(clientconnectiontest clientconnectiontest.cpp) |
38 |
+- target_link_libraries(clientconnectiontest gammaray_core gammaray_launcher gammaray_client) |
39 |
+- endif() |
40 |
+ endif() |
41 |
+ |
42 |
+ # |
43 |
+@@ -419,14 +408,6 @@ |
44 |
+ endif() |
45 |
+ |
46 |
+ if(Qt5Quick_FOUND) |
47 |
+- gammaray_add_quick_test(quickinspectortest |
48 |
+- quickinspectortest.cpp |
49 |
+- quickinspectortest.qrc |
50 |
+- $<TARGET_OBJECTS:modeltestobj> |
51 |
+- ) |
52 |
+- target_include_directories(quickinspectortest SYSTEM PRIVATE ${Qt5Quick_PRIVATE_INCLUDE_DIRS}) |
53 |
+- target_link_libraries(quickinspectortest gammaray_core gammaray_quickinspector_shared Qt5::Quick) |
54 |
+- |
55 |
+ gammaray_add_quick_test(quickinspectortest2 |
56 |
+ quickinspectortest2.cpp |
57 |
+ quickinspectortest.qrc |
58 |
+@@ -438,9 +419,6 @@ |
59 |
+ if(NOT Qt5Quick_VERSION VERSION_LESS 5.9.3) |
60 |
+ add_test(NAME quickinspectortest2_softwarecontext COMMAND quickinspectortest2) |
61 |
+ set_tests_properties(quickinspectortest2_softwarecontext PROPERTIES ENVIRONMENT "QT_QUICK_BACKEND=softwarecontext") |
62 |
+- |
63 |
+- add_test(NAME quickinspectortest_softwarecontext COMMAND quickinspectortest) |
64 |
+- set_tests_properties(quickinspectortest_softwarecontext PROPERTIES ENVIRONMENT "QT_QUICK_BACKEND=softwarecontext") |
65 |
+ endif() |
66 |
+ |
67 |
+ gammaray_add_quick_test(quickinspectorpickingtest |
68 |
|
69 |
diff --git a/dev-util/gammaray/gammaray-2.11.3.ebuild b/dev-util/gammaray/gammaray-2.11.3.ebuild |
70 |
index 98c015610..d31d81afc 100644 |
71 |
--- a/dev-util/gammaray/gammaray-2.11.3.ebuild |
72 |
+++ b/dev-util/gammaray/gammaray-2.11.3.ebuild |
73 |
@@ -4,7 +4,7 @@ |
74 |
EAPI=8 |
75 |
|
76 |
CMAKE_REMOVE_MODULES_LIST=( BackwardConfig ) |
77 |
-inherit cmake optfeature xdg |
78 |
+inherit cmake optfeature virtualx xdg |
79 |
|
80 |
DESCRIPTION="High-level runtime introspection tool for Qt applications" |
81 |
HOMEPAGE="https://www.kdab.com/gammaray https://github.com/KDAB/GammaRay" |
82 |
@@ -19,12 +19,9 @@ fi |
83 |
|
84 |
LICENSE="BSD-2 GPL-2+ MIT" |
85 |
SLOT=0 |
86 |
-IUSE="3d bluetooth designer doc geolocation printsupport script scxml svg test qml wayland webengine" |
87 |
- |
88 |
-# broken tests |
89 |
-RESTRICT="test" |
90 |
|
91 |
-DOCS=( CHANGES CONTRIBUTORS.txt README.txt ) |
92 |
+IUSE="3d bluetooth designer doc geolocation printsupport script scxml svg test qml wayland webengine" |
93 |
+RESTRICT="!test? ( test )" |
94 |
|
95 |
# TODO: fix automagic sci-libs/vtk (and many other) dependencies |
96 |
RDEPEND=" |
97 |
@@ -52,11 +49,15 @@ DEPEND="${RDEPEND} |
98 |
test? ( dev-qt/qttest:5 ) |
99 |
" |
100 |
|
101 |
+DOCS=( CHANGES CONTRIBUTORS.txt README.txt ) |
102 |
+ |
103 |
+PATCHES=( "${FILESDIR}"/${P}-deselect-tests.patch ) |
104 |
+ |
105 |
src_prepare(){ |
106 |
- sed -i \ |
107 |
- -e "/BackwardConfig.cmake/d" \ |
108 |
- -e "/set(KDE_INSTALL_USE_QT_SYS_PATHS/d" -i CMakeLists.txt || die |
109 |
sed -i "/add_backward(gammaray_core)/d" core/CMakeLists.txt || die |
110 |
+ sed -i CMakeLists.txt \ |
111 |
+ -e "/BackwardConfig.cmake/d" \ |
112 |
+ -e "/set(KDE_INSTALL_USE_QT_SYS_PATHS/d" || die |
113 |
|
114 |
cmake_src_prepare |
115 |
} |
116 |
@@ -85,15 +86,17 @@ src_configure(){ |
117 |
-DGAMMARAY_BUILD_DOCS=$(usex doc) |
118 |
-DGAMMARAY_BUILD_UI=ON |
119 |
-DGAMMARAY_DISABLE_FEEDBACK=ON |
120 |
- |
121 |
- # fix install paths |
122 |
-# -DDOC_INSTALL_DIR="doc/${PF}" |
123 |
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON |
124 |
) |
125 |
|
126 |
cmake_src_configure |
127 |
} |
128 |
|
129 |
+src_test() { |
130 |
+# export QT_QPA_PLATFORM=offscreen |
131 |
+ virtx cmake_src_test |
132 |
+} |
133 |
+ |
134 |
src_install() { |
135 |
cmake_src_install |
136 |
rm -r "${ED}"/usr/share/doc/${PN} || die |