From 4c8862e52d469ffb52bdf03da4b493de72d0d13d Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 11 Nov 2020 00:40:50 -0800
Subject: [PATCH] tests: Disable tests using bootstrap binaries when network is
 unavailable.

---
 tests/guix-archive.sh         | 4 ++++
 tests/guix-build.sh           | 4 ++++
 tests/guix-daemon.sh          | 4 ++++
 tests/guix-environment.sh     | 4 ++++
 tests/guix-gc.sh              | 4 ++++
 tests/guix-graph.sh           | 4 ++++
 tests/guix-package-aliases.sh | 4 ++++
 tests/guix-package.sh         | 4 ++++
 8 files changed, 32 insertions(+)

Index: guix-debian/tests/guix-archive.sh
===================================================================
--- guix-debian.orig/tests/guix-archive.sh
+++ guix-debian/tests/guix-archive.sh
@@ -20,6 +20,10 @@
 # Test the 'guix archive' command-line utility.
 #
 
+# Use of bootstrap binaries requires network.
+. $(dirname $0)/common.sh
+skip_if_network_unreachable
+
 guix archive --version
 
 archive="t-archive-$$"
Index: guix-debian/tests/guix-build.sh
===================================================================
--- guix-debian.orig/tests/guix-build.sh
+++ guix-debian/tests/guix-build.sh
@@ -22,6 +22,10 @@
 # Test the `guix build' command-line utility.
 #
 
+# Disable due to use of bootstrap binaries.
+. $(dirname $0)/common.sh
+skip_if_network_unreachable
+
 guix build --version
 
 # Should fail.
Index: guix-debian/tests/guix-daemon.sh
===================================================================
--- guix-debian.orig/tests/guix-daemon.sh
+++ guix-debian/tests/guix-daemon.sh
@@ -22,6 +22,10 @@
 
 set -e
 
+# Disable due to use of bootstrap-guile.
+. $(dirname $0)/common.sh
+skip_if_network_unreachable
+
 guix-daemon --version
 guix build --version
 
Index: guix-debian/tests/guix-environment.sh
===================================================================
--- guix-debian.orig/tests/guix-environment.sh
+++ guix-debian/tests/guix-environment.sh
@@ -22,6 +22,10 @@
 
 set -e
 
+# Requires use of bootstrap binaries.
+. $(dirname $0)/common.sh
+skip_if_network_unreachable
+
 guix environment --version
 
 tmpdir="t-guix-environment-$$"
Index: guix-debian/tests/guix-gc.sh
===================================================================
--- guix-debian.orig/tests/guix-gc.sh
+++ guix-debian/tests/guix-gc.sh
@@ -20,6 +20,10 @@
 # Test the `guix gc' command-line utility.
 #
 
+# Requires bootstrap binaries
+. $(dirname $0)/common.sh
+skip_if_network_unreachable
+
 guix gc --version
 
 trap "rm -f guix-gc-root" EXIT
Index: guix-debian/tests/guix-graph.sh
===================================================================
--- guix-debian.orig/tests/guix-graph.sh
+++ guix-debian/tests/guix-graph.sh
@@ -21,6 +21,10 @@
 # Test the 'guix graph' command-line utility.
 #
 
+# Requires building bootstrap binaries.
+. $(dirname $0)/common.sh
+skip_if_network_unreachable
+
 module_dir="t-guix-graph-$$"
 mkdir "$module_dir"
 
Index: guix-debian/tests/guix-package-aliases.sh
===================================================================
--- guix-debian.orig/tests/guix-package-aliases.sh
+++ guix-debian/tests/guix-package-aliases.sh
@@ -20,6 +20,10 @@
 # Test the `guix package' aliases.
 #
 
+# Requires bootstrap binaries
+. $(dirname $0)/common.sh
+skip_if_network_unreachable
+
 guix install --version
 
 readlink_base ()
Index: guix-debian/tests/guix-package.sh
===================================================================
--- guix-debian.orig/tests/guix-package.sh
+++ guix-debian/tests/guix-package.sh
@@ -22,6 +22,10 @@
 # Test the `guix package' command-line utility.
 #
 
+# Requires bootstrap binaries
+. $(dirname $0)/common.sh
+skip_if_network_unreachable
+
 guix package --version
 
 readlink_base ()
