guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: i2pd: Rewrite 'check phase using with-directory-excursion.


From: guix-commits
Subject: 01/01: gnu: i2pd: Rewrite 'check phase using with-directory-excursion.
Date: Thu, 18 Jul 2019 11:53:13 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 262f904ebd2087a2f285b1c381ac32195c832c9e
Author: Efraim Flashner <address@hidden>
Date:   Thu Jul 18 18:52:43 2019 +0300

    gnu: i2pd: Rewrite 'check phase using with-directory-excursion.
    
    * gnu/packages/i2p.scm (i2pd)[arguments]: In custom 'check phase use
    with-directory-excursion to change directory.
---
 gnu/packages/i2p.scm | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/i2p.scm b/gnu/packages/i2p.scm
index 0f6aa21..075f1f4 100644
--- a/gnu/packages/i2p.scm
+++ b/gnu/packages/i2p.scm
@@ -63,20 +63,18 @@
                                (make-flags '())
                                (parallel-tests? #t)
                                #:allow-other-keys)
-                       (let ((oldpwd (getcwd))
-                             (source (assoc-ref %build-inputs "source")))
+                       (let ((source (assoc-ref %build-inputs "source")))
                          (copy-recursively (string-append source "/tests")
                                            "./tests")
-                         (chdir "./tests")
-                         (substitute* "Makefile"
-                           (("../libi2pd/") (string-append source 
"/libi2pd/")))
-                         (apply invoke "make" "all"
-                                `(,@(if parallel-tests?
-                                        `("-j" ,(number->string
-                                                 (parallel-job-count)))
-                                        '())
-                                  ,@make-flags))
-                         (chdir oldpwd))))
+                         (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))))))
                    (add-after 'install 'install-headers
                      (lambda* (#:key outputs #:allow-other-keys)
                        (let* ((install-dir (assoc-ref outputs "out"))



reply via email to

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