guix-commits
[Top][All Lists]
Advanced

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

03/03: gnu: i2pd: Allow skipping tests.


From: guix-commits
Subject: 03/03: gnu: i2pd: Allow skipping tests.
Date: Tue, 25 May 2021 02:08:18 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit a0b31909f482c7a3d1ee8f7f1a3595a33db38a92
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue May 25 09:06:51 2021 +0300

    gnu: i2pd: Allow skipping tests.
    
    * gnu/packages/i2p.scm (i2pd)[arguments]: Adjust custom 'check phase to
    honor --without-tests flag.
---
 gnu/packages/i2p.scm | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/i2p.scm b/gnu/packages/i2p.scm
index 4da5808..1a9958c 100644
--- a/gnu/packages/i2p.scm
+++ b/gnu/packages/i2p.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
+;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -61,21 +62,23 @@
        (modify-phases %standard-phases
          (replace 'check
            (lambda* (#:key
+                     tests?
                      (make-flags '())
                      (parallel-tests? #t)
                      #:allow-other-keys)
              (let ((source (assoc-ref %build-inputs "source")))
-               (copy-recursively (string-append source "/tests")
-                                 "./tests")
-               (with-directory-excursion "tests"
-                 (substitute* "Makefile"
-                   (("../libi2pd/") (string-append source "/libi2pd/")))
-                 (apply invoke "make" "all"
-                        `(,@(if parallel-tests?
-                              `("-j" ,(number->string
-                                        (parallel-job-count)))
-                              '())
-                           ,@make-flags)))))))))
+               (when tests?
+                 (copy-recursively (string-append source "/tests")
+                                   "./tests")
+                 (with-directory-excursion "tests"
+                   (substitute* "Makefile"
+                     (("../libi2pd/") (string-append source "/libi2pd/")))
+                   (apply invoke "make" "all"
+                          `(,@(if parallel-tests?
+                                `("-j" ,(number->string
+                                          (parallel-job-count)))
+                                '())
+                             ,@make-flags))))))))))
     (home-page "https://i2pd.website/";)
     (synopsis "Router for an end-to-end encrypted and anonymous internet")
     (description "i2pd is a client for the anonymous I2P network, upon which



reply via email to

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