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
|
From 6840dffd6392d4a2282fac9752a84c145fc89806 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 10 Nov 2020 18:36:22 -0800
Subject: [PATCH 20/29] tests/packages.scm: Disable tests using bootstrap
binaries when network is unavailable.
---
tests/packages.scm | 7 +++++++
1 file changed, 7 insertions(+)
Index: guix/tests/packages.scm
===================================================================
--- guix.orig/tests/packages.scm
+++ guix/tests/packages.scm
@@ -858,6 +858,7 @@
(derivation-error-derivation c)))))
(package-derivation %store p)))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "trivial"
(let* ((p (package (inherit (dummy-package "trivial"))
(build-system trivial-build-system)
@@ -877,6 +878,7 @@
(equal? '(hello guix)
(call-with-input-file (string-append p "/test") read))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "trivial with local file as input"
(let* ((i (search-path %load-path "ice-9/boot-9.scm"))
(p (package (inherit (dummy-package "trivial-with-input-file"))
@@ -895,6 +897,7 @@
(equal? (call-with-input-file p get-bytevector-all)
(call-with-input-file i get-bytevector-all))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "trivial with source"
(let* ((i (search-path %load-path "ice-9/boot-9.scm"))
(p (package (inherit (dummy-package "trivial-with-source"))
@@ -912,6 +915,7 @@
(equal? (call-with-input-file p get-bytevector-all)
(call-with-input-file i get-bytevector-all))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "trivial with system-dependent input"
(let* ((p (package (inherit (dummy-package "trivial-system-dependent-input"))
(build-system trivial-build-system)
@@ -1187,6 +1191,7 @@
(graft-origin-output graft2)
(graft-replacement-output graft2)))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "replacement also grafted"
;; We build a DAG as below, where dotted arrows represent replacements and
;; solid arrows represent dependencies:
@@ -1879,6 +1884,7 @@
(mock ((gnu packages) cache-is-authoritative? (const #t))
(find-packages-by-name "guile" "2"))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "--search-paths with pattern"
;; Make sure 'guix package --search-paths' correctly reports environment
;; variables when file patterns are used (in particular, it must follow
@@ -1930,6 +1936,7 @@
(guix-package "-p" (derivation->output-path prof)
"--search-paths"))))))
+(unless (network-reachable?) (test-skip 1))
(test-assert "--search-paths with single-item search path"
;; Make sure 'guix package --search-paths' correctly reports environment
;; variables for things like 'GIT_SSL_CAINFO' that have #f as their
|