summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/go.scm6
-rw-r--r--tests/store.scm25
-rw-r--r--tests/utils.scm12
3 files changed, 38 insertions, 5 deletions
diff --git a/tests/go.scm b/tests/go.scm
index a70a0ddbf5..d2e8846b30 100644
--- a/tests/go.scm
+++ b/tests/go.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2021 François Joulaud <francois.joulaud@radiofrance.com>
-;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
+;;; Copyright © 2021 François Joulaud <francois.joulaud@radiofrance.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -387,7 +387,7 @@ require github.com/kr/pretty v0.2.1
"0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"))))
(build-system go-build-system)
(arguments
- '(#:import-path "github.com/go-check/check"))
+ (list #:import-path "github.com/go-check/check"))
(propagated-inputs
`(("go-github-com-kr-pretty" ,go-github-com-kr-pretty)))
(home-page "https://github.com/go-check/check")
diff --git a/tests/store.scm b/tests/store.scm
index 5df28adf0d..45948f4f43 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2021, 2023 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -105,7 +105,28 @@
"/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7/bin/guile")))
(not (direct-store-path? (%store-prefix)))))
-(test-skip (if %store 0 15))
+(test-skip (if %store 0 18))
+
+(test-equal "substitute-urls, default"
+ (list (getenv "GUIX_BINARY_SUBSTITUTE_URL"))
+ (with-store store
+ (set-build-options store #:use-substitutes? #t)
+ (substitute-urls store)))
+
+(test-equal "substitute-urls, client-specified URLs"
+ '("http://substitutes.example.org"
+ "http://other.example.org")
+ (with-store store
+ (set-build-options store #:use-substitutes? #t
+ #:substitute-urls '("http://substitutes.example.org"
+ "http://other.example.org"))
+ (substitute-urls store)))
+
+(test-equal "substitute-urls, disabled"
+ '()
+ (with-store store
+ (set-build-options store #:use-substitutes? #f)
+ (substitute-urls store)))
(test-equal "profiles/per-user exists and is not writable"
#o755
diff --git a/tests/utils.scm b/tests/utils.scm
index 648e91f242..5664165c85 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -329,6 +330,17 @@ skip these tests."
;; However, it isn't 32-bit.
,(format #f "x86_~a-linux-gnu" (expt 2 109)))))
+(test-equal "target-avr?"
+ '(#t #t #t #f #f)
+ (map target-avr?
+ '("avr" "avr-unknown-none"
+ ;; In addition LLVM also uses this form.
+ "avr-unknown-unknown"
+ ;; The AVR32 architecture also was made by Atmel/Microchip but it
+ ;; does not resemble the AVR family, they aren't compatible in any
+ ;; way.
+ "avr32" "avr32-unknown-none")))
+
(test-end)
(false-if-exception (delete-file temp-file))