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


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-217-g150fca4
Date: Wed, 28 Nov 2012 20:06:59 +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  150fca45402469de012f4bd9f64bd8ca5b2e89f2 (commit)
      from  0dc3545ca84c8a713810a4b86555824332b3d500 (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=150fca45402469de012f4bd9f64bd8ca5b2e89f2


commit 150fca45402469de012f4bd9f64bd8ca5b2e89f2
Author: Mats Erik Andersson <address@hidden>
Date:   Wed Nov 28 21:03:17 2012 +0100

    Add tests/ifconfig.sh. (silent change)

diff --git a/tests/ifconfig.sh b/tests/ifconfig.sh
new file mode 100755
index 0000000..dbb6e8e
--- /dev/null
+++ b/tests/ifconfig.sh
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+#
+# This file is part of GNU Inetutils.
+#
+# GNU Inetutils is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or (at
+# your option) any later version.
+#
+# GNU Inetutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see `http://www.gnu.org/licenses/'.
+
+# Tests to establish functionality of ifconfig utility.
+#
+# Written by Mats Erik Andersson.
+
+# Prerequisites:
+#
+#  * Shell: SVR4 Bourne shell, or newer.
+
+# Is usage explanation in demand?
+#
+if test "$1" = "-h" || test "$1" = "--help" || test "$1" = "--usage"; then
+    cat <<HERE
+Test utility for ifconfig.
+
+The following environment variables are used:
+
+VERBOSE                Be verbose, if set.
+FORMAT         Test only these output formats.  A list of
+               formats is excepted.
+
+HERE
+    exit 0
+fi
+
+# Step into `tests/', should the invokation
+# have been made outside of it.
+#
+[ -d src ] && [ -f tests/syslogd.sh ] && cd tests/
+
+. ./tools.sh
+
+# Executable uder test.
+#
+IFCONFIG=${IFCONFIG:-../ifconfig/ifconfig$EXEEXT}
+
+
+if test ! -x "$IFCONFIG"; then
+    echo >&2 "Missing executable '$IFCONFIG'.  Skipping test."
+    exit 77
+fi
+
+if test -z "${VERBOSE+set}"; then
+    silence=:
+    bucket='>/dev/null'
+fi
+
+if test -n "$VERBOSE"; then
+    set -x
+    $IFCONFIG --version | $SED '1q'
+fi
+
+# Locate the loopback interface.
+#
+IF_LIST=`$IFCONFIG -l`
+LO=`expr "$IF_LIST" : '.*\(lo0\{0,\}\).*'`
+
+if test -z "$LO"; then
+    echo >&2 'Unable to locate loopback interface.  Failing.'
+    exit 1
+fi
+
+find_lo_addr () {
+   $IFCONFIG ${1+--format=$1} -i $LO | \
+   eval $GREP '"inet .*127\.0\.0\.1"' $bucket 2>/dev/null
+}
+
+errno=0
+
+for fmt in ${FORMAT:-gnu gnu-one-entry net-tools osf unix}; do
+    $silence echo "Checking format $fmt."
+    find_lo_addr $fmt || { errno=1; echo >&2 "Failed with format '$fmt'."; }
+done
+
+test $errno -ne 0 || $silence echo "Successful testing".
+
+exit $errno

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

Summary of changes:
 tests/ifconfig.sh |   95 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 95 insertions(+), 0 deletions(-)
 create mode 100755 tests/ifconfig.sh


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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