diff mbox series

[bug#45470,2/2] gnu: redis: Unbundle jemalloc & reinstate most of the tests

Message ID 20201228184525.21537-2-vincent.legoll@gmail.com
State Accepted
Headers show
Series [bug#45470,1/2] gnu: redis: Update to 6.0.9. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vincent Legoll Dec. 28, 2020, 6:45 p.m. UTC
* gnu/packages/databases.scm (redis)[source]: Delete bundled jemalloc.
[native-inputs]: Add procps & tcl for the tests. [arguments]: substitute
the right tclsh binary & disable failing tests.
---
 gnu/packages/databases.scm | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

Comments

Efraim Flashner Dec. 29, 2020, 8:56 a.m. UTC | #1
Looks great. Patches pushed!
diff mbox series

Patch

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 919ec160e7..a58b4189f8 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -2137,12 +2137,30 @@  similar to BerkeleyDB, LevelDB, etc.")
                                   version".tar.gz"))
               (sha256
                (base32
-                "1pc6gyiylrcazlc559dp5mxqj733pk9qabnirw4ry3k23kwdqayw"))))
+                "1pc6gyiylrcazlc559dp5mxqj733pk9qabnirw4ry3k23kwdqayw"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Delete bundled jemalloc, as the package will use the libc one
+               '(begin (delete-file-recursively "deps/jemalloc")
+                       #t))))
     (build-system gnu-build-system)
+    (native-inputs `(("procps" ,procps) ; for tests
+                     ("tcl" ,tcl)))     ; for tests
     (arguments
-     '(#:tests? #f ; tests related to master/slave and replication fail
-       #:phases (modify-phases %standard-phases
-                  (delete 'configure))
+     '(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-after 'unpack 'tclsh
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "runtest"
+                        (("^TCLSH=.*")
+                          (string-append "TCLSH="
+                            (assoc-ref inputs "tcl") "/bin/tclsh")))
+                      ; Disable failing tests
+                      (substitute* "tests/test_helper.tcl"
+                        (("    integration/replication[^-]") "")
+                        (("    integration/replication-4") "")
+                        (("    integration/replication-psync") ""))
+                      #t)))
        #:make-flags `("CC=gcc"
                       "MALLOC=libc"
                       "LDFLAGS=-ldl"