me
/
guix
Archived
1
0
Fork 0

gnu: onionshare: Run tests conditionally.

* gnu/packages/tor.scm (onionshare)[arguments]: Respect TESTS?.
master
Ricardo Wurmus 2021-11-19 09:32:01 +01:00
parent cab90f0832
commit 7eb9b6ed6c
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 13 additions and 12 deletions

View File

@ -339,7 +339,8 @@ OnionShare.")
(display line out) (display line out)
(loop)))))))))) (loop))))))))))
(replace 'check (replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key tests? inputs outputs #:allow-other-keys)
(when tests?
;; Some tests need a writable homedir: ;; Some tests need a writable homedir:
(setenv "HOME" "/tmp") (setenv "HOME" "/tmp")
;; Ensure installed modules can be found: ;; Ensure installed modules can be found:
@ -349,8 +350,8 @@ OnionShare.")
;; Make Qt render "offscreen": ;; Make Qt render "offscreen":
(setenv "QT_QPA_PLATFORM" "offscreen") (setenv "QT_QPA_PLATFORM" "offscreen")
;; Must be run from "desktop" dir: ;; Must be run from "desktop" dir:
(chdir "..") (with-directory-excursion ".."
(invoke "./tests/run.sh"))) (invoke "./tests/run.sh")))))
(add-after 'install 'install-data (add-after 'install 'install-data
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))