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
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -89,6 +89,29 @@ (define %tar-bootstrap %bootstrap-coreutils&co)
;; 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