[Pkg-zsh-commits] [zsh] 01/02: Revert "Add conditional patch to prevent FTBFS on Hurd in case of wrong test assumptions"

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 a67229c9402418aacbc50fc8b8152d0f57c822a8
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Fri Sep 20 17:28:58 2013 +0200

    Revert "Add conditional patch to prevent FTBFS on Hurd in case of wrong test assumptions"
    
    This reverts commit ba5c7320d4876deb14dba60584fcdf5d5774e13b.
---
 debian/patch-test-suite.sh                         |   48 --------------------
 .../patches/disable-tests-which-need-dev-tty.patch |   29 ------------
 debian/rules                                       |   13 +-----
 3 files changed, 2 insertions(+), 88 deletions(-)

diff --git a/debian/patch-test-suite.sh b/debian/patch-test-suite.sh
deleted file mode 100755
index 9e46ae4..0000000
--- a/debian/patch-test-suite.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-
-set -e
-
-TEST=Test/C02cond.ztst
-
-if [ "$1" = "--reverse" ]; then
-    TTY="$2"
-
-    # Unpatch
-    if [ "$TTY" = "/dev/tty" ]; then
-        exit 0;
-    elif [ -n "$TTY" ]; then
-        echo "Replacing $TTY with /dev/tty in $TEST"
-        sed -e "s:$TTY:/dev/tty:" -i $TEST || true
-    else
-        echo "Patch back in that check that needs /dev/tty. (Failures are ok.)"
-        patch -R -f --no-backup-if-mismatch -F0 -r- -s -p1 < debian/patches/disable-tests-which-need-dev-tty.patch || true
-    fi
-else
-    TTY="$1"
-
-    if [ "$TTY" = "/dev/tty" ]; then
-        # Sanity check
-        if [ -c /dev/tty ]; then
-            echo "/dev/tty exists and is a character device, hence no patching needed."
-            exit 0;
-        else
-
-            echo "$MAKE's -c test in debian/rules said /dev/tty is"
-            echo "a character device, but $0's checks says it's not:"
-            ls -l /dev/tty
-            exit 1
-        fi
-    elif [ -n "$TTY" ]; then
-        echo "Replacing /dev/tty with $TTY in $TEST"
-        sed -e "s:/dev/tty:$TTY:" -i $TEST
-    else
-        echo "Huh? No character device named tty* found at all in /dev/"
-        # Reality check
-        find /dev/ -name 'tty*' -type c || true
-
-        echo "Well, then let's patch out that check that needs"
-        echo "/dev/tty to be a character device."
-
-        patch -f --no-backup-if-mismatch -F0 -r- -s -p1 < debian/patches/disable-tests-which-need-dev-tty.patch
-    fi
-fi
diff --git a/debian/patches/disable-tests-which-need-dev-tty.patch b/debian/patches/disable-tests-which-need-dev-tty.patch
deleted file mode 100644
index 6c2233f..0000000
--- a/debian/patches/disable-tests-which-need-dev-tty.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Description: Disable /dev/tty needing test in test-suite
- One test in C02cond.ztst of the upstream test-suite always fails if
- /dev/tty does not exist or is no character device..
- .
- This may be the case on the GNU/Hurd buildds.
- .
- This patch removes that test. As this is not always wanted, this test
- should never be listed in debian/patches/series, but will be applied
- when necessary by debian/patch-test-suite.sh.
- .
- Again: DO NOT LIST THIS PATCH IN THE series FILE.
-Author: Axel Beckert <abe at debian.org>
-
-Index: zsh/Test/C02cond.ztst
-===================================================================
---- zsh.orig/Test/C02cond.ztst	2013-09-14 02:42:12.000000000 +0200
-+++ zsh/Test/C02cond.ztst	2013-09-20 16:04:20.000000000 +0200
-@@ -41,11 +41,6 @@
-   fi
- 0D:-b cond
- 
--  # Use hardcoded /dev/tty because globbing inside /dev fails on Cygwin
--  char=/dev/tty
--  [[ -c $char && ! -c $zerolength ]]
--0:-c cond
--
-   [[ -d . && ! -d zerolength ]]
- 0:-d cond
- 
diff --git a/debian/rules b/debian/rules
index 8909128..042cf8f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -42,13 +42,9 @@ endif
 
 BUILT_USING=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W libcap-dev libncursesw5-dev libpcre3-dev eglibc)
 
-# Check for /dev/tty and find potential alternatives to avoid test
-# suite failures on hurd
-TESTTTY=$(shell if [ -c /dev/tty ]; then echo /dev/tty; else find /dev -name 'tty*' -type c | head -1; fi)
-
 build: build-arch build-indep
 
-build-arch: configure-stamp prepare-tests-stamp
+build-arch: configure-stamp
 	dh_auto_build -B obj --parallel
 	HOME="$(CURDIR)/obj/testhome" dh_auto_test -B obj --parallel
 	touch $@
@@ -57,7 +53,7 @@ build-indep: configure-stamp
 	dh_auto_build -B obj --parallel -- pdf
 	touch $@
 
-build-static: configure-static-stamp prepare-tests-stamp
+build-static: configure-static-stamp
 	dh_testdir
 	dh_auto_build -B obj-static --parallel
 	HOME="$(CURDIR)/obj-static/testhome" dh_auto_test -B obj-static --parallel || true
@@ -66,10 +62,6 @@ build-static: configure-static-stamp prepare-tests-stamp
 build-debug: DEB_BUILD_OPTIONS+=debug
 build-debug: build
 
-prepare-tests-stamp:
-	debian/patch-test-suite.sh "$(TESTTTY)"
-	touch $@
-
 configure:
 	touch stamp-h.in
 	dh_autoreconf
@@ -97,7 +89,6 @@ clean:
 	dh_auto_clean -B obj        --parallel
 	dh_auto_clean -B obj-static --parallel
 	dh_auto_clean               --parallel
-	debian/patch-test-suite.sh  --reverse $(TESTTTY)
 	dh_clean
 	rm -rf config.cache obj obj-static autom4te.cache
 

-- 
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