summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-05-25 09:06:51 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-05-25 09:07:53 +0300
commita0b31909f482c7a3d1ee8f7f1a3595a33db38a92 (patch)
treef278193608d87273a2de64559f11e4d410ab3970
parente52c64cb04f1cf52611b2f8fd2660675a6829db4 (diff)
downloadguix-a0b31909f482c7a3d1ee8f7f1a3595a33db38a92.tar.gz
gnu: i2pd: Allow skipping tests.
* gnu/packages/i2p.scm (i2pd)[arguments]: Adjust custom 'check phase to
honor --without-tests flag.
-rw-r--r--gnu/packages/i2p.scm25
1 files changed, 14 insertions, 11 deletions
diff --git a/gnu/packages/i2p.scm b/gnu/packages/i2p.scm
index 4da58087e7..1a9958c8d0 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