1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
From 52dbda59b1e7d479edee11eb23f236d1f5426dc6 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 10 Nov 2020 18:24:19 -0800
Subject: [PATCH 17/29] tests/gexp.scm: Disable tests using bootstrap binaries
when network is unavailable.
---
tests/gexp.scm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 4ac94adaf5..a273d8407a 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -670,6 +670,7 @@
(mlet %store-monad ((drv mdrv))
(return (string=? system (derivation-system drv))))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "gexp->derivation, local-file"
(mlet* %store-monad ((file -> (search-path %load-path "guix.scm"))
(intd (interned-file file #:recursive? #f))
@@ -733,6 +734,7 @@
(return (string=? (derivation-file-name drv)
(derivation-file-name xdrv)))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "gexp->derivation, store copy"
(let ((build-one #~(call-with-output-file #$output
(lambda (port)
@@ -805,6 +807,7 @@
get-bytevector-all))))
files)))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "imported-files with file-like objects"
(mlet* %store-monad ((plain -> (plain-file "foo" "bar!"))
(q-scm -> (search-path %load-path "ice-9/q.scm"))
@@ -868,6 +871,7 @@ importing.* \\(guix config\\) from the host"
(y #~(+ 39 #$x)))
(gexp-modules y)))))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "gexp->derivation #:modules"
(mlet* %store-monad
((build -> #~(begin
@@ -882,6 +886,7 @@ importing.* \\(guix config\\) from the host"
(s (stat (string-append p "/guile/guix/nix"))))
(return (eq? (stat:type s) 'directory))))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "gexp->derivation & with-imported-modules"
;; Same test as above, but using 'with-imported-modules'.
(mlet* %store-monad
@@ -897,6 +902,7 @@ importing.* \\(guix config\\) from the host"
(s (stat (string-append p "/guile/guix/nix"))))
(return (eq? (stat:type s) 'directory))))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "gexp->derivation & nested with-imported-modules"
(mlet* %store-monad
((build1 -> (with-imported-modules '((guix build utils))
@@ -926,6 +932,7 @@ importing.* \\(guix config\\) from the host"
(equal? '(chdir "/foo")
(call-with-input-file b read))))))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "gexp->derivation & with-imported-module & computed module"
(mlet* %store-monad
((module -> (scheme-file "x" #~(;; splice!
@@ -1142,6 +1149,7 @@ importing.* \\(guix config\\) from the host"
(list "out" %bootstrap-guile))))
(built-derivations (list drv))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "gexp->derivation #:allowed-references, specific output"
(mlet* %store-monad ((in (gexp->derivation "thing"
#~(begin
@@ -1339,6 +1347,7 @@ importing.* \\(guix config\\) from the host"
system))))
(derivation-inputs drv)))))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "scheme-file"
(let* ((text (plain-file "foo" "Hello, world!"))
(scheme (scheme-file "bar" #~(list "foo" #$text))))
@@ -1352,6 +1361,7 @@ importing.* \\(guix config\\) from the host"
(equal? `(list "foo" ,text)
(call-with-input-file out read)))))))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "raw-derivation-file"
(let* ((exp #~(let ((drv #$(raw-derivation-file coreutils)))
(when (file-exists? drv)
@@ -1410,6 +1420,7 @@ importing.* \\(guix config\\) from the host"
(call-with-input-file out get-string-all))
(equal? refs (list guile))))))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "file-union"
(mlet* %store-monad ((union -> (file-union "union"
`(("a" ,(plain-file "a" "1"))
--
2.30.2
|