summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/builders.scm3
-rw-r--r--tests/guix-package.sh13
-rw-r--r--tests/packages.scm3
3 files changed, 15 insertions, 4 deletions
diff --git a/tests/builders.scm b/tests/builders.scm
index 3c2a3edc8e..a7c3e42830 100644
--- a/tests/builders.scm
+++ b/tests/builders.scm
@@ -94,7 +94,8 @@
 (test-assert "gnu-build-system"
   (build-system? gnu-build-system))
 
-(unless (network-reachable?) (test-skip 1))
+(when (or (not (network-reachable?)) (shebang-too-long?))
+  (test-skip 1))
 (test-assert "gnu-build"
   (let* ((url      "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz")
          (hash     (nix-base32-string->bytevector
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index d4917bbf90..94cf927420 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -28,6 +28,14 @@ readlink_base ()
     basename `readlink "$1"`
 }
 
+# Return true if a typical shebang in the store would not exceed Linux's
+# default static limit.
+shebang_not_too_long ()
+{
+    test `echo $NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-bootstrap-binaries-0/bin/bash | wc -c` \
+	 -lt 128
+}
+
 module_dir="t-guix-package-$$"
 profile="t-profile-$$"
 rm -f "$profile"
@@ -55,8 +63,9 @@ test -f "$profile/bin/guile"
 guix package --search-paths -p "$profile"
 test "`guix package --search-paths -p "$profile" | wc -l`" = 0
 
-# Check whether we have network access.
-if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
+# Check whether we have network access and an acceptable shebang length.
+if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null \
+	 && shebang_not_too_long
 then
     boot_make="(@@ (gnu packages commencement) gnu-make-boot0)"
     boot_make_drv="`guix build -e "$boot_make" | grep -v -e -debug`"
diff --git a/tests/packages.scm b/tests/packages.scm
index 5725b0a8a9..d6371b3b49 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -531,7 +531,8 @@
                      (%current-target-system "foo64-linux-gnu"))
         (equal? drv (bag->derivation %store bag))))))
 
-(unless (network-reachable?) (test-skip 1))
+(when (or (not (network-reachable?)) (shebang-too-long?))
+  (test-skip 1))
 (test-assert "GNU Make, bootstrap"
   ;; GNU Make is the first program built during bootstrap; we choose it
   ;; here so that the test doesn't last for too long.