tests: Strengthen GC root test.

* gnu/tests/base.scm (run-basic-test)["/run/current-system is a GC
root"]: Check for a specific return value, 'success!.
This commit is contained in:
Ludovic Courtès 2017-05-12 22:05:23 +02:00
parent 2088513214
commit d5094c8115
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -296,7 +296,8 @@ (define (entry->list entry)
(setlocale LC_ALL before)) (setlocale LC_ALL before))
marionette)) marionette))
(test-assert "/run/current-system is a GC root" (test-eq "/run/current-system is a GC root"
'success!
(marionette-eval '(begin (marionette-eval '(begin
;; Make sure the (guix …) modules are found. ;; Make sure the (guix …) modules are found.
(eval-when (expand load eval) (eval-when (expand load eval)
@ -317,7 +318,8 @@ (define (entry->list entry)
(let ((system (readlink "/run/current-system"))) (let ((system (readlink "/run/current-system")))
(guard (c ((nix-protocol-error? c) (guard (c ((nix-protocol-error? c)
(file-exists? system))) (and (file-exists? system)
'success!)))
(with-store store (with-store store
(delete-paths store (list system)) (delete-paths store (list system))
#f)))) #f))))