commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-37-g3458bc


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-37-g3458bc5
Date: Tue, 21 Feb 2012 21:19:34 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  3458bc5b5f1b244920001fb253011c33c32f4113 (commit)
      from  b4a938fe77fd0a59e9f0a37eb704856d00be3d35 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=3458bc5b5f1b244920001fb253011c33c32f4113


commit 3458bc5b5f1b244920001fb253011c33c32f4113
Author: Mats Erik Andersson <address@hidden>
Date:   Tue Feb 21 22:18:24 2012 +0100

    tests/telnet-localhost.sh: Assure active TTY.

diff --git a/ChangeLog b/ChangeLog
index b554f65..24c4d78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-02-21  Mats Erik Andersson <address@hidden>
 
+       * tests/telnet-localhost.sh: Skip test in absence of assigned TTY.
+       Rewrite case evaluation without nested pipelines and OR connectives.
+
+2012-02-21  Mats Erik Andersson <address@hidden>
+
        Basic test case for `telnet'.
        * tests/Makefile.am (dist_check_SCRIPTS) [ENABLE_inetd && 
ENABLE_telnet]:
        Added telnet-localhost.sh.
diff --git a/tests/telnet-localhost.sh b/tests/telnet-localhost.sh
index fb5559d..ca4f1db 100755
--- a/tests/telnet-localhost.sh
+++ b/tests/telnet-localhost.sh
@@ -27,7 +27,7 @@
 #
 #  * cat(1), expr(1), head(1), kill(1), pwd(1), rm(1).
 #
-#  * id(1), grep(1), mktemp(1), ps(1).
+#  * id(1), grep(1), mktemp(1), ps(1), tty(1).
 
 # Is usage explanation in demand?
 #
@@ -67,18 +67,26 @@ if test -n "$VERBOSE"; then
     $TELNET --version | head -1
 fi
 
+# The use of telnet is portable only with a connected TTY.
+if tty >/dev/null; then
+    :
+else
+    echo 'No TTY assigned to this process.  Skipping test.' >&2
+    exit 77
+fi
+
 if test ! -x $INETD; then
-    echo "Missing executable '$INETD'.  Skipping." >&2
+    echo "Missing executable '$INETD'.  Skipping test." >&2
     exit 77
 fi
 
 if test ! -x $TELNET; then
-    echo "Missing executable '$TELNET'.  Skipping." >&2
+    echo "Missing executable '$TELNET'.  Skipping test." >&2
     exit 77
 fi
 
 if test ! -x $ADDRPEEK; then
-    echo "Missing executable '$ADDRPEEK'.  Skipping." >&2
+    echo "Missing executable '$ADDRPEEK'.  Skipping test." >&2
     exit 77
 fi
 
@@ -159,27 +167,30 @@ telnet_opts="--no-rc --no-escape --no-login"
 
 errno=0
 
-test -z "$TARGET4" || {
-    $TELNET $telnet_opts $TARGET4 $PORT 2>/dev/null |
-    eval "grep 'Your address is $TARGET4.' $display"  || {
+if test -n "$TARGET4"; then
+    output=`$TELNET $telnet_opts $TARGET4 $PORT 2>/dev/null`
+    echo "$output" | eval "grep 'Your address is $TARGET4.' $display"
+    if test $? -ne 0; then
        errno=1
        echo "Failed at '$TARGET4'." >&2
-    }
-}
+    fi
+fi
 
-test -z "$TARGET6" || {
-    $TELNET $telnet_opts $TARGET6 $PORT 2>/dev/null |
-    eval "grep 'Your address is $TARGET6.' $display"  || {
+if test -n "$TARGET6"; then
+    output=`$TELNET $telnet_opts $TARGET6 $PORT 2>/dev/null`
+    echo "$output" | eval "grep 'Your address is $TARGET6.' $display"
+    if test $? -ne 0; then
        errno=1
        echo "Failed at '$TARGET6'." >&2
-    }
-}
+    fi
+fi
 
-test -z "$TARGET46" || {
-    $TELNET $telnet_opts $TARGET46 $PORT 2>/dev/null |
-    eval "grep 'Your address is .*$TARGET4.' $display" || {
+if test -n "$TARGET46"; then
+    output=`$TELNET $telnet_opts $TARGET46 $PORT 2>/dev/null`
+    echo "$output" | eval "grep 'Your address is .*$TARGET4.' $display"
+    if test $? -ne 0; then
        echo "Informational: Unsuccessful with mapped address '$TARGET46'." >&2
-    }
-}
+    fi
+fi
 
 exit $errno

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |    5 ++++
 tests/telnet-localhost.sh |   49 +++++++++++++++++++++++++++-----------------
 2 files changed, 35 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]