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
|
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(+)
Index: guix/tests/gexp.scm
===================================================================
--- guix.orig/tests/gexp.scm
+++ guix/tests/gexp.scm
@@ -817,6 +817,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))
@@ -880,6 +881,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)
@@ -953,6 +955,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"))
@@ -1039,6 +1042,7 @@ importing.* \\(guix config\\) from the h
(y #~(+ 39 #$x)))
(gexp-modules y)))))))
+(unless (network-reachable?) (test-skip 1))
(test-assertm "gexp->derivation #:modules"
(mlet* %store-monad
((build -> #~(begin
@@ -1053,6 +1057,7 @@ importing.* \\(guix config\\) from the h
(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
@@ -1068,6 +1073,7 @@ importing.* \\(guix config\\) from the h
(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))
@@ -1097,6 +1103,7 @@ importing.* \\(guix config\\) from the h
(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!
@@ -1322,6 +1329,7 @@ importing.* \\(guix config\\) from the h
(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
@@ -1520,6 +1528,7 @@ importing.* \\(guix config\\) from the h
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)
@@ -1534,6 +1543,7 @@ importing.* \\(guix config\\) from the h
(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)
@@ -1593,6 +1603,7 @@ importing.* \\(guix config\\) from the h
(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"))
|