summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-02-22 12:44:00 +0100
committerThomas Deutschmann <whissi@gentoo.org>2018-02-22 12:44:00 +0100
commit432f3f5e66e510ae29429064071ce83465ad6bb5 (patch)
treebc82991700013d0b885b8bc12801c803d56e571a /app-office/gnucash/files
parentdev-qt/qtlockedfile: Drop USE qt4,qt5, bump EAPI 6 (diff)
downloadgentoo-432f3f5e66e510ae29429064071ce83465ad6bb5.tar.gz
gentoo-432f3f5e66e510ae29429064071ce83465ad6bb5.tar.bz2
gentoo-432f3f5e66e510ae29429064071ce83465ad6bb5.zip
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
Diffstat (limited to 'app-office/gnucash/files')
-rw-r--r--app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch56
1 files changed, 56 insertions, 0 deletions
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 000000000000..ec0e83a80bf5
--- /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
+