[Pkg-zsh-commits] [zsh] 02/02: Add patch to make test suite "-c" test more flexible, should prevent FTBFS on Hurd
Axel Beckert
abe at deuxchevaux.org
Fri Sep 20 16:33:06 UTC 2013
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch debian
in repository zsh.
commit 22bc9278997a8172766538a2ec6613524df03742
Author: Axel Beckert <abe at deuxchevaux.org>
Date: Fri Sep 20 18:32:31 2013 +0200
Add patch to make test suite "-c" test more flexible, should prevent FTBFS on Hurd
Thanks: Pino Toscano
---
.../check-for-dev-tty-before-using-it.patch | 27 ++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 28 insertions(+)
diff --git a/debian/patches/check-for-dev-tty-before-using-it.patch b/debian/patches/check-for-dev-tty-before-using-it.patch
new file mode 100644
index 0000000..92b0e3a
--- /dev/null
+++ b/debian/patches/check-for-dev-tty-before-using-it.patch
@@ -0,0 +1,27 @@
+Description: Choose character device for "-c" testing more safely
+ Hopefully solves test suite failures on Hurd
+Author: Pino Toscano <pino at debian.org>
+Reviewed-By: Axel Beckert <abe at debian.org>
+
+Index: zsh/Test/C02cond.ztst
+===================================================================
+--- zsh.orig/Test/C02cond.ztst 2013-09-20 16:21:32.000000000 +0200
++++ zsh/Test/C02cond.ztst 2013-09-20 17:59:03.000000000 +0200
+@@ -41,9 +41,14 @@
+ fi
+ 0D:-b cond
+
+- # Use hardcoded /dev/tty because globbing inside /dev fails on Cygwin
+- char=/dev/tty
+- [[ -c $char && ! -c $zerolength ]]
++ # Hardcoded /dev/tty as necessary for Cygwin may fail on Hurd
++ tty=$(find /dev/ -name 'tty*' -type c -print)
++ if [[ -n $tty ]]; then
++ [[ -c $tty[(f)1] && ! -c $zerolength ]]
++ else
++ print -u$ZTST_fd 'Warning: Not testing [[ -c tty ]] (no tty found)'
++ [[ ! -c $zerolength ]]
++ fi
+ 0:-c cond
+
+ [[ -d . && ! -d zerolength ]]
diff --git a/debian/patches/series b/debian/patches/series
index 2ef5cb5..faf51db 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ texinfo_remove_leading_whitespace.patch
vcs_info_guilt_support.patch
replace-texi2html-with-makeinfo
fix-segfault-in-compinit-get_cvdef
+check-for-dev-tty-before-using-it.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/zsh.git
More information about the Pkg-zsh-commits
mailing list