From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C184C1580B9 for ; Sun, 22 Aug 2021 23:03:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0E722E0867; Sun, 22 Aug 2021 23:03:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D815FE0867 for ; Sun, 22 Aug 2021 23:03:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8B9983408F0 for ; Sun, 22 Aug 2021 23:03:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2ADC27F3 for ; Sun, 22 Aug 2021 23:03:28 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1629673341.6bf3ae87c13a3c61097fa1c4c4be36e8fa764d7a.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/okular/files/, kde-apps/okular/ X-VCS-Repository: proj/kde X-VCS-Files: kde-apps/okular/files/okular-21.11.80-tests.patch kde-apps/okular/okular-9999.ebuild X-VCS-Directories: kde-apps/okular/files/ kde-apps/okular/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 6bf3ae87c13a3c61097fa1c4c4be36e8fa764d7a X-VCS-Branch: master Date: Sun, 22 Aug 2021 23:03:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7277f9cb-17c9-45e0-860e-98ae9d1aa941 X-Archives-Hash: 94869cde37a0b5bdd5476b23e9d65507 commit: 6bf3ae87c13a3c61097fa1c4c4be36e8fa764d7a Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Aug 22 23:02:21 2021 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Aug 22 23:02:21 2021 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=6bf3ae87 kde-apps/okular: Rebase okular-20.11.90-tests.patch on top of HEAD Reported-by: jospezial gmx.de> Closes: https://bugs.gentoo.org/809674 Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner gentoo.org> kde-apps/okular/files/okular-21.11.80-tests.patch | 145 ++++++++++++++++++++++ kde-apps/okular/okular-9999.ebuild | 2 +- 2 files changed, 146 insertions(+), 1 deletion(-) diff --git a/kde-apps/okular/files/okular-21.11.80-tests.patch b/kde-apps/okular/files/okular-21.11.80-tests.patch new file mode 100644 index 0000000000..683a07bc1a --- /dev/null +++ b/kde-apps/okular/files/okular-21.11.80-tests.patch @@ -0,0 +1,145 @@ +From 323fed918995fe2e01036c74c1498446b4d2f122 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Thu, 12 Oct 2017 14:09:09 +0200 +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 | 5 +---- + generators/kimgio/tests/CMakeLists.txt | 5 +++++ + generators/kimgio/tests/kimgiotest.cpp | 2 +- + 8 files changed, 28 insertions(+), 22 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 +index 0d7452cba..3adb3fd54 100644 +--- a/generators/chm/CMakeLists.txt ++++ b/generators/chm/CMakeLists.txt +@@ -23,15 +23,9 @@ okular_add_generator(okularGenerator_chmlib ${okularGenerator_chmlib_SRCS}) + target_include_directories(okularGenerator_chmlib PRIVATE ${CHM_INCLUDE_DIR} ${LIBZIP_INCLUDE_DIR}) + target_link_libraries(okularGenerator_chmlib okularcore ${CHM_LIBRARY} ${LIBZIP_LIBRARY} KF5::KHtml) + +-########### autotests ############### +- +-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) +-ecm_add_test(autotests/chmgeneratortest.cpp +- TEST_NAME "chmgeneratortest" +- LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore +-) +- +-target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$") ++if(BUILD_TESTING) ++ add_subdirectory(autotests) ++endif() + + ########### install files ############### + install( FILES okularChm.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) +diff --git a/generators/chm/autotests/CMakeLists.txt b/generators/chm/autotests/CMakeLists.txt +new file mode 100644 +index 000000000..59753ca45 +--- /dev/null ++++ b/generators/chm/autotests/CMakeLists.txt +@@ -0,0 +1,8 @@ ++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" ) ++ ++ecm_add_test(chmgeneratortest.cpp ++ TEST_NAME "chmgeneratortest" ++ LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore ++) ++ ++target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$") +diff --git a/generators/chm/autotests/chmgeneratortest.cpp b/generators/chm/autotests/chmgeneratortest.cpp +index c428fa1b3..68f7a5821 100644 +--- a/generators/chm/autotests/chmgeneratortest.cpp ++++ b/generators/chm/autotests/chmgeneratortest.cpp +@@ -30,7 +30,7 @@ void ChmGeneratorTest::initTestCase() + { + Okular::SettingsCore::instance(QStringLiteral("ChmGeneratorTest")); + m_document = new Okular::Document(nullptr); +- const QString testFile = QStringLiteral(KDESRCDIR "autotests/data/test.chm"); ++ const QString testFile = QStringLiteral(KDESRCDIR "data/test.chm"); + 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 a0e7569a2..91bcc6ec7 100644 +--- a/generators/comicbook/CMakeLists.txt ++++ b/generators/comicbook/CMakeLists.txt +@@ -25,13 +25,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 6919bad1a..765f36c0b 100644 +--- a/generators/kimgio/CMakeLists.txt ++++ b/generators/kimgio/CMakeLists.txt +@@ -7,10 +7,7 @@ okular_add_generator(okularGenerator_kimgio generator_kimgio.cpp) + target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2 KF5::I18n) + + if(BUILD_TESTING AND BUILD_DESKTOP) +- add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) +- set( kimgiotest_SRCS tests/kimgiotest.cpp ${CMAKE_SOURCE_DIR}/part/pagepainter.cpp ${CMAKE_SOURCE_DIR}/part/guiutils.cpp ${CMAKE_SOURCE_DIR}/part/debug_ui.cpp ) +- ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test) +- target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$") ++ add_subdirectory(tests) + endif() + + +diff --git a/generators/kimgio/tests/CMakeLists.txt b/generators/kimgio/tests/CMakeLists.txt +new file mode 100644 +index 000000000..844c9096a +--- /dev/null ++++ b/generators/kimgio/tests/CMakeLists.txt +@@ -0,0 +1,5 @@ ++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" ) ++ ++set( kimgiotest_SRCS kimgiotest.cpp ${CMAKE_SOURCE_DIR}/part/pagepainter.cpp ${CMAKE_SOURCE_DIR}/part/guiutils.cpp ${CMAKE_SOURCE_DIR}/part/debug_ui.cpp ) ++ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test) ++target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$") +diff --git a/generators/kimgio/tests/kimgiotest.cpp b/generators/kimgio/tests/kimgiotest.cpp +index d521a5a7b..259bb4894 100644 +--- a/generators/kimgio/tests/kimgiotest.cpp ++++ b/generators/kimgio/tests/kimgiotest.cpp +@@ -4,7 +4,7 @@ + SPDX-License-Identifier: GPL-2.0-or-later + */ + +-#include "../../settings_core.h" ++#include "../../../settings_core.h" + #include "../generator_kimgio.h" + + #include +-- +2.33.0 + diff --git a/kde-apps/okular/okular-9999.ebuild b/kde-apps/okular/okular-9999.ebuild index 002e928a02..a91feea7d6 100644 --- a/kde-apps/okular/okular-9999.ebuild +++ b/kde-apps/okular/okular-9999.ebuild @@ -68,7 +68,7 @@ RDEPEND="${DEPEND} " PATCHES=( - "${FILESDIR}/${PN}-20.11.90-tests.patch" # bug 734138 + "${FILESDIR}/${PN}-21.11.80-tests.patch" # bug 734138 "${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # avoid same-name entry )