public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/files/, app-office/gnucash/
Date: Thu, 22 Feb 2018 11:45:54 +0000 (UTC)	[thread overview]
Message-ID: <1519299840.432f3f5e66e510ae29429064071ce83465ad6bb5.whissi@gentoo> (raw)

commit:     432f3f5e66e510ae29429064071ce83465ad6bb5
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 22 11:44:00 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Feb 22 11:44:00 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=432f3f5e

app-office/gnucash: Add patch to address test failures on 32-bit platforms

Bug: https://bugs.gentoo.org/647596
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 ...ucash-2.7.4-fix-tests-for-32bit-platforms.patch | 56 ++++++++++++++++++++++
 app-office/gnucash/gnucash-2.7.4-r1.ebuild         |  5 +-
 2 files changed, 60 insertions(+), 1 deletion(-)

diff --git a/app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch b/app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch
new file mode 100644
index 00000000000..ec0e83a80bf
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch
@@ -0,0 +1,56 @@
+From 3a0d2009741cdf825492020acab7c85867a60589 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Thu, 22 Feb 2018 12:27:36 +0100
+Subject: [PATCH] tests: Skip tests for dates on 32-bit platforms which cannot
+ be representated
+
+Tests "test_IANA_Perth_tz" and "test_IANA_Minsk_tz" are failing on 32-bit
+platforms because the earliest timestamp which can be representated on a
+32-bit platform is "1901-12-13 20:45:52" but the test ranges start before
+that date.
+
+To be safe, this commit will add code to skip tests before year 1902 on
+32-bit platforms.
+
+Bug: https://bugs.gentoo.org/647596
+---
+ libgnucash/engine/test/gtest-gnc-timezone.cpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/libgnucash/engine/test/gtest-gnc-timezone.cpp b/libgnucash/engine/test/gtest-gnc-timezone.cpp
+index 5c46b2618..298220f6e 100644
+--- a/libgnucash/engine/test/gtest-gnc-timezone.cpp
++++ b/libgnucash/engine/test/gtest-gnc-timezone.cpp
+@@ -154,6 +154,14 @@ TEST(gnc_timezone_constructors, test_IANA_Perth_tz)
+         }
+         else if (year < 1916)
+ #else
++        if (year < 1902)
++        {
++            // Earliest timestamp which can be represented on a 32-bit
++            // system is "1901-12-13 20:45:52" -- so skip tests until we
++            // reach a year >1901 to be safe
++            continue;
++        }
++
+         if (year < 1916)
+ #endif
+         {
+@@ -216,6 +224,14 @@ TEST(gnc_timezone_constructors, test_IANA_Minsk_tz)
+         }
+         else if (year < 1924)
+ #else
++        if (year < 1902)
++        {
++            // Earliest timestamp which can be represented on a 32-bit
++            // system is "1901-12-13 20:45:52" -- so skip tests until we
++            // reach a year >1901 to be safe
++            continue;
++        }
++
+         if (year < 1924)
+ #endif
+         {
+-- 
+2.16.2
+

diff --git a/app-office/gnucash/gnucash-2.7.4-r1.ebuild b/app-office/gnucash/gnucash-2.7.4-r1.ebuild
index b51571b500e..3e3690ce231 100644
--- a/app-office/gnucash/gnucash-2.7.4-r1.ebuild
+++ b/app-office/gnucash/gnucash-2.7.4-r1.ebuild
@@ -82,7 +82,10 @@ DEPEND="${RDEPEND}
 # 	gnome-extra/yelp
 # )"
 
-PATCHES=( "${FILESDIR}"/gnucash-2.7.4-double_free.patch )
+PATCHES=(
+	"${FILESDIR}"/${P}-double_free.patch
+	"${FILESDIR}"/${P}-fix-tests-for-32bit-platforms.patch
+)
 
 pkg_setup() {
 	use python && python-single-r1_pkg_setup


             reply	other threads:[~2018-02-22 11:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 11:45 Thomas Deutschmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-03 18:54 [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/files/, app-office/gnucash/ David Seifert
2024-11-01 19:13 Andreas K. Hüttel
2023-12-14  8:12 Sam James
2023-09-23 21:08 Aaron W. Swenson
2023-03-17 16:03 Sam James
2023-03-16 12:47 Aaron W. Swenson
2022-12-06 12:02 Sam James
2022-12-06 12:02 Sam James
2020-03-28 21:46 Aaron W. Swenson
2019-01-09 13:06 Aaron W. Swenson
2018-02-23 11:26 Aaron Swenson
2018-01-15 10:37 Aaron Swenson
2016-07-02 10:43 Pacho Ramos
2015-11-11 13:04 Gilles Dartiguelongue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519299840.432f3f5e66e510ae29429064071ce83465ad6bb5.whissi@gentoo \
    --to=whissi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox