diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/build-utils.scm | 12 | ||||
-rw-r--r-- | tests/crate.scm | 77 | ||||
-rw-r--r-- | tests/go.scm | 2 | ||||
-rw-r--r-- | tests/modules.scm | 8 | ||||
-rw-r--r-- | tests/profiles.scm | 7 |
5 files changed, 39 insertions, 67 deletions
diff --git a/tests/build-utils.scm b/tests/build-utils.scm index 7f4f12ccc7..3babf5d544 100644 --- a/tests/build-utils.scm +++ b/tests/build-utils.scm @@ -41,17 +41,17 @@ '((a . 1) (x . 42) (b . 2) (c . 3)) (alist-cons-before 'b 'x 42 '((a . 1) (b . 2) (c . 3)))) -(test-equal "alist-cons-before, reference not found" - '((a . 1) (b . 2) (c . 3) (x . 42)) - (alist-cons-before 'z 'x 42 '((a . 1) (b . 2) (c . 3)))) +(test-assert "alist-cons-before, reference not found" + (not (false-if-exception + (alist-cons-before 'z 'x 42 '((a . 1) (b . 2) (c . 3)))))) (test-equal "alist-cons-after" '((a . 1) (b . 2) (x . 42) (c . 3)) (alist-cons-after 'b 'x 42 '((a . 1) (b . 2) (c . 3)))) -(test-equal "alist-cons-after, reference not found" - '((a . 1) (b . 2) (c . 3) (x . 42)) - (alist-cons-after 'z 'x 42 '((a . 1) (b . 2) (c . 3)))) +(test-assert "alist-cons-after, reference not found" + (not (false-if-exception + (alist-cons-after 'z 'x 42 '((a . 1) (b . 2) (c . 3)))))) (test-equal "alist-replace" '((a . 1) (b . 77) (c . 3)) diff --git a/tests/crate.scm b/tests/crate.scm index ce2f08aade..fd2ada103e 100644 --- a/tests/crate.scm +++ b/tests/crate.scm @@ -3,6 +3,7 @@ ;;; 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> ;;; @@ -500,7 +501,7 @@ ('quasiquote (#:skip-build? #t #:cargo-inputs - (("rust-leaf-alice" ('unquote 'rust-leaf-alice-0.7)))))) + ('unquote (list rust-leaf-alice-0.7))))) (home-page "http://example.com") (synopsis "summary") (description "summary") @@ -606,7 +607,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") @@ -649,8 +650,7 @@ (arguments ('quasiquote (#:skip-build? #t #:cargo-inputs - (("rust-leaf-bob" - ('unquote rust-leaf-bob-3)))))) + ('unquote (list rust-leaf-bob-3))))) (home-page "http://example.com") (synopsis "summary") (description "summary") @@ -672,12 +672,9 @@ (arguments ('quasiquote (#:skip-build? #t #:cargo-inputs - (("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)))))) + ('unquote (list rust-intermediate-b-1 + rust-leaf-alice-0.7 + rust-leaf-bob-3))))) (home-page "http://example.com") (synopsis "summary") (description "summary") @@ -698,17 +695,12 @@ (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-inputs - (("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))) + ('unquote (list rust-intermediate-a-1 + rust-intermediate-b-1 + rust-leaf-alice-0.7 + rust-leaf-bob-3)) #:cargo-development-inputs - (("rust-intermediate-c" - ('unquote rust-intermediate-c-1)))))) + ('unquote (list rust-intermediate-c-1))))) (home-page "http://example.com") (synopsis "summary") (description "summary") @@ -736,8 +728,7 @@ (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-development-inputs - (("rust-leaf-alice" - ('unquote rust-leaf-alice-0.7)))))) + ('unquote (list rust-leaf-alice-0.7))))) (home-page "http://example.com") (synopsis "summary") (description "summary") @@ -816,12 +807,9 @@ (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-inputs - (("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)))))) + ('unquote (list rust-intermediate-b-1 + rust-leaf-alice-0.7 + rust-leaf-bob-3))))) (home-page "http://example.com") (synopsis "summary") (description "summary") @@ -842,17 +830,12 @@ (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-inputs - (("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))) + ('unquote (list rust-intermediate-a-1 + rust-intermediate-b-1 + rust-leaf-alice-0.7 + rust-leaf-bob-3)) #:cargo-development-inputs - (("rust-intermediate-c" - ('unquote rust-intermediate-c-1)))))) + ('unquote (list rust-intermediate-c-1))))) (home-page "http://example.com") (synopsis "summary") (description "summary") @@ -963,13 +946,10 @@ (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-inputs - (("rust-leaf-bob" - ('unquote 'rust-leaf-bob-3))) + ('unquote (list rust-leaf-bob-3)) #:cargo-development-inputs - (("rust-leaf-bob" - ('unquote 'rust-leaf-bob-3.0.2-yanked)) - ("rust-leaf-bob" - ('unquote 'rust-leaf-bob-4.0.0-yanked)))))) + ('unquote (list rust-leaf-bob-3.0.2-yanked + rust-leaf-bob-4.0.0-yanked))))) (home-page "http://example.com") (synopsis "summary") (description "summary") @@ -1094,13 +1074,10 @@ (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-inputs - (("rust-leaf-bob" - ('unquote 'rust-leaf-bob-3))) + ('unquote (list rust-leaf-bob-3)) #:cargo-development-inputs - (("rust-leaf-bob" - ('unquote 'rust-leaf-bob-3.0.2-yanked)) - ("rust-leaf-bob" - ('unquote 'rust-leaf-bob-4.0.0-yanked)))))) + ('unquote (list rust-leaf-bob-3.0.2-yanked + rust-leaf-bob-4.0.0-yanked))))) (home-page "http://example.com") (synopsis "summary") (description "summary") diff --git a/tests/go.scm b/tests/go.scm index d2e8846b30..f925c485c1 100644 --- a/tests/go.scm +++ b/tests/go.scm @@ -389,7 +389,7 @@ require github.com/kr/pretty v0.2.1 (arguments (list #:import-path "github.com/go-check/check")) (propagated-inputs - `(("go-github-com-kr-pretty" ,go-github-com-kr-pretty))) + (list go-github-com-kr-pretty)) (home-page "https://github.com/go-check/check") (synopsis "Instructions") (description "Package check is a rich testing extension for Go's testing \ diff --git a/tests/modules.scm b/tests/modules.scm index e70d2d9e08..904f91e365 100644 --- a/tests/modules.scm +++ b/tests/modules.scm @@ -18,7 +18,7 @@ (define-module (test-modules) #:use-module (guix modules) - #:use-module ((guix build-system gnu) #:select (%gnu-build-system-modules)) + #:use-module ((guix build-system gnu) #:select (%default-gnu-imported-modules)) #:use-module ((guix utils) #:select (call-with-temporary-directory)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-34) @@ -30,9 +30,9 @@ (lset= equal? (live-module-closure '((guix build gnu-build-system))) (source-module-closure '((guix build gnu-build-system))) - %gnu-build-system-modules - (source-module-closure %gnu-build-system-modules) - (live-module-closure %gnu-build-system-modules))) + %default-gnu-imported-modules + (source-module-closure %default-gnu-imported-modules) + (live-module-closure %default-gnu-imported-modules))) (test-assert "closure of (gnu build install)" (lset= equal? diff --git a/tests/profiles.scm b/tests/profiles.scm index ddd6d74f3b..e448137cff 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -463,7 +463,6 @@ (target -> "arm-linux-gnueabihf") (grep (package->cross-derivation packages:grep target)) (sed (package->cross-derivation packages:sed target)) - (locales (package->derivation (packages:libc-utf8-locales-for-target))) (drv (profile-derivation manifest #:hooks '() #:locales? #t @@ -475,15 +474,11 @@ (and (string-suffix? name input) input))) (derivation-inputs drv)))) - ;; The inputs for grep and sed should be cross-build derivations, but that - ;; for the glibc-utf8-locales should be a native build. (return (and (string=? (derivation-system drv) (%current-system)) (string=? (find-input packages:grep) (derivation-file-name grep)) (string=? (find-input packages:sed) - (derivation-file-name sed)) - (string=? (find-input (packages:libc-utf8-locales-for-target)) - (derivation-file-name locales)))))) + (derivation-file-name sed)))))) (test-assert "package->manifest-entry defaults to \"out\"" (let ((outputs (package-outputs packages:glibc))) |