1 |
commit: 54c9794f8f127350c837ab164c9021815b59c670 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 8 12:50:02 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 8 12:51:34 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54c9794f |
7 |
|
8 |
kde-apps/okular: Add missing patch |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
11 |
|
12 |
kde-apps/okular/files/okular-18.08.0-tests.patch | 112 +++++++++++++++++++++++ |
13 |
1 file changed, 112 insertions(+) |
14 |
|
15 |
diff --git a/kde-apps/okular/files/okular-18.08.0-tests.patch b/kde-apps/okular/files/okular-18.08.0-tests.patch |
16 |
new file mode 100644 |
17 |
index 00000000000..0e2cdaecd4a |
18 |
--- /dev/null |
19 |
+++ b/kde-apps/okular/files/okular-18.08.0-tests.patch |
20 |
@@ -0,0 +1,112 @@ |
21 |
+From 5f093fa9798ad30cda115cea573d18296696a0a9 Mon Sep 17 00:00:00 2001 |
22 |
+From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
23 |
+Date: Thu, 12 Oct 2017 14:09:09 +0200 |
24 |
+Subject: [PATCH] Move tests into existing (auto)tests subdirectories |
25 |
+ |
26 |
+--- |
27 |
+ generators/chm/CMakeLists.txt | 12 +++--------- |
28 |
+ generators/chm/autotests/CMakeLists.txt | 8 ++++++++ |
29 |
+ generators/chm/autotests/chmgeneratortest.cpp | 2 +- |
30 |
+ generators/kimgio/CMakeLists.txt | 6 +----- |
31 |
+ generators/kimgio/tests/CMakeLists.txt | 5 +++++ |
32 |
+ generators/kimgio/tests/kimgiotest.cpp | 2 +- |
33 |
+ 6 files changed, 19 insertions(+), 16 deletions(-) |
34 |
+ create mode 100644 generators/chm/autotests/CMakeLists.txt |
35 |
+ create mode 100644 generators/kimgio/tests/CMakeLists.txt |
36 |
+ |
37 |
+diff --git a/generators/chm/CMakeLists.txt b/generators/chm/CMakeLists.txt |
38 |
+index 9d82b9394..b3a33afe4 100644 |
39 |
+--- a/generators/chm/CMakeLists.txt |
40 |
++++ b/generators/chm/CMakeLists.txt |
41 |
+@@ -30,15 +30,9 @@ set(okularGenerator_chmlib_SRCS |
42 |
+ okular_add_generator(okularGenerator_chmlib ${okularGenerator_chmlib_SRCS}) |
43 |
+ target_link_libraries(okularGenerator_chmlib okularcore ${CHM_LIBRARY} ${LIBZIP_LIBRARY} KF5::KHtml) |
44 |
+ |
45 |
+-########### autotests ############### |
46 |
+- |
47 |
+-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) |
48 |
+-ecm_add_test(autotests/chmgeneratortest.cpp |
49 |
+- TEST_NAME "chmgeneratortest" |
50 |
+- LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore |
51 |
+-) |
52 |
+- |
53 |
+-target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_chmlib>") |
54 |
++if(BUILD_TESTING) |
55 |
++ add_subdirectory(autotests) |
56 |
++endif() |
57 |
+ |
58 |
+ ########### install files ############### |
59 |
+ install( FILES okularChm.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) |
60 |
+diff --git a/generators/chm/autotests/CMakeLists.txt b/generators/chm/autotests/CMakeLists.txt |
61 |
+new file mode 100644 |
62 |
+index 000000000..59753ca45 |
63 |
+--- /dev/null |
64 |
++++ b/generators/chm/autotests/CMakeLists.txt |
65 |
+@@ -0,0 +1,8 @@ |
66 |
++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" ) |
67 |
++ |
68 |
++ecm_add_test(chmgeneratortest.cpp |
69 |
++ TEST_NAME "chmgeneratortest" |
70 |
++ LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore |
71 |
++) |
72 |
++ |
73 |
++target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_chmlib>") |
74 |
+diff --git a/generators/chm/autotests/chmgeneratortest.cpp b/generators/chm/autotests/chmgeneratortest.cpp |
75 |
+index 6b0b8efc7..25fd6631a 100644 |
76 |
+--- a/generators/chm/autotests/chmgeneratortest.cpp |
77 |
++++ b/generators/chm/autotests/chmgeneratortest.cpp |
78 |
+@@ -34,7 +34,7 @@ void ChmGeneratorTest::initTestCase() |
79 |
+ { |
80 |
+ Okular::SettingsCore::instance( QStringLiteral("ChmGeneratorTest") ); |
81 |
+ m_document = new Okular::Document( 0 ); |
82 |
+- const QString testFile = QStringLiteral(KDESRCDIR "autotests/data/test.chm"); |
83 |
++ const QString testFile = QStringLiteral(KDESRCDIR "data/test.chm"); |
84 |
+ QMimeDatabase db; |
85 |
+ const QMimeType mime = db.mimeTypeForFile( testFile ); |
86 |
+ QCOMPARE( m_document->openDocument(testFile, QUrl(), mime), Okular::Document::OpenSuccess ); |
87 |
+diff --git a/generators/kimgio/CMakeLists.txt b/generators/kimgio/CMakeLists.txt |
88 |
+index b8cac76df..49f893bc1 100644 |
89 |
+--- a/generators/kimgio/CMakeLists.txt |
90 |
++++ b/generators/kimgio/CMakeLists.txt |
91 |
+@@ -13,13 +13,9 @@ okular_add_generator(okularGenerator_kimgio generator_kimgio.cpp) |
92 |
+ target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2 KF5::I18n) |
93 |
+ |
94 |
+ if(BUILD_TESTING) |
95 |
+- add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) |
96 |
+- 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 ) |
97 |
+- ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test) |
98 |
+- target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_kimgio>") |
99 |
++ add_subdirectory(tests) |
100 |
+ endif() |
101 |
+ |
102 |
+- |
103 |
+ ########### install files ############### |
104 |
+ install( FILES okularKimgio.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) |
105 |
+ install( PROGRAMS okularApplication_kimgio.desktop org.kde.mobile.okular_kimgio.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) |
106 |
+diff --git a/generators/kimgio/tests/CMakeLists.txt b/generators/kimgio/tests/CMakeLists.txt |
107 |
+new file mode 100644 |
108 |
+index 000000000..f31bf3fe8 |
109 |
+--- /dev/null |
110 |
++++ b/generators/kimgio/tests/CMakeLists.txt |
111 |
+@@ -0,0 +1,5 @@ |
112 |
++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" ) |
113 |
++ |
114 |
++set( kimgiotest_SRCS kimgiotest.cpp ${CMAKE_SOURCE_DIR}/ui/pagepainter.cpp ${CMAKE_SOURCE_DIR}/ui/guiutils.cpp ${CMAKE_SOURCE_DIR}/ui/debug_ui.cpp ) |
115 |
++ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test) |
116 |
++target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_kimgio>") |
117 |
+diff --git a/generators/kimgio/tests/kimgiotest.cpp b/generators/kimgio/tests/kimgiotest.cpp |
118 |
+index b3039a6bb..78608df9d 100644 |
119 |
+--- a/generators/kimgio/tests/kimgiotest.cpp |
120 |
++++ b/generators/kimgio/tests/kimgiotest.cpp |
121 |
+@@ -9,7 +9,7 @@ |
122 |
+ |
123 |
+ |
124 |
+ #include "../generator_kimgio.h" |
125 |
+-#include "../../settings_core.h" |
126 |
++#include "../../../settings_core.h" |
127 |
+ |
128 |
+ #include <core/observer.h> |
129 |
+ #include <core/page.h> |
130 |
+-- |
131 |
+2.14.2 |
132 |
+ |