1 |
commit: 93194f11fbf514797e222deb6f4a4f44cf4aa130 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 24 00:41:09 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 24 00:41:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93194f11 |
7 |
|
8 |
kde-apps/okular: Add missing patch |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
kde-apps/okular/files/okular-20.03.70-tests.patch | 148 ++++++++++++++++++++++ |
14 |
1 file changed, 148 insertions(+) |
15 |
|
16 |
diff --git a/kde-apps/okular/files/okular-20.03.70-tests.patch b/kde-apps/okular/files/okular-20.03.70-tests.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..d906e2a00f3 |
19 |
--- /dev/null |
20 |
+++ b/kde-apps/okular/files/okular-20.03.70-tests.patch |
21 |
@@ -0,0 +1,148 @@ |
22 |
+From c675ba8bed1e792f351fabf3ba040a86138f9f84 Mon Sep 17 00:00:00 2001 |
23 |
+From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
24 |
+Date: Thu, 12 Oct 2017 14:09:09 +0200 |
25 |
+Subject: [PATCH] Move tests into existing (auto)tests subdirectories |
26 |
+ |
27 |
+--- |
28 |
+ generators/chm/CMakeLists.txt | 12 +++--------- |
29 |
+ generators/chm/autotests/CMakeLists.txt | 8 ++++++++ |
30 |
+ generators/chm/autotests/chmgeneratortest.cpp | 2 +- |
31 |
+ generators/comicbook/CMakeLists.txt | 10 +++------- |
32 |
+ generators/comicbook/autotests/CMakeLists.txt | 6 ++++++ |
33 |
+ generators/kimgio/CMakeLists.txt | 6 +----- |
34 |
+ generators/kimgio/tests/CMakeLists.txt | 5 +++++ |
35 |
+ generators/kimgio/tests/kimgiotest.cpp | 2 +- |
36 |
+ 8 files changed, 28 insertions(+), 23 deletions(-) |
37 |
+ create mode 100644 generators/chm/autotests/CMakeLists.txt |
38 |
+ create mode 100644 generators/comicbook/autotests/CMakeLists.txt |
39 |
+ create mode 100644 generators/kimgio/tests/CMakeLists.txt |
40 |
+ |
41 |
+diff --git a/generators/chm/CMakeLists.txt b/generators/chm/CMakeLists.txt |
42 |
+index 9d82b9394..b3a33afe4 100644 |
43 |
+--- a/generators/chm/CMakeLists.txt |
44 |
++++ b/generators/chm/CMakeLists.txt |
45 |
+@@ -30,15 +30,9 @@ set(okularGenerator_chmlib_SRCS |
46 |
+ okular_add_generator(okularGenerator_chmlib ${okularGenerator_chmlib_SRCS}) |
47 |
+ target_link_libraries(okularGenerator_chmlib okularcore ${CHM_LIBRARY} ${LIBZIP_LIBRARY} KF5::KHtml) |
48 |
+ |
49 |
+-########### autotests ############### |
50 |
+- |
51 |
+-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) |
52 |
+-ecm_add_test(autotests/chmgeneratortest.cpp |
53 |
+- TEST_NAME "chmgeneratortest" |
54 |
+- LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore |
55 |
+-) |
56 |
+- |
57 |
+-target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_chmlib>") |
58 |
++if(BUILD_TESTING) |
59 |
++ add_subdirectory(autotests) |
60 |
++endif() |
61 |
+ |
62 |
+ ########### install files ############### |
63 |
+ install( FILES okularChm.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) |
64 |
+diff --git a/generators/chm/autotests/CMakeLists.txt b/generators/chm/autotests/CMakeLists.txt |
65 |
+new file mode 100644 |
66 |
+index 000000000..59753ca45 |
67 |
+--- /dev/null |
68 |
++++ b/generators/chm/autotests/CMakeLists.txt |
69 |
+@@ -0,0 +1,8 @@ |
70 |
++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" ) |
71 |
++ |
72 |
++ecm_add_test(chmgeneratortest.cpp |
73 |
++ TEST_NAME "chmgeneratortest" |
74 |
++ LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore |
75 |
++) |
76 |
++ |
77 |
++target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_chmlib>") |
78 |
+diff --git a/generators/chm/autotests/chmgeneratortest.cpp b/generators/chm/autotests/chmgeneratortest.cpp |
79 |
+index 9245a736f..5a2c487b4 100644 |
80 |
+--- a/generators/chm/autotests/chmgeneratortest.cpp |
81 |
++++ b/generators/chm/autotests/chmgeneratortest.cpp |
82 |
+@@ -34,7 +34,7 @@ void ChmGeneratorTest::initTestCase() |
83 |
+ { |
84 |
+ Okular::SettingsCore::instance( QStringLiteral("ChmGeneratorTest") ); |
85 |
+ m_document = new Okular::Document( nullptr ); |
86 |
+- const QString testFile = QStringLiteral(KDESRCDIR "autotests/data/test.chm"); |
87 |
++ const QString testFile = QStringLiteral(KDESRCDIR "data/test.chm"); |
88 |
+ QMimeDatabase db; |
89 |
+ const QMimeType mime = db.mimeTypeForFile( testFile ); |
90 |
+ QCOMPARE( m_document->openDocument(testFile, QUrl(), mime), Okular::Document::OpenSuccess ); |
91 |
+diff --git a/generators/comicbook/CMakeLists.txt b/generators/comicbook/CMakeLists.txt |
92 |
+index 9a07c7183..316c93152 100644 |
93 |
+--- a/generators/comicbook/CMakeLists.txt |
94 |
++++ b/generators/comicbook/CMakeLists.txt |
95 |
+@@ -29,13 +29,9 @@ if (KArchive_HAVE_LZMA) |
96 |
+ target_compile_definitions(okular_comicbook PRIVATE -DWITH_K7ZIP=1) |
97 |
+ endif() |
98 |
+ |
99 |
+-########### autotests ############### |
100 |
+- |
101 |
+-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) |
102 |
+-ecm_add_test(autotests/comicbooktest.cpp |
103 |
+- TEST_NAME "comicbooktest" |
104 |
+- LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore okular_comicbook |
105 |
+-) |
106 |
++if(BUILD_TESTING) |
107 |
++ add_subdirectory(autotests) |
108 |
++endif() |
109 |
+ |
110 |
+ ########### install files ############### |
111 |
+ install( FILES okularComicbook.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) |
112 |
+diff --git a/generators/comicbook/autotests/CMakeLists.txt b/generators/comicbook/autotests/CMakeLists.txt |
113 |
+new file mode 100644 |
114 |
+index 000000000..aaacb341a |
115 |
+--- /dev/null |
116 |
++++ b/generators/comicbook/autotests/CMakeLists.txt |
117 |
+@@ -0,0 +1,6 @@ |
118 |
++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" ) |
119 |
++ |
120 |
++ecm_add_test(comicbooktest.cpp |
121 |
++ TEST_NAME "comicbooktest" |
122 |
++ LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore okular_comicbook |
123 |
++) |
124 |
+diff --git a/generators/kimgio/CMakeLists.txt b/generators/kimgio/CMakeLists.txt |
125 |
+index b8cac76df..49f893bc1 100644 |
126 |
+--- a/generators/kimgio/CMakeLists.txt |
127 |
++++ b/generators/kimgio/CMakeLists.txt |
128 |
+@@ -13,13 +13,9 @@ okular_add_generator(okularGenerator_kimgio generator_kimgio.cpp) |
129 |
+ target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2 KF5::I18n) |
130 |
+ |
131 |
+ if(BUILD_TESTING) |
132 |
+- add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) |
133 |
+- set( kimgiotest_SRCS tests/kimgiotest.cpp ${CMAKE_SOURCE_DIR}/ui/pagepainter.cpp ${CMAKE_SOURCE_DIR}/ui/guiutils.cpp ${CMAKE_SOURCE_DIR}/ui/debug_ui.cpp ) |
134 |
+- ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test) |
135 |
+- target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_kimgio>") |
136 |
++ add_subdirectory(tests) |
137 |
+ endif() |
138 |
+ |
139 |
+- |
140 |
+ ########### install files ############### |
141 |
+ install( FILES okularKimgio.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) |
142 |
+ install( PROGRAMS okularApplication_kimgio.desktop org.kde.mobile.okular_kimgio.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) |
143 |
+diff --git a/generators/kimgio/tests/CMakeLists.txt b/generators/kimgio/tests/CMakeLists.txt |
144 |
+new file mode 100644 |
145 |
+index 000000000..f31bf3fe8 |
146 |
+--- /dev/null |
147 |
++++ b/generators/kimgio/tests/CMakeLists.txt |
148 |
+@@ -0,0 +1,5 @@ |
149 |
++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" ) |
150 |
++ |
151 |
++set( kimgiotest_SRCS kimgiotest.cpp ${CMAKE_SOURCE_DIR}/ui/pagepainter.cpp ${CMAKE_SOURCE_DIR}/ui/guiutils.cpp ${CMAKE_SOURCE_DIR}/ui/debug_ui.cpp ) |
152 |
++ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test) |
153 |
++target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_kimgio>") |
154 |
+diff --git a/generators/kimgio/tests/kimgiotest.cpp b/generators/kimgio/tests/kimgiotest.cpp |
155 |
+index f2e50641d..a24f7af80 100644 |
156 |
+--- a/generators/kimgio/tests/kimgiotest.cpp |
157 |
++++ b/generators/kimgio/tests/kimgiotest.cpp |
158 |
+@@ -9,7 +9,7 @@ |
159 |
+ |
160 |
+ |
161 |
+ #include "../generator_kimgio.h" |
162 |
+-#include "../../settings_core.h" |
163 |
++#include "../../../settings_core.h" |
164 |
+ |
165 |
+ #include <core/observer.h> |
166 |
+ #include <core/page.h> |
167 |
+-- |
168 |
+2.25.1 |
169 |
+ |