summaryrefslogtreecommitdiff
path: root/tests/pack.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pack.scm')
-rw-r--r--tests/pack.scm27
1 files changed, 22 insertions, 5 deletions
diff --git a/tests/pack.scm b/tests/pack.scm
index 9473d4f384..e9b4c36e0e 100644
--- a/tests/pack.scm
+++ b/tests/pack.scm
@@ -277,17 +277,25 @@
(built-derivations (list check))))
(unless store (test-skip 1))
- (test-assertm "deb archive with symlinks" store
+ (test-assertm "deb archive with symlinks and control files" store
(mlet* %store-monad
((guile (set-guile-for-build (default-guile)))
(profile (profile-derivation (packages->manifest
(list %bootstrap-guile))
#:hooks '()
#:locales? #f))
- (deb (debian-archive "deb-pack" profile
- #:compressor %gzip-compressor
- #:symlinks '(("/opt/gnu/bin" -> "bin"))
- #:archiver %tar-bootstrap))
+ (deb (debian-archive
+ "deb-pack" profile
+ #:compressor %gzip-compressor
+ #:symlinks '(("/opt/gnu/bin" -> "bin"))
+ #:archiver %tar-bootstrap
+ #:extra-options
+ (list #:triggers-file
+ (plain-file "triggers"
+ "activate-noawait /usr/share/icons/hicolor\n")
+ #:postinst-file
+ (plain-file "postinst"
+ "echo running configure script\n"))))
(check
(gexp->derivation "check-deb-pack"
(with-imported-modules '((guix build utils))
@@ -344,6 +352,15 @@
(unless (null? hard-links)
(error "hard links found in data.tar.gz" hard-links))
+ ;; Verify the presence of the control files.
+ (invoke "tar" "-xf" "control.tar.gz")
+ (assert (file-exists? "control"))
+ (assert (and (file-exists? "postinst")
+ (= #o111 ;script is executable
+ (logand #o111 (stat:perms
+ (stat "postinst"))))))
+ (assert (file-exists? "triggers"))
+
(mkdir #$output))))))
(built-derivations (list check)))))