aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-02-23 23:52:28 +0100
committerLudovic Courtès <ludo@gnu.org>2015-02-24 00:01:34 +0100
commitb69c5c2ced1e41fdb5c2e747b1fb3a338ca63768 (patch)
treeeafabb8dcb62eb56ea00e2a46f7fb42109c9f69d /tests/guix-package.sh
parent12d720fd1a9c43019f2d5afa051b45c7633b3ab0 (diff)
downloadguix-b69c5c2ced1e41fdb5c2e747b1fb3a338ca63768.tar
guix-b69c5c2ced1e41fdb5c2e747b1fb3a338ca63768.tar.gz
tests: Skip tests that would fail due to the shebang length.
Reported by Daniel Kochmański <dkochmanski@hellsgate.pl>. Fixes <http://bugs.gnu.org/19888>. * guix/tests.scm (shebang-too-long?): New procedure. * tests/builders.scm ("gnu-build"): Conditionalize on not (shebang-too-long?). * tests/packages.scm ("GNU Make, bootstrap"): Likewise. * tests/guix-package.sh (shebang_not_too_long): New function. Use it to determine whether to build 'gnu-make-boot0'.
Diffstat (limited to 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh13
1 files changed, 11 insertions, 2 deletions
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`"