summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatoro Mahri <matoro_gentoo@matoro.tk>2024-01-15 21:19:46 -0500
committerSam James <sam@gentoo.org>2024-01-17 05:43:25 +0000
commit772df3915309410f51202aab73bebe2727bb5082 (patch)
tree229ce70f5745a88b6bc803632568a7c5ac8755c0 /dev-cpp
parentMove {dev-util → dev-build}/muon (diff)
downloadgentoo-772df3915309410f51202aab73bebe2727bb5082.tar.gz
gentoo-772df3915309410f51202aab73bebe2727bb5082.tar.bz2
gentoo-772df3915309410f51202aab73bebe2727bb5082.zip
dev-cpp/benchmark: fix tests on 32-bit
See: https://salsa.debian.org/science-team/benchmark/-/blob/master/debian/patches/0007-fix-32bit-test.patch?ref_type=heads Bug: https://bugs.gentoo.org/916278 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: https://github.com/gentoo/gentoo/pull/34830 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/benchmark/benchmark-1.8.3.ebuild1
-rw-r--r--dev-cpp/benchmark/files/benchmark-1.8.3-fix-32bit-test.patch20
2 files changed, 21 insertions, 0 deletions
diff --git a/dev-cpp/benchmark/benchmark-1.8.3.ebuild b/dev-cpp/benchmark/benchmark-1.8.3.ebuild
index 20e8f88dad8d..1fa9b7060d93 100644
--- a/dev-cpp/benchmark/benchmark-1.8.3.ebuild
+++ b/dev-cpp/benchmark/benchmark-1.8.3.ebuild
@@ -17,6 +17,7 @@ RESTRICT="!test? ( test )"
BDEPEND="doc? ( app-text/doxygen )
test? ( >=dev-cpp/gtest-1.11.0 )"
+PATCHES=( "${FILESDIR}/${PN}-1.8.3-fix-32bit-test.patch" )
src_configure() {
local mycmakeargs=(
diff --git a/dev-cpp/benchmark/files/benchmark-1.8.3-fix-32bit-test.patch b/dev-cpp/benchmark/files/benchmark-1.8.3-fix-32bit-test.patch
new file mode 100644
index 000000000000..62e741687f9c
--- /dev/null
+++ b/dev-cpp/benchmark/files/benchmark-1.8.3-fix-32bit-test.patch
@@ -0,0 +1,20 @@
+https://bugs.gentoo.org/916278
+https://salsa.debian.org/science-team/benchmark/-/blob/master/debian/patches/0007-fix-32bit-test.patch?ref_type=heads
+
+Description: Fix 32bit-test
+Author: Anton Gladky <gladk@debian.org>
+Last-Update: 2023-10-17
+
+--- benchmark-1.8.3.orig/test/statistics_gtest.cc
++++ benchmark-1.8.3/test/statistics_gtest.cc
+@@ -28,8 +28,8 @@ TEST(StatisticsTest, StdDev) {
+ TEST(StatisticsTest, CV) {
+ EXPECT_DOUBLE_EQ(benchmark::StatisticsCV({101, 101, 101, 101}), 0.0);
+ EXPECT_DOUBLE_EQ(benchmark::StatisticsCV({1, 2, 3}), 1. / 2.);
+- EXPECT_DOUBLE_EQ(benchmark::StatisticsCV({2.5, 2.4, 3.3, 4.2, 5.1}),
+- 0.32888184094918121);
++ EXPECT_NEAR(benchmark::StatisticsCV({2.5, 2.4, 3.3, 4.2, 5.1}),
++ 0.32888184094918121, 1e-7);
+ }
+
+ } // end namespace