civodul pushed a commit to branch master
in repository guix.
commit 1ff53787dbd4b1846ae523aef86ada3996de5e6d
Author: Ludovic Courtès <[email protected]>
Date: Sun Nov 4 17:34:16 2018 +0100
pack: Add test for 'self-contained-tarball' with localstatedir.
* tests/pack.scm ("self-contained-tarball + localstatedir"): New test.
---
tests/pack.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/tests/pack.scm b/tests/pack.scm
index 0c9e4ff..a9bc894 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)))