aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-03-12 23:56:24 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2020-03-13 00:33:19 +0100
commitafc59a3c8ee5e8638a848dc70ba56d7e03e5fa00 (patch)
treee937e8b1c5d8543285c387ca24969976592f5a0c
parentkde-misc/basket: Patch upstreamed (diff)
downloadkde-afc59a3c8ee5e8638a848dc70ba56d7e03e5fa00.tar.gz
kde-afc59a3c8ee5e8638a848dc70ba56d7e03e5fa00.tar.bz2
kde-afc59a3c8ee5e8638a848dc70ba56d7e03e5fa00.zip
kde-apps/okular: Rebase ${PN}-20.03.70-tests.patch on top of HEAD
Necessary after upstream commit 4019ec56e Thanks-to: Duncan <1i5t5.duncan@cox.net> Closes: https://bugs.gentoo.org/712218 Package-Manager: Portage-2.3.93, Repoman-2.3.20 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--kde-apps/okular/files/okular-20.03.70-tests.patch46
1 files changed, 41 insertions, 5 deletions
diff --git a/kde-apps/okular/files/okular-20.03.70-tests.patch b/kde-apps/okular/files/okular-20.03.70-tests.patch
index db7ec3993d..d906e2a00f 100644
--- a/kde-apps/okular/files/okular-20.03.70-tests.patch
+++ b/kde-apps/okular/files/okular-20.03.70-tests.patch
@@ -1,4 +1,4 @@
-From 5f093fa9798ad30cda115cea573d18296696a0a9 Mon Sep 17 00:00:00 2001
+From c675ba8bed1e792f351fabf3ba040a86138f9f84 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date: Thu, 12 Oct 2017 14:09:09 +0200
Subject: [PATCH] Move tests into existing (auto)tests subdirectories
@@ -7,11 +7,14 @@ Subject: [PATCH] Move tests into existing (auto)tests subdirectories
generators/chm/CMakeLists.txt | 12 +++---------
generators/chm/autotests/CMakeLists.txt | 8 ++++++++
generators/chm/autotests/chmgeneratortest.cpp | 2 +-
+ generators/comicbook/CMakeLists.txt | 10 +++-------
+ generators/comicbook/autotests/CMakeLists.txt | 6 ++++++
generators/kimgio/CMakeLists.txt | 6 +-----
generators/kimgio/tests/CMakeLists.txt | 5 +++++
generators/kimgio/tests/kimgiotest.cpp | 2 +-
- 6 files changed, 19 insertions(+), 16 deletions(-)
+ 8 files changed, 28 insertions(+), 23 deletions(-)
create mode 100644 generators/chm/autotests/CMakeLists.txt
+ create mode 100644 generators/comicbook/autotests/CMakeLists.txt
create mode 100644 generators/kimgio/tests/CMakeLists.txt
diff --git a/generators/chm/CMakeLists.txt b/generators/chm/CMakeLists.txt
@@ -52,7 +55,7 @@ index 000000000..59753ca45
+
+target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_chmlib>")
diff --git a/generators/chm/autotests/chmgeneratortest.cpp b/generators/chm/autotests/chmgeneratortest.cpp
-index 6b0b8efc7..25fd6631a 100644
+index 9245a736f..5a2c487b4 100644
--- a/generators/chm/autotests/chmgeneratortest.cpp
+++ b/generators/chm/autotests/chmgeneratortest.cpp
@@ -34,7 +34,7 @@ void ChmGeneratorTest::initTestCase()
@@ -64,6 +67,39 @@ index 6b0b8efc7..25fd6631a 100644
QMimeDatabase db;
const QMimeType mime = db.mimeTypeForFile( testFile );
QCOMPARE( m_document->openDocument(testFile, QUrl(), mime), Okular::Document::OpenSuccess );
+diff --git a/generators/comicbook/CMakeLists.txt b/generators/comicbook/CMakeLists.txt
+index 9a07c7183..316c93152 100644
+--- a/generators/comicbook/CMakeLists.txt
++++ b/generators/comicbook/CMakeLists.txt
+@@ -29,13 +29,9 @@ if (KArchive_HAVE_LZMA)
+ target_compile_definitions(okular_comicbook PRIVATE -DWITH_K7ZIP=1)
+ endif()
+
+-########### autotests ###############
+-
+-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
+-ecm_add_test(autotests/comicbooktest.cpp
+- TEST_NAME "comicbooktest"
+- LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore okular_comicbook
+-)
++if(BUILD_TESTING)
++ add_subdirectory(autotests)
++endif()
+
+ ########### install files ###############
+ install( FILES okularComicbook.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
+diff --git a/generators/comicbook/autotests/CMakeLists.txt b/generators/comicbook/autotests/CMakeLists.txt
+new file mode 100644
+index 000000000..aaacb341a
+--- /dev/null
++++ b/generators/comicbook/autotests/CMakeLists.txt
+@@ -0,0 +1,6 @@
++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" )
++
++ecm_add_test(comicbooktest.cpp
++ TEST_NAME "comicbooktest"
++ LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore okular_comicbook
++)
diff --git a/generators/kimgio/CMakeLists.txt b/generators/kimgio/CMakeLists.txt
index b8cac76df..49f893bc1 100644
--- a/generators/kimgio/CMakeLists.txt
@@ -95,7 +131,7 @@ index 000000000..f31bf3fe8
+ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test)
+target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_kimgio>")
diff --git a/generators/kimgio/tests/kimgiotest.cpp b/generators/kimgio/tests/kimgiotest.cpp
-index b3039a6bb..78608df9d 100644
+index f2e50641d..a24f7af80 100644
--- a/generators/kimgio/tests/kimgiotest.cpp
+++ b/generators/kimgio/tests/kimgiotest.cpp
@@ -9,7 +9,7 @@
@@ -108,5 +144,5 @@ index b3039a6bb..78608df9d 100644
#include <core/observer.h>
#include <core/page.h>
--
-2.14.2
+2.25.1