summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-system.sh4
-rw-r--r--tests/packages.scm4
-rw-r--r--tests/pki.scm6
-rw-r--r--tests/ui.scm11
4 files changed, 23 insertions, 2 deletions
diff --git a/tests/guix-system.sh b/tests/guix-system.sh
index a59bd9a6b9..16c02e6e4c 100644
--- a/tests/guix-system.sh
+++ b/tests/guix-system.sh
@@ -342,6 +342,10 @@ for example in gnu/system/examples/*.tmpl; do
# 'asus-c201.tmpl' uses 'linux-libre-arm-generic', which is an
# ARM-only package.
options="--system=armhf-linux";;
+ *raspberry*)
+ # The Raspberry Pi templates 'linux-libre-arm64-generic', which is
+ # an ARM-only package.
+ options="--system=aarch64-linux";;
*vm-image*)
# The VM image tries to build 'current-guix' as per 'guix pull'.
# Skip it.
diff --git a/tests/packages.scm b/tests/packages.scm
index a5819d8de3..f58c47817b 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -626,6 +626,10 @@
(build-derivations %store (list drv))
(call-with-input-file output get-string-all)))
+(test-equal "package-upstream-name*"
+ (package-upstream-name* (specification->package "guile-gcrypt"))
+ "gcrypt")
+
;;;
;;; Source derivation with snippets.
diff --git a/tests/pki.scm b/tests/pki.scm
index d6a6b476c7..86daff8ddf 100644
--- a/tests/pki.scm
+++ b/tests/pki.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -66,6 +66,10 @@
(test-assert "authorized-key? public-key singleton"
(authorized-key? %public-key (public-keys->acl (list %public-key))))
+(test-equal "public-keys->acl deduplication"
+ (public-keys->acl (list %public-key))
+ (public-keys->acl (make-list 10 %public-key)))
+
(test-assert "signature-case valid-signature"
(let* ((hash (sha256 #vu8(1 2 3)))
(data (bytevector->hash-data hash #:key-type (key-type %public-key)))
diff --git a/tests/ui.scm b/tests/ui.scm
index 6a25a204ca..438acae525 100644
--- a/tests/ui.scm
+++ b/tests/ui.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2017, 2019-2020, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info>
;;;
;;; This file is part of GNU Guix.
@@ -294,6 +294,15 @@ Second line" 24))
(>0 (package-relevance libb2
(map rx '("crypto" "library")))))))
+(test-assert "package-relevance and upstream name"
+ ;; https://issues.guix.gnu.org/58136
+ (let ((ggplot2 (specification->package "r-ggplot2"))
+ (ggstance (specification->package "r-ggstance"))
+ (rx (make-regexp "ggplot2" regexp/icase)))
+ (> (package-relevance ggplot2 (list rx))
+ (package-relevance ggstance (list rx))
+ 0)))
+
(define (make-empty-file directory file)
;; Create FILE in DIRECTORY.
(close-port (open-output-file (in-vicinity directory file))))