summaryrefslogtreecommitdiff
path: root/tests/gexp.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2024-09-15 21:55:45 +0200
committerLudovic Courtès <ludo@gnu.org>2024-09-16 00:16:20 +0200
commita7bb45b39d7d698e0868c2b3ac9097b70ef9d401 (patch)
treeb3b73bd68795a8acfa99e43f47b198af366191cf /tests/gexp.scm
parentaec4c70a4d59995011886d0e865b6584c71ad068 (diff)
gexp: ‘imported-files’ does not create symlinks.
Fixes <https://issues.guix.gnu.org/73275>. This is presumably what e529d46828c359b449fc570bdc293fc12534647c meant to do, except that it wrongfully pass #:symlink? a true value instead, most likely due to a typo. * guix/gexp.scm (imported-files): Pass #:symlink? #f. * tests/gexp.scm ("imported-files does not create symlinks"): New test. Change-Id: Ic31be56a2adf4dfa55e1ec390c53cc9ba5f8a96c
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r--tests/gexp.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index ab99e19daa2..e066076c5c0 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -944,6 +944,33 @@
944 (and (file=? (string-append dir "/a/b/c") q-scm* stat) 944 (and (file=? (string-append dir "/a/b/c") q-scm* stat)
945 (file=? (string-append dir "/p/q") plain* stat))))))) 945 (file=? (string-append dir "/p/q") plain* stat)))))))
946 946
947(test-assert "imported-files does not create symlinks"
948 ;; 'imported-files' should always produce a directory with regular files,
949 ;; whether or not it's going through 'imported-files/derivation'.
950 ;; See <https://issues.guix.gnu.org/73275>.
951 (call-with-temporary-directory
952 (lambda (directory)
953 (symlink (search-path %load-path "guix/store.scm")
954 (in-vicinity directory "store.scm"))
955
956 (run-with-store %store
957 (mlet* %store-monad
958 ((files1 -> `(("x" . ,(in-vicinity directory "store.scm"))))
959 (files2 -> `(,@files1
960 ("y" . ,(plain-file "foo.scm" "#t"))))
961 (import1 (imported-files files1))
962 (import2-drv (imported-files files2))
963 (import2 -> (derivation->output-path import2-drv))
964 (_ (built-derivations (list import2-drv))))
965 (return (and (eq? (stat:type (lstat (in-vicinity import1 "x")))
966 'regular)
967 (eq? (stat:type (lstat (in-vicinity import2 "x")))
968 'regular)
969 (file=? (in-vicinity import1 "x")
970 (search-path %load-path "guix/store.scm"))
971 (file=? (in-vicinity import2 "x")
972 (search-path %load-path "guix/store.scm")))))))))
973
947(test-equal "gexp-modules & ungexp" 974(test-equal "gexp-modules & ungexp"
948 '((bar) (foo)) 975 '((bar) (foo))
949 ((@@ (guix gexp) gexp-modules) 976 ((@@ (guix gexp) gexp-modules)