From a0b31909f482c7a3d1ee8f7f1a3595a33db38a92 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 25 May 2021 09:06:51 +0300 Subject: 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(-) (limited to 'gnu') 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 ;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; Copyright © 2021 Solene Rapenne +;;; Copyright © 2021 Efraim Flashner ;;; ;;; 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 -- cgit v1.2.3