mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
ui: Gracefully deal with zero-output derivations.
* guix/ui.scm (show-what-to-build)[built-or-substitutable?]: New
procedure. Check whether OUT is #f.
Use it.
* tests/ui.scm ("show-what-to-build, zero outputs"): New test.
This commit is contained in:
12
tests/ui.scm
12
tests/ui.scm
@@ -19,6 +19,8 @@
|
||||
|
||||
(define-module (test-ui)
|
||||
#:use-module (guix ui)
|
||||
#:use-module (guix store)
|
||||
#:use-module (guix derivations)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-19)
|
||||
#:use-module (srfi srfi-64))
|
||||
@@ -189,6 +191,16 @@ interface, and powerful string processing.")
|
||||
(lambda args
|
||||
#t)))
|
||||
|
||||
(test-equal "show-what-to-build, zero outputs"
|
||||
""
|
||||
(with-store store
|
||||
(let ((drv (derivation store "zero" "/bin/sh" '()
|
||||
#:outputs '())))
|
||||
(with-error-to-string
|
||||
(lambda ()
|
||||
;; This should print nothing.
|
||||
(show-what-to-build store (list drv)))))))
|
||||
|
||||
(test-end "ui")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user