X-Git-Url: http://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/933d2fe4cfb380f66af631a2203ec23c367e5b1a..9c313889f10b8f877fbf12a743a940e825c27ffe:/tests/size.scm diff --git a/tests/size.scm b/tests/size.scm index fcd590283d..0aaa8fbc29 100644 --- a/tests/size.scm +++ b/tests/size.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015 Ludovic Courtès +;;; Copyright © 2015, 2016, 2017 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,14 +30,6 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-64)) -(define %store - (open-connection-for-tests)) - -(define-syntax-rule (test-assertm name exp) - (test-assert name - (run-with-store %store exp - #:guile-for-build (%guile-for-build)))) - (test-begin "size") @@ -54,7 +46,7 @@ (mbegin %store-monad (built-derivations (list file2)) (mlet %store-monad ((profiles (store-profile - (derivation->output-path file2))) + (list (derivation->output-path file2)))) (bash (interned-file (search-bootstrap-binary "bash" (%current-system)) "bash" @@ -86,6 +78,22 @@ (profile-self-size profile3) (profile-self-size profile4)))))))))))) +(test-assertm "store-profile with multiple items" + (mlet* %store-monad ((file1 (gexp->derivation "file1" + #~(symlink #$%bootstrap-guile + #$output))) + (file2 (text-file* "file2" + "the file => " file1))) + (mbegin %store-monad + (built-derivations (list file2)) + (mlet %store-monad ((profiles (store-profile + (list (derivation->output-path file2) + (derivation->output-path file1)))) + (reference (store-profile + (list (derivation->output-path file2))))) + (return (and (= (length profiles) 4) + (lset= equal? profiles reference))))))) + (test-end "size") ;;; Local Variables: