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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
From 0336c1a01ba26a354ebb0c7c90ad637eaa975fc1 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 10 Nov 2020 18:17:16 -0800
Subject: [PATCH 16/29] tests/derivations.scm: Disable tests requiring
bootstrap binaries when network is unavailable.
---
tests/derivations.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tests/derivations.scm b/tests/derivations.scm
index 07ae9cff95..58de18dfae 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -759,6 +759,7 @@
(string-contains (get-string-all port)
"(λ (α) (+ α 1))"))))))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "build-expression->derivation and derivation-prerequisites"
(let ((drv (build-expression->derivation %store "fail" #f)))
(any (match-lambda
@@ -784,6 +785,7 @@
(x
(pk 'fail x #f)))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "build-expression->derivation without inputs"
(let* ((builder '(begin
(mkdir %output)
@@ -850,12 +852,14 @@
(equal? (pk 'x content)
(pk 'y (call-with-input-file out get-string-all))))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "build-expression->derivation and derivation-build-plan"
(let ((drv (build-expression->derivation %store "fail" #f)))
;; The only direct dependency is (%guile-for-build) and it's already
;; built.
(null? (derivation-build-plan %store (derivation-inputs drv)))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "derivation-build-plan when outputs already present"
(let* ((builder `(begin ,(random-text) (mkdir %output) #t))
(input-drv (build-expression->derivation %store "input" builder))
@@ -886,6 +890,7 @@
(null? (derivation-build-plan %store
(list (derivation-input drv)))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "derivation-build-plan and substitutes"
(let* ((store (open-connection))
(drv (build-expression->derivation store "prereq-subst"
@@ -910,6 +915,7 @@
(null? download*)
(equal? (list drv) build*))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "derivation-build-plan and substitutes, non-substitutable build"
(let* ((store (open-connection))
(drv (build-expression->derivation store "prereq-no-subst"
@@ -984,6 +990,7 @@
(((= substitutable-path item))
(string=? item (derivation->output-path drv))))))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "derivation-build-plan in 'check' mode"
(with-store store
(let* ((dep (build-expression->derivation store "dep"
@@ -1023,6 +1030,7 @@
(list (derivation-input drv2)))
(list drv1 drv2))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "substitution-oracle and #:substitute? #f"
(with-store store
(let* ((dep (build-expression->derivation store "dep"
@@ -1052,6 +1060,7 @@
(equal? (pk 'query query)
(list (derivation->output-path dep))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "build-expression->derivation with expression returning #f"
(let* ((builder '(begin
(mkdir %output)
@@ -1067,6 +1076,7 @@
(build-derivations %store (list drv))
#f)))
+(unless (network-reachable?) (test-skip 1))
(test-assert "build-expression->derivation with two outputs"
(let* ((builder '(begin
(call-with-output-file (assoc-ref %outputs "out")
@@ -1102,6 +1112,7 @@
(let ((p (derivation->output-path drv)))
(string-contains (call-with-input-file p read-line) "GNU")))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "build-expression->derivation with modules"
(let* ((builder `(begin
(use-modules (guix build utils))
@@ -1171,6 +1182,7 @@
(derivation-file-name final1)))
(build-derivations %store (list final1 final2)))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "build-expression->derivation produces recursive fixed-output"
(let* ((builder '(begin
(use-modules (srfi srfi-26))
@@ -1197,6 +1209,7 @@
(string=? "exe" (readlink link))
(file-is-directory? subdir))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "build-expression->derivation uses recursive fixed-output"
(let* ((builder '(call-with-output-file %output
(lambda (port)
--
2.30.2
|