File: 0021-tests-profiles.scm-Disable-tests-using-bootstrap-bin.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 (110 lines) | stat: -rw-r--r-- 4,231 bytes parent folder | download
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
From 6d9c68964d6478827b2545403f4c61b1dd74d5f7 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 10 Nov 2020 18:42:49 -0800
Subject: [PATCH 21/29] tests/profiles.scm: Disable tests using bootstrap
 binaries when networking is unavailable.

---
 tests/profiles.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Index: guix-debian/tests/profiles.scm
===================================================================
--- guix-debian.orig/tests/profiles.scm
+++ guix-debian/tests/profiles.scm
@@ -271,6 +271,7 @@
                                   (manifest-pattern (name name))))
            '("gcc" "binutils" "glibc" "coreutils" "grep" "sed"))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assertm "profile-derivation"
   (mlet* %store-monad
       ((entry ->   (package->manifest-entry %bootstrap-guile))
@@ -371,6 +372,7 @@
                   (equal? (list (string-append "PATH=" bindir))
                           (environ)))))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assertm "<profile>"
   (mlet* %store-monad
       ((entry ->   (package->manifest-entry %bootstrap-guile))
@@ -382,6 +384,7 @@
        (_          (built-derivations (list drv))))
     (return (file-exists? (string-append bindir "/guile")))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assertm "profile-derivation relative symlinks, one entry"
   (mlet* %store-monad
       ((entry ->   (package->manifest-entry %bootstrap-guile))
@@ -473,6 +476,7 @@
              (package->manifest-entry packages:glibc))
             "out")))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assertm "profile-manifest, search-paths"
   (mlet* %store-monad
       ((guile ->   (package
@@ -536,6 +540,7 @@
                    (map manifest-entry-parent dependencies))
             (not (force (manifest-entry-parent entry))))))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assertm "read-manifest"
   (mlet* %store-monad ((manifest -> (packages->manifest
                                      (list (package
@@ -655,6 +660,7 @@
                                        (package-name %bootstrap-guile))
                              (eq? dep0 dep1))))))))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assertm "no collision"
   ;; Here we have an entry that is "lowered" (its 'item' field is a store file
   ;; name) and another entry (its 'item' field is a package) that is
@@ -673,6 +679,7 @@
                        (drv (profile-derivation manifest)))
     (return (->bool drv))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assertm "etc/profile"
   ;; Make sure we get an 'etc/profile' file that at least defines $PATH.
   (mlet* %store-monad
@@ -699,6 +706,7 @@
          (and (zero? (close-pipe pipe))
               (string-contains path (string-append profile "/bin"))))))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assertm "etc/profile when etc/ already exists"
   ;; Here 'union-build' makes the profile's etc/ a symlink to the package's
   ;; etc/ directory, which makes it read-only.  Make sure the profile build
@@ -729,6 +737,7 @@
                                get-string-all)
                              "foo!"))))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assertm "etc/profile when etc/ is a symlink"
   ;; When etc/ is a symlink, the unsymlink code in 0.8.2 would fail
   ;; gracelessly because 'scandir' would return #f.
@@ -759,6 +768,7 @@
                                get-string-all)
                              "foo!"))))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-assertm "profile-derivation when etc/ is a relative symlink"
   ;; See <https://bugs.gnu.org/32686>.
   (mlet* %store-monad
@@ -794,6 +804,7 @@
                           get-string-all)
                         "Heya!")))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-equalm "union vs. dangling symlink"        ;<https://bugs.gnu.org/26949>
   "does-not-exist"
   (mlet* %store-monad
@@ -817,6 +828,7 @@
       (built-derivations (list drv))
       (return (readlink (readlink (string-append profile "/dangling")))))))
 
+(unless (network-reachable?) (test-skip 1))
 (test-equalm "profile in profile"
   '("foo" "0")