guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: ruby-concurrent: Work around test failure on ARM.


From: Ludovic Courtès
Subject: 02/03: gnu: ruby-concurrent: Work around test failure on ARM.
Date: Thu, 30 Mar 2017 17:41:09 -0400 (EDT)

civodul pushed a commit to branch core-updates
in repository guix.

commit 402b03e620fc14eda06b4c80121ecbf627c0740d
Author: Ludovic Courtès <address@hidden>
Date:   Thu Mar 30 23:36:05 2017 +0200

    gnu: ruby-concurrent: Work around test failure on ARM.
    
    * gnu/packages/patches/ruby-concurrent-test-arm.patch: New file.
    * gnu/packages/ruby.scm (ruby-concurrent)[source](patches): Add it.
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                       |  1 +
 .../patches/ruby-concurrent-test-arm.patch         | 36 ++++++++++++++++++++++
 gnu/packages/ruby.scm                              |  5 +--
 3 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 69e4b99..be47e74 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -913,6 +913,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/rpm-CVE-2014-8118.patch                 \
   %D%/packages/patches/rsem-makefile.patch                     \
   %D%/packages/patches/ruby-concurrent-ignore-broken-test.patch        \
+  %D%/packages/patches/ruby-concurrent-test-arm.patch          \
   %D%/packages/patches/ruby-puma-ignore-broken-test.patch       \
   %D%/packages/patches/ruby-rack-ignore-failing-test.patch      \
   %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
diff --git a/gnu/packages/patches/ruby-concurrent-test-arm.patch 
b/gnu/packages/patches/ruby-concurrent-test-arm.patch
new file mode 100644
index 0000000..75e6365
--- /dev/null
+++ b/gnu/packages/patches/ruby-concurrent-test-arm.patch
@@ -0,0 +1,36 @@
+Work around two test suite failures on ARM:
+
+  https://github.com/ruby-concurrency/concurrent-ruby/issues/547
+
+The regexps here assume addresses like "0x1234" but on ARM (32-bit)
+we get something like "0x-7db1e810" (notice the dash).
+
+diff --git a/spec/concurrent/edge/future_spec.rb 
b/spec/concurrent/edge/future_spec.rb
+index a48fd29..4344d7e 100644
+--- b/spec/concurrent/edge/future_spec.rb
++++ a/spec/concurrent/edge/future_spec.rb
+@@ -322,9 +322,9 @@
+       four  = three.delay.then(&:succ)
+ 
+       # meaningful to_s and inspect defined for Future and Promise
+-      expect(head.to_s).to match /<#Concurrent::Edge::Future:0x[\da-f]+ 
pending>/
++      expect(head.to_s).to match /<#Concurrent::Edge::Future:0x-?[\da-f]+ 
pending>/
+       expect(head.inspect).to(
+-          match(/<#Concurrent::Edge::Future:0x[\da-f]+ pending 
blocks:\[<#Concurrent::Edge::ThenPromise:0x[\da-f]+ pending>\]>/))
++          match(/<#Concurrent::Edge::Future:0x-?[\da-f]+ pending 
blocks:\[<#Concurrent::Edge::ThenPromise:0x-?[\da-f]+ pending>\]>/))
+ 
+       # evaluates only up to three, four is left unevaluated
+       expect(three.value!).to eq 3
+diff --git a/spec/concurrent/map_spec.rb b/spec/concurrent/map_spec.rb
+index 13fd5b7..1c82ebe 100644
+--- b/spec/concurrent/map_spec.rb
++++ a/spec/concurrent/map_spec.rb
+@@ -827,7 +827,7 @@
+     end
+ 
+     it '#inspect' do
+-      regexp = /\A#<Concurrent::Map:0x[0-9a-f]+ entries=[0-9]+ 
default_proc=.*>\Z/i
++      regexp = /\A#<Concurrent::Map:0x-?[0-9a-f]+ entries=[0-9]+ 
default_proc=.*>\Z/i
+       expect(Concurrent::Map.new.inspect).to match(regexp)
+       expect((Concurrent::Map.new {}).inspect).to match(regexp)
+       map = Concurrent::Map.new
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 4d839bc..0a710ec 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Pjotr Prins <address@hidden>
-;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <address@hidden>
+;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2014, 2015 Mark H Weaver <address@hidden>
 ;;; Copyright © 2014, 2015 David Thompson <address@hidden>
 ;;; Copyright © 2015 Ricardo Wurmus <address@hidden>
@@ -4102,7 +4102,8 @@ call.")
          "1x3g2admp14ykwfxidsicqbhlfsnxh9wyc806np4i15hws4if1d8"))
        ;; Exclude failing test reported at
        ;; https://github.com/ruby-concurrency/concurrent-ruby/issues/534
-       (patches (search-patches "ruby-concurrent-ignore-broken-test.patch"))))
+       (patches (search-patches "ruby-concurrent-ignore-broken-test.patch"
+                                "ruby-concurrent-test-arm.patch"))))
     (build-system ruby-build-system)
     (arguments
      `(#:test-target "spec"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]