guix-commits
[Top][All Lists]
Advanced

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

05/06: gnu: onionshare: Run tests conditionally.


From: guix-commits
Subject: 05/06: gnu: onionshare: Run tests conditionally.
Date: Fri, 19 Nov 2021 04:11:35 -0500 (EST)

rekado pushed a commit to branch core-updates-frozen
in repository guix.

commit 7eb9b6ed6cf72c681a0d1816cc9fa63a38259319
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Fri Nov 19 09:32:01 2021 +0100

    gnu: onionshare: Run tests conditionally.
    
    * gnu/packages/tor.scm (onionshare)[arguments]: Respect TESTS?.
---
 gnu/packages/tor.scm | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index 3fb84cd..8608d00 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -339,18 +339,19 @@ OnionShare.")
                              (display line out)
                              (loop))))))))))
          (replace 'check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             ;; Some tests need a writable homedir:
-             (setenv "HOME" "/tmp")
-             ;; Ensure installed modules can be found:
-             (add-installed-pythonpath inputs outputs)
-             ;; Avoid `getprotobyname` issues:
-             (setenv "EVENTLET_NO_GREENDNS" "yes")
-             ;; Make Qt render "offscreen":
-             (setenv "QT_QPA_PLATFORM" "offscreen")
-             ;; Must be run from "desktop" dir:
-             (chdir "..")
-             (invoke "./tests/run.sh")))
+           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+             (when tests?
+               ;; Some tests need a writable homedir:
+               (setenv "HOME" "/tmp")
+               ;; Ensure installed modules can be found:
+               (add-installed-pythonpath inputs outputs)
+               ;; Avoid `getprotobyname` issues:
+               (setenv "EVENTLET_NO_GREENDNS" "yes")
+               ;; Make Qt render "offscreen":
+               (setenv "QT_QPA_PLATFORM" "offscreen")
+               ;; Must be run from "desktop" dir:
+               (with-directory-excursion ".."
+                 (invoke "./tests/run.sh")))))
          (add-after 'install 'install-data
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))



reply via email to

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