summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/crate.scm77
-rw-r--r--tests/elm.scm6
-rw-r--r--tests/gexp.scm27
-rw-r--r--tests/print.scm7
4 files changed, 85 insertions, 32 deletions
diff --git a/tests/crate.scm b/tests/crate.scm
index 63643c2728..5b4ad08c3c 100644
--- a/tests/crate.scm
+++ b/tests/crate.scm
@@ -3,7 +3,6 @@
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
-;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2023 David Elsing <david.elsing@posteo.net>
;;;
@@ -501,7 +500,7 @@
('quasiquote
(#:skip-build? #t
#:cargo-inputs
- ('unquote (list rust-leaf-alice-0.7)))))
+ (("rust-leaf-alice" ('unquote 'rust-leaf-alice-0.7))))))
(home-page "http://example.com")
(synopsis "summary")
(description "This package provides summary.")
@@ -607,7 +606,7 @@
(string-append name "-" version ".tar.gz"))
(sha256
(base32
- (? string? hash)))))
+ (? string? hash)))))
(build-system cargo-build-system)
(arguments ('quasiquote (#:skip-build? #t)))
(home-page "http://example.com")
@@ -650,7 +649,8 @@
(arguments
('quasiquote (#:skip-build? #t
#:cargo-inputs
- ('unquote (list rust-leaf-bob-3)))))
+ (("rust-leaf-bob"
+ ('unquote rust-leaf-bob-3))))))
(home-page "http://example.com")
(synopsis "summary")
(description "This package provides summary.")
@@ -672,9 +672,12 @@
(arguments
('quasiquote (#:skip-build? #t
#:cargo-inputs
- ('unquote (list rust-intermediate-b-1
- rust-leaf-alice-0.7
- rust-leaf-bob-3)))))
+ (("rust-intermediate-b"
+ ('unquote rust-intermediate-b-1))
+ ("rust-leaf-alice"
+ ('unquote 'rust-leaf-alice-0.7))
+ ("rust-leaf-bob"
+ ('unquote rust-leaf-bob-3))))))
(home-page "http://example.com")
(synopsis "summary")
(description "This package provides summary.")
@@ -695,12 +698,17 @@
(build-system cargo-build-system)
(arguments
('quasiquote (#:cargo-inputs
- ('unquote (list rust-intermediate-a-1
- rust-intermediate-b-1
- rust-leaf-alice-0.7
- rust-leaf-bob-3))
+ (("rust-intermediate-a"
+ ('unquote rust-intermediate-a-1))
+ ("rust-intermediate-b"
+ ('unquote rust-intermediate-b-1))
+ ("rust-leaf-alice"
+ ('unquote 'rust-leaf-alice-0.7))
+ ("rust-leaf-bob"
+ ('unquote rust-leaf-bob-3)))
#:cargo-development-inputs
- ('unquote (list rust-intermediate-c-1)))))
+ (("rust-intermediate-c"
+ ('unquote rust-intermediate-c-1))))))
(home-page "http://example.com")
(synopsis "summary")
(description "This package provides summary.")
@@ -728,7 +736,8 @@
(build-system cargo-build-system)
(arguments
('quasiquote (#:cargo-development-inputs
- ('unquote (list rust-leaf-alice-0.7)))))
+ (("rust-leaf-alice"
+ ('unquote rust-leaf-alice-0.7))))))
(home-page "http://example.com")
(synopsis "summary")
(description "This package provides summary.")
@@ -807,9 +816,12 @@
(build-system cargo-build-system)
(arguments
('quasiquote (#:cargo-inputs
- ('unquote (list rust-intermediate-b-1
- rust-leaf-alice-0.7
- rust-leaf-bob-3)))))
+ (("rust-intermediate-b"
+ ('unquote rust-intermediate-b-1))
+ ("rust-leaf-alice"
+ ('unquote 'rust-leaf-alice-0.7))
+ ("rust-leaf-bob"
+ ('unquote rust-leaf-bob-3))))))
(home-page "http://example.com")
(synopsis "summary")
(description "This package provides summary.")
@@ -830,12 +842,17 @@
(build-system cargo-build-system)
(arguments
('quasiquote (#:cargo-inputs
- ('unquote (list rust-intermediate-a-1
- rust-intermediate-b-1
- rust-leaf-alice-0.7
- rust-leaf-bob-3))
+ (("rust-intermediate-a"
+ ('unquote rust-intermediate-a-1))
+ ("rust-intermediate-b"
+ ('unquote rust-intermediate-b-1))
+ ("rust-leaf-alice"
+ ('unquote 'rust-leaf-alice-0.7))
+ ("rust-leaf-bob"
+ ('unquote rust-leaf-bob-3)))
#:cargo-development-inputs
- ('unquote (list rust-intermediate-c-1)))))
+ (("rust-intermediate-c"
+ ('unquote rust-intermediate-c-1))))))
(home-page "http://example.com")
(synopsis "summary")
(description "This package provides summary.")
@@ -946,10 +963,13 @@
(build-system cargo-build-system)
(arguments
('quasiquote (#:cargo-inputs
- ('unquote (list rust-leaf-bob-3))
+ (("rust-leaf-bob"
+ ('unquote 'rust-leaf-bob-3)))
#:cargo-development-inputs
- ('unquote (list rust-leaf-bob-3.0.2-yanked
- rust-leaf-bob-4.0.0-yanked)))))
+ (("rust-leaf-bob"
+ ('unquote 'rust-leaf-bob-3.0.2-yanked))
+ ("rust-leaf-bob"
+ ('unquote 'rust-leaf-bob-4.0.0-yanked))))))
(home-page "http://example.com")
(synopsis "summary")
(description "This package provides summary.")
@@ -1074,10 +1094,13 @@
(build-system cargo-build-system)
(arguments
('quasiquote (#:cargo-inputs
- ('unquote (list rust-leaf-bob-3))
+ (("rust-leaf-bob"
+ ('unquote 'rust-leaf-bob-3)))
#:cargo-development-inputs
- ('unquote (list rust-leaf-bob-3.0.2-yanked
- rust-leaf-bob-4.0.0-yanked)))))
+ (("rust-leaf-bob"
+ ('unquote 'rust-leaf-bob-3.0.2-yanked))
+ ("rust-leaf-bob"
+ ('unquote 'rust-leaf-bob-4.0.0-yanked))))))
(home-page "http://example.com")
(synopsis "summary")
(description "This package provides summary.")
diff --git a/tests/elm.scm b/tests/elm.scm
index 48d3eb4b01..279a66a25f 100644
--- a/tests/elm.scm
+++ b/tests/elm.scm
@@ -249,10 +249,8 @@ package definition."
version
(base32 ,(? string? hash))))
(build-system elm-build-system)
- (propagated-inputs
- ,'`(("elm-core" ,elm-core)))
- (inputs
- ,'`(("elm-json" ,elm-json)))
+ (propagated-inputs (list elm-core))
+ (inputs (list elm-json))
(home-page
"https://package.elm-lang.org/packages/elm-guix/demo/3.0.0")
(synopsis "A test for `(guix import elm)`")
diff --git a/tests/gexp.scm b/tests/gexp.scm
index ab99e19daa..e066076c5c 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -944,6 +944,33 @@
(and (file=? (string-append dir "/a/b/c") q-scm* stat)
(file=? (string-append dir "/p/q") plain* stat)))))))
+(test-assert "imported-files does not create symlinks"
+ ;; 'imported-files' should always produce a directory with regular files,
+ ;; whether or not it's going through 'imported-files/derivation'.
+ ;; See <https://issues.guix.gnu.org/73275>.
+ (call-with-temporary-directory
+ (lambda (directory)
+ (symlink (search-path %load-path "guix/store.scm")
+ (in-vicinity directory "store.scm"))
+
+ (run-with-store %store
+ (mlet* %store-monad
+ ((files1 -> `(("x" . ,(in-vicinity directory "store.scm"))))
+ (files2 -> `(,@files1
+ ("y" . ,(plain-file "foo.scm" "#t"))))
+ (import1 (imported-files files1))
+ (import2-drv (imported-files files2))
+ (import2 -> (derivation->output-path import2-drv))
+ (_ (built-derivations (list import2-drv))))
+ (return (and (eq? (stat:type (lstat (in-vicinity import1 "x")))
+ 'regular)
+ (eq? (stat:type (lstat (in-vicinity import2 "x")))
+ 'regular)
+ (file=? (in-vicinity import1 "x")
+ (search-path %load-path "guix/store.scm"))
+ (file=? (in-vicinity import2 "x")
+ (search-path %load-path "guix/store.scm")))))))))
+
(test-equal "gexp-modules & ungexp"
'((bar) (foo))
((@@ (guix gexp) gexp-modules)
diff --git a/tests/print.scm b/tests/print.scm
index b4f193b905..f068d380b7 100644
--- a/tests/print.scm
+++ b/tests/print.scm
@@ -61,8 +61,13 @@
(base32
"070pwb7brdcn1mfvplkd56vjc7lbz4iznzkqvfsakvgbv68k71ah"))))
(build-system (@ (guix build-system gnu) gnu-build-system))
+
+ ;; Note: For this test, pick variables that do not have aliases; otherwise
+ ;; 'package->code' might pick one of the other variable names in a
+ ;; non-deterministic fashion.
(inputs (list (@ (gnu packages base) coreutils)
- `(,(@ (gnu packages base) glibc) "debug")))
+ `(,(@ (gnu packages base) gnu-make) "debug")))
+
(home-page "http://gnu.org")
(synopsis "Dummy")
(description "This is a dummy package.")