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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 731B1158021 for ; Tue, 6 Dec 2022 12:02:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75869E0827; Tue, 6 Dec 2022 12:02:35 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5B42CE0827 for ; Tue, 6 Dec 2022 12:02:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5F2D73410F9 for ; Tue, 6 Dec 2022 12:02:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8E78A77B for ; Tue, 6 Dec 2022 12:02:31 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1670327830.c418a02ed3285e2c08c109e207ba9d48f005cac8.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/files/, app-office/gnucash/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-office/gnucash/files/gnucash-4.12-drop-broken-test.patch app-office/gnucash/files/gnucash-4.12-fix-test.patch app-office/gnucash/gnucash-4.12.ebuild X-VCS-Directories: app-office/gnucash/ app-office/gnucash/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: c418a02ed3285e2c08c109e207ba9d48f005cac8 X-VCS-Branch: master Date: Tue, 6 Dec 2022 12:02:31 +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: 5c95cf22-bd2a-4dd8-a161-21fa0c09b939 X-Archives-Hash: e85bdfdaa2a97f2e3b5ac8f8601b4509 commit: c418a02ed3285e2c08c109e207ba9d48f005cac8 Author: Marco Scardovi icloud com> AuthorDate: Thu Nov 24 23:10:04 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Dec 6 11:57:10 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c418a02e app-office/gnucash: make tests working Signed-off-by: Marco Scardovi icloud.com> Closes: https://github.com/gentoo/gentoo/pull/28349 Signed-off-by: Sam James gentoo.org> .../files/gnucash-4.12-drop-broken-test.patch | 30 ++++++++++++++++++++++ .../gnucash/files/gnucash-4.12-fix-test.patch | 24 +++++++++++++++++ app-office/gnucash/gnucash-4.12.ebuild | 25 +++++++++--------- 3 files changed, 67 insertions(+), 12 deletions(-) diff --git a/app-office/gnucash/files/gnucash-4.12-drop-broken-test.patch b/app-office/gnucash/files/gnucash-4.12-drop-broken-test.patch new file mode 100644 index 000000000000..c2b396bcf04f --- /dev/null +++ b/app-office/gnucash/files/gnucash-4.12-drop-broken-test.patch @@ -0,0 +1,30 @@ +From a52795b022e040d7a93bb4dc352780d832c55390 Mon Sep 17 00:00:00 2001 +From: Marco Scardovi +Date: Sat, 26 Nov 2022 22:38:02 +0100 +Subject: [PATCH] Fix test + +Signed-off-by: Marco Scardovi +--- + libgnucash/core-utils/test/CMakeLists.txt | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/libgnucash/core-utils/test/CMakeLists.txt b/libgnucash/core-utils/test/CMakeLists.txt +index 3b724c7c632..07add8b8699 100644 +--- a/libgnucash/core-utils/test/CMakeLists.txt ++++ b/libgnucash/core-utils/test/CMakeLists.txt +@@ -19,9 +19,6 @@ endmacro() + add_core_utils_test(test-gnc-glib-utils test-gnc-glib-utils.c) + add_core_utils_test(test-resolve-file-path test-resolve-file-path.c) + add_core_utils_test(test-userdata-dir test-userdata-dir.c) +-if (NOT MAC_INTEGRATION AND NOT WIN32) +- add_core_utils_test(test-userdata-dir-invalid-home test-userdata-dir-invalid-home.c) +-endif() + if (MAC_INTEGRATION) + target_compile_options(test-userdata-dir PRIVATE ${OSX_EXTRA_COMPILE_FLAGS}) + target_compile_definitions(test-userdata-dir PRIVATE ${GTK_MAC_CFLAGS_OTHER}) +@@ -53,4 +50,4 @@ gnc_add_test(test-gnc-path-util "${test_gnc_path_util_SOURCES}" + + set_dist_list(test_core_utils_DIST CMakeLists.txt + test-gnc-glib-utils.c test-resolve-file-path.c test-userdata-dir.c +- test-userdata-dir-invalid-home.c gtest-path-utilities.cpp) ++ gtest-path-utilities.cpp) diff --git a/app-office/gnucash/files/gnucash-4.12-fix-test.patch b/app-office/gnucash/files/gnucash-4.12-fix-test.patch new file mode 100644 index 000000000000..e80c712214e6 --- /dev/null +++ b/app-office/gnucash/files/gnucash-4.12-fix-test.patch @@ -0,0 +1,24 @@ +From 6fe2028bca49f455b7841d178a712baec8f72919 Mon Sep 17 00:00:00 2001 +From: Marco Scardovi +Date: Thu, 24 Nov 2022 23:20:07 +0100 +Subject: [PATCH] Fix test + +Signed-off-by: Marco Scardovi +--- + libgnucash/engine/mocks/fake-qofquery.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgnucash/engine/mocks/fake-qofquery.cpp b/libgnucash/engine/mocks/fake-qofquery.cpp +index 15341189aa8..a82dadebf02 100644 +--- a/libgnucash/engine/mocks/fake-qofquery.cpp ++++ b/libgnucash/engine/mocks/fake-qofquery.cpp +@@ -59,8 +59,8 @@ static class QofFakeQueryPool + { + ASSERT_TRUE(query_used((QofQuery*)query)); + auto it = std::find(m_queriesUsed.begin(), m_queriesUsed.end(), query); +- m_queriesUsed.erase(it); + m_queriesConsumed.push_back(*it); ++ m_queriesUsed.erase(it); + } + + /* Remove a formerly added QofFakeQueryObject from the pool */ diff --git a/app-office/gnucash/gnucash-4.12.ebuild b/app-office/gnucash/gnucash-4.12.ebuild index 15c424472fbc..d19d9983eb5e 100644 --- a/app-office/gnucash/gnucash-4.12.ebuild +++ b/app-office/gnucash/gnucash-4.12.ebuild @@ -78,11 +78,11 @@ RDEPEND=" DEPEND=" ${RDEPEND} - >=dev-cpp/gtest-1.8.0 >=sys-devel/gettext-0.20 dev-lang/perl dev-perl/XML-Parser sys-devel/libtool + test? ( >=dev-cpp/gtest-1.8.0 ) " BDEPEND=" @@ -106,16 +106,15 @@ PDEPEND=" PATCHES=( "${FILESDIR}/${PN}"-3.8-examples-subdir.patch "${FILESDIR}/${PN}"-3.8-exclude-license.patch + "${FILESDIR}/${P}"-drop-broken-test.patch + # will be fixed on future version, see + # https://github.com/Gnucash/gnucash/pull/1472 + "${FILESDIR}/${P}"-fix-test.patch ) -S="${WORKDIR}/${PN}-$(ver_cut 1-2)" - -# scardracs: 2022-11-21 -# I don't like that solution but actually these QA warnings -# are false positives. If You are able to find a better -# solution feel free to fix it. -# bugs #734044 #814134 -QA_FLAGS_IGNORED=".*" +# guile generates ELF files without use of C or machine code +# It's a portage's false positive. bug #677600 +QA_PREBUILT='*[.]go' pkg_setup() { use python && python-single-r1_pkg_setup @@ -124,6 +123,9 @@ pkg_setup() { src_prepare() { cmake_src_prepare + # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38112 + find "${S}" -name "*.scm" -exec touch {} + || die + # Fix tests writing to /tmp local fixtestfiles=( gnucash/report/test/test-report-html.scm @@ -187,15 +189,14 @@ src_test() { > "${BUILD_DIR}"/CTestCustom.cmake || die "Failed to disable test-qof and test-gnc-numeric!" fi + cd "${BUILD_DIR}" || die "Failed to enter ${BUILD_DIR}" + XDG_DATA_HOME="${T}/$(whoami)" eninja check cmake_src_test } src_install() { cmake_src_install - # strip is unable to recognise the format of the input files (*.go) - dostrip -x /usr/$(get_libdir)/guile - if use examples ; then docompress -x /usr/share/doc/"${PF}"/examples else