summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-04 17:34:16 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-06 23:21:24 +0100
commit1ff53787dbd4b1846ae523aef86ada3996de5e6d (patch)
tree7194c3a2f0aefaf9a50e28dde034532f6affb2f5
parent598a6b87cc6636aee9dec57ae95922da0a6e31e8 (diff)
downloadguix-1ff53787dbd4b1846ae523aef86ada3996de5e6d.tar.gz
pack: Add test for 'self-contained-tarball' with localstatedir.
* tests/pack.scm ("self-contained-tarball + localstatedir"): New test.
-rw-r--r--tests/pack.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/pack.scm b/tests/pack.scm
index 0c9e4ffa7f..a9bc8948b9 100644
--- a/tests/pack.scm
+++ b/tests/pack.scm
@@ -90,6 +90,29 @@
 
 (with-external-store store
   (unless store (test-skip 1))
+  (test-assertm "self-contained-tarball + localstatedir" store
+    (mlet* %store-monad
+        ((guile   (set-guile-for-build (default-guile)))
+         (profile (profile-derivation (packages->manifest
+                                       (list %bootstrap-guile))
+                                      #:hooks '()
+                                      #:locales? #f))
+         (tarball (self-contained-tarball "tar-pack" profile
+                                          #:localstatedir? #t))
+         (check   (gexp->derivation
+                   "check-tarball"
+                   #~(let ((bin (string-append "." #$profile "/bin")))
+                       (setenv "PATH"
+                               (string-append #$%tar-bootstrap "/bin"))
+                       (system* "tar" "xvf" #$tarball)
+                       (mkdir #$output)
+                       (exit
+                        (and (file-exists? "var/guix/db/db.sqlite")
+                             (string=? (string-append #$%bootstrap-guile "/bin")
+                                       (readlink bin))))))))
+      (built-derivations (list check))))
+
+  (unless store (test-skip 1))
   (test-assertm "docker-image + localstatedir" store
     (mlet* %store-monad
         ((guile   (set-guile-for-build (default-guile)))