summaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-12-13 22:14:25 +0100
committerLudovic Courtès <ludo@gnu.org>2012-12-13 22:14:25 +0100
commit1e9824513c570370638b1bfe33bf1dba1f12be4a (patch)
treecb7bd7f0bebd42dbeabf2c8f09ae1d5144ac969b /tests/guix-package.sh
parent70915c1a2ef72e7350b2a29d1d93e30643bce6f3 (diff)
parentb35c0f866c83288e64dcf5839d908705d416c317 (diff)
downloadgnu-guix-1e9824513c570370638b1bfe33bf1dba1f12be4a.tar
gnu-guix-1e9824513c570370638b1bfe33bf1dba1f12be4a.tar.gz
Merge branch 'nix-integration'
Conflicts: tests/guix-package.sh
Diffstat (limited to 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh46
1 files changed, 25 insertions, 21 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 2a424cc3de..60a0394f1c 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -39,31 +39,35 @@ test -L "$profile" && test -L "$profile-1-link"
! test -f "$profile-2-link"
test -f "$profile/bin/guile"
-guix-package -b -p "$profile" \
- -i `guix-build -e '(@@ (distro packages base) gnu-make-boot0)'`
-test -L "$profile-2-link"
-test -f "$profile/bin/make" && test -f "$profile/bin/guile"
+# Check whether we have network access.
+if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
+then
+ guix-package -b -p "$profile" \
+ -i `guix-build -e '(@@ (distro packages base) gnu-make-boot0)'`
+ test -L "$profile-2-link"
+ test -f "$profile/bin/make" && test -f "$profile/bin/guile"
-# Check whether `--list-installed' works.
-# XXX: Change the tests when `--install' properly extracts the package
-# name and version string.
-installed="`guix-package -p "$profile" --list-installed | cut -f1 | xargs echo | sort`"
-case "x$installed" in
- "guile-bootstrap make-boot0")
- true;;
- "make-boot0 guile-bootstrap")
- true;;
- "*")
- false;;
-esac
+ # Check whether `--list-installed' works.
+ # XXX: Change the tests when `--install' properly extracts the package
+ # name and version string.
+ installed="`guix-package -p "$profile" --list-installed | cut -f1 | xargs echo | sort`"
+ case "x$installed" in
+ "guile-bootstrap make-boot0")
+ true;;
+ "make-boot0 guile-bootstrap")
+ true;;
+ "*")
+ false;;
+ esac
-test "`guix-package -p "$profile" -I 'g.*e' | cut -f1`" = "guile-bootstrap"
+ test "`guix-package -p "$profile" -I 'g.*e' | cut -f1`" = "guile-bootstrap"
-# Remove a package.
-guix-package -b -p "$profile" -r "guile-bootstrap"
-test -L "$profile-3-link"
-test -f "$profile/bin/make" && ! test -f "$profile/bin/guile"
+ # Remove a package.
+ guix-package -b -p "$profile" -r "guile-bootstrap"
+ test -L "$profile-3-link"
+ test -f "$profile/bin/make" && ! test -f "$profile/bin/guile"
+fi
# Make sure the `:' syntax works.
guix-package -b -i "libsigsegv:lib" -n