File: 0004-tests-Only-run-tests-using-bootstrap-binaries-when-n.patch

package info (click to toggle)
guix 1.4.0-9
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 161,500 kB
  • sloc: lisp: 861,023; cpp: 10,741; javascript: 9,632; sh: 8,913; makefile: 951; ansic: 558; python: 129; sql: 33; sed: 16
file content (73 lines) | stat: -rw-r--r-- 2,587 bytes parent folder | download | duplicates (2)
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
From fd2d343d01eaaad0ed711cf157d8df4781bad324 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Fri, 6 Nov 2020 18:42:48 -0800
Subject: [PATCH 04/29] tests: Only run tests using bootstrap binaries when
 network is available.

---
 tests/grafts.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/grafts.scm b/tests/grafts.scm
index 7e1959e4a7..17896a1277 100644
--- a/tests/grafts.scm
+++ b/tests/grafts.scm
@@ -48,6 +48,7 @@
 
 (test-begin "grafts")
 
+(unless (network-reachable?) (test-skip 1))
 (test-equal "graft-derivation, grafted item is a direct dependency"
   '((type . graft) (graft (count . 2)))
   (let* ((build `(begin
@@ -85,6 +86,7 @@
                           grafted)
                 properties)))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assert "graft-derivation, grafted item uses a different name"
   (let* ((build   `(begin
                      (mkdir %output)
@@ -107,6 +109,7 @@
 ;; Make sure 'derivation-file-name' always gets to see an absolute file name.
 (fluid-set! %file-port-name-canonicalization 'absolute)
 
+(unless (network-reachable?) (test-skip 1))
 (test-assert "graft-derivation, grafted item is an indirect dependency"
   (let* ((build `(begin
                    (mkdir %output)
@@ -151,6 +154,7 @@
                        (list one two dep)
                        (references %store dep)))))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assert "graft-derivation, preserve empty directories"
   (run-with-store %store
     (mlet* %store-monad ((fake    (text-file "bash" "Fake bash."))
@@ -175,6 +179,7 @@
                              fake)
                    (file-is-directory? (string-append out "/a/b/c/d")))))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assert "graft-derivation, no dependencies on grafted output"
   (run-with-store %store
     (mlet* %store-monad ((fake    (text-file "bash" "Fake bash."))
@@ -186,6 +191,7 @@
                                    (list graft))))
       (return (eq? grafted drv)))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assert "graft-derivation, multiple outputs"
   (let* ((build `(begin
                    (symlink (assoc-ref %build-inputs "a")
@@ -360,6 +366,7 @@
                         (list (derivation-input p2 '("aaa"))))
                 (derivation-output-names p2g))))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assert "graft-derivation, renaming"         ;<http://bugs.gnu.org/23132>
   (let* ((build `(begin
                    (use-modules (guix build utils))
-- 
2.30.2