guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: multipath-tools: Enable tests.


From: guix-commits
Subject: branch master updated: gnu: multipath-tools: Enable tests.
Date: Sat, 16 May 2020 14:57:28 -0400

This is an automated email from the git hooks/post-receive script.

mbakke pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new a43fe7a  gnu: multipath-tools: Enable tests.
a43fe7a is described below

commit a43fe7acd1bbe9dd5118d7bff823f4730153cc48
Author: Marius Bakke <address@hidden>
AuthorDate: Sat May 16 20:56:20 2020 +0200

    gnu: multipath-tools: Enable tests.
    
    * gnu/packages/linux.scm (multipath-tools)[arguments]: Remove #:tests?.  Add
     #:test-target.  Add phase to add missing linker flag.
    [native-inputs]: Add CMOCKA.
---
 gnu/packages/linux.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 2d8acea..aa52068 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4205,7 +4205,7 @@ arrays when needed.")
                   #t))))
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f                      ; no tests
+     '(#:test-target "test"
        #:parallel-build? #f             ;XXX: broken in 0.8.4
        #:make-flags (list "CC=gcc"
                           (string-append "DESTDIR="
@@ -4242,11 +4242,22 @@ arrays when needed.")
                (("bool is_queueing;")
                 "bool is_queueing = false;"))
              #t))
+         (add-after 'unpack 'fix-linking-tests
+           (lambda _
+             ;; Add missing linker flag for -lmpathcmd.  This should be fixed
+             ;; for versions > 0.8.4.
+             (substitute* "tests/Makefile"
+               (("-lmultipath -lcmocka")
+                "-lmultipath -L$(mpathcmddir) -lmpathcmd -lcmocka"))
+             #t))
          (delete 'configure))))         ; no configure script
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)
-       ("valgrind" ,valgrind)))
+       ("valgrind" ,valgrind)
+
+       ;; For tests.
+       ("cmocka" ,cmocka)))
     (inputs
      `(("json-c" ,json-c)
        ("libaio" ,libaio)



reply via email to

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