guix-commits
[Top][All Lists]
Advanced

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

03/03: size: Add test to multiple 'store-profile' arguments.


From: Ludovic Courtès
Subject: 03/03: size: Add test to multiple 'store-profile' arguments.
Date: Thu, 6 Apr 2017 18:17:22 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit c923f831160ddbda21d8ea1f2df4670550f3e9d8
Author: Ludovic Courtès <address@hidden>
Date:   Thu Apr 6 18:22:53 2017 +0200

    size: Add test to multiple 'store-profile' arguments.
    
    * tests/size.scm ("store-profile with multiple items"): New test.
---
 tests/size.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/tests/size.scm b/tests/size.scm
index 068ebc1..575b1ab 100644
--- a/tests/size.scm
+++ b/tests/size.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016 Ludovic Courtès <address@hidden>
+;;; Copyright © 2015, 2016, 2017 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -86,6 +86,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:



reply via email to

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