1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10:33 +02:00

pack: Add test for 'self-contained-tarball' with localstatedir.

* tests/pack.scm ("self-contained-tarball + localstatedir"): New test.
This commit is contained in:
Ludovic Courtès
2018-11-04 17:34:16 +01:00
parent 598a6b87cc
commit 1ff53787db

View File

@@ -89,6 +89,29 @@
;; quite inexpensively; see <https://bugs.gnu.org/32184>.
(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