diff --git a/0004-Increase-tolerances-to-work-on-all-arches.patch b/0004-Increase-tolerances-to-work-on-all-arches.patch deleted file mode 100644 index ce8617c..0000000 --- a/0004-Increase-tolerances-to-work-on-all-arches.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 427b2807501261dfb8da62b871a8dc2957945de8 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Sat, 21 Mar 2020 23:43:25 -0400 -Subject: [PATCH 4/4] Increase tolerances to work on all arches. - -Signed-off-by: Elliott Sales de Andrade ---- - tests/testthat/test_layout.fr.R | 5 +++-- - tests/testthat/test_layout.kk.R | 32 ++++++++++++++------------------ - 2 files changed, 17 insertions(+), 20 deletions(-) - -diff --git a/tests/testthat/test_layout.fr.R b/tests/testthat/test_layout.fr.R -index 3febdc3..f26ea6f 100644 ---- a/tests/testthat/test_layout.fr.R -+++ b/tests/testthat/test_layout.fr.R -@@ -10,14 +10,15 @@ test_that("", { - g <- make_ring(10) - l <- layout_with_fr(g, niter=50, start.temp=sqrt(10)/10) - expect_true( -- isTRUE(all.equal(sum(l), 10.794223604849)) || -- isTRUE(all.equal(sum(l), 10.7943032688805)) -+ isTRUE(all.equal(sum(l), 10.8, tolerance = 0.1)) - ) - - set.seed(42) - g <- make_star(30) - l <- layout_with_fr(g, niter=500, dim=3, start.temp=20) - expect_true( -+ (Sys.info()["machine"] %in% c("aarch64", "ppc64", "ppc64le", "s390x") && -+ isTRUE(all.equal(sum(l), 1079, tolerance = 1))) || - isTRUE(all.equal(sum(l), 1004.00737470853)) || - isTRUE(all.equal(sum(l), 941.472420651506)) - ) -diff --git a/tests/testthat/test_layout.kk.R b/tests/testthat/test_layout.kk.R -index 51c915b..8460a5b 100644 ---- a/tests/testthat/test_layout.kk.R -+++ b/tests/testthat/test_layout.kk.R -@@ -9,24 +9,20 @@ test_that("Kamada-Kawai layout generator works", { - l <- layout_with_kk(g, maxiter=50) - if (Sys.info()["sysname"] == "Darwin") { - expect_that(sum(l), equals(-1.13071769106689)) -- } else if (Sys.info()["sysname"] == "Linux" && -- Sys.info()["machine"] == "x86_64") { -- expect_that(sum(l), equals(-6.77278645472984e-05)) -- } else if (Sys.info()["sysname"] == "Linux" && -- Sys.info()["machine"] == "i686") { -- expect_that(sum(l), equals(0.914809637353466)) -+ } else if (Sys.info()["sysname"] == "Linux") { -+ if (Sys.info()["machine"] %in% c("aarch64", "ppc64", "ppc64le", "s390x")) { -+ expect_that(sum(l), equals(0.914809637353466)) -+ } else { -+ expect_that(sum(l), equals(-6.77278645472984e-05)) -+ } - } - - g <- make_star(30) - l <- layout_with_kk(g, maxiter=500) - if (Sys.info()["sysname"] == "Darwin") { - expect_that(sum(l), equals(-85.6883999492408)) -- } else if (Sys.info()["sysname"] == "Linux" && -- Sys.info()["machine"] == "x86_64") { -- expect_that(sum(l), equals(-86.1405864709501)) -- } else if (Sys.info()["sysname"] == "Linux" && -- Sys.info()["machine"] == "i686") { -- expect_that(sum(l), equals(-85.142223229617)) -+ } else if (Sys.info()["sysname"] == "Linux") { -+ expect_that(sum(l), equals(-84.8, tolerance = 0.1)) - } - - g <- make_ring(10) -@@ -34,12 +30,12 @@ test_that("Kamada-Kawai layout generator works", { - l <- layout_with_kk(g, maxiter=500) - if (Sys.info()["sysname"] == "Darwin") { - expect_that(sum(l), equals(1.61069099387368)) -- } else if (Sys.info()["sysname"] == "Linux" && -- Sys.info()["machine"] == "x86_64") { -- expect_that(sum(l), equals(-1.83036635516248)) -- } else if (Sys.info()["sysname"] == "Linux" && -- Sys.info()["machine"] == "i686") { -- expect_that(sum(l), equals(0.0631144692360025)) -+ } else if (Sys.info()["sysname"] == "Linux") { -+ if (Sys.info()["machine"] %in% c("aarch64", "ppc64", "ppc64le", "s390x")) { -+ expect_that(sum(l), equals(1.54, tolerance = 0.01)) -+ } else { -+ expect_that(sum(l), equals(-1.83036635516248)) -+ } - } - - }) --- -2.26.2 - diff --git a/R-igraph.spec b/R-igraph.spec index 97a8872..6ff6eff 100644 --- a/R-igraph.spec +++ b/R-igraph.spec @@ -24,7 +24,6 @@ Source0: https://cran.r-project.org/src/contrib/%{packname}_%{packver}. # Unbundle some things: Patch0002: 0002-Unbundle-uuid.patch Patch0003: 0003-Unbundle-arpack.patch -Patch0004: 0004-Increase-tolerances-to-work-on-all-arches.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -89,9 +88,6 @@ pushd %{packname} %if %{with sys_arpack} %patch0003 -p1 %endif -# do we need this? -# %%patch0004 -p1 -%patch0005 -p1 # Fix executable files. chmod -x src/vendor/simpleraytracer/*.*