[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Clean up tools/check error reporting. Remove logging.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 95cfc001ddd1befa7af36067b7505f2ba119a3b5 # Parent 02e104bf03c0016622f6a58283d680e33b515de8 Clean up tools/check error reporting. Remove logging. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r 02e104bf03c0 -r 95cfc001ddd1 tools/check/check_brctl --- a/tools/check/check_brctl Fri Sep 2 08:06:59 2005 +++ b/tools/check/check_brctl Fri Sep 2 09:02:13 2005 @@ -2,8 +2,9 @@ # CHECK-INSTALL function error { - echo 'Check for the bridge control utils (brctl) failed.' + echo + echo ' *** Check for the bridge control utils (brctl) FAILED' exit 1 } -brctl show || error \ No newline at end of file +which brctl 1>/dev/null 2>&1 || error diff -r 02e104bf03c0 -r 95cfc001ddd1 tools/check/check_iproute --- a/tools/check/check_iproute Fri Sep 2 08:06:59 2005 +++ b/tools/check/check_iproute Fri Sep 2 09:02:13 2005 @@ -2,9 +2,10 @@ # CHECK-INSTALL function error { - echo 'Check for iproute (ip addr) failed.' + echo + echo ' *** Check for iproute (ip addr) FAILED' exit 1 } -ip addr list || error +ip addr list 1>/dev/null 2>&1 || error diff -r 02e104bf03c0 -r 95cfc001ddd1 tools/check/check_logging --- a/tools/check/check_logging Fri Sep 2 08:06:59 2005 +++ b/tools/check/check_logging Fri Sep 2 09:02:13 2005 @@ -18,11 +18,12 @@ import logging except ImportError: hline() - msg("Python logging is not installed.") - msg("Use 'make install-logging' at the xen root to install.") msg("") - msg("Alternatively download and install from") - msg("http://www.red-dove.com/python_logging.html") + msg(" *** Python logging is not installed.") + msg(" *** Use 'make install-logging' at the xen root to install.") + msg(" *** ") + msg(" *** Alternatively download and install from") + msg(" *** http://www.red-dove.com/python_logging.html") hline() sys.exit(1) diff -r 02e104bf03c0 -r 95cfc001ddd1 tools/check/check_python --- a/tools/check/check_python Fri Sep 2 08:06:59 2005 +++ b/tools/check/check_python Fri Sep 2 09:02:13 2005 @@ -2,9 +2,9 @@ # CHECK-BUILD CHECK-INSTALL function error { - echo "Check for Python version 2.2 or higher failed." + echo + echo " *** Check for Python version >= 2.2 FAILED" exit 1 } -python -V python -V 2>&1 | cut -d ' ' -f 2 | grep -q -E '^2.2|^2.3|^2.4' || error diff -r 02e104bf03c0 -r 95cfc001ddd1 tools/check/check_zlib_devel --- a/tools/check/check_zlib_devel Fri Sep 2 08:06:59 2005 +++ b/tools/check/check_zlib_devel Fri Sep 2 09:02:13 2005 @@ -2,9 +2,10 @@ # CHECK-BUILD function error { - echo 'Check for zlib includes failed.' + echo + echo " *** Check for zlib headers FAILED" exit 1 } set -e -[ -e /usr/include/zlib.h ] || error \ No newline at end of file +[ -e /usr/include/zlib.h ] || error diff -r 02e104bf03c0 -r 95cfc001ddd1 tools/check/check_zlib_lib --- a/tools/check/check_zlib_lib Fri Sep 2 08:06:59 2005 +++ b/tools/check/check_zlib_lib Fri Sep 2 09:02:13 2005 @@ -2,9 +2,10 @@ # CHECK-BUILD CHECK-INSTALL function error { - echo 'Check for zlib library failed.' + echo + echo " *** Check for zlib library FAILED" exit 1 } set -e -ldconfig -p | grep libz.so || error \ No newline at end of file +ldconfig -p | grep -q libz.so || error diff -r 02e104bf03c0 -r 95cfc001ddd1 tools/check/chk --- a/tools/check/chk Fri Sep 2 08:06:59 2005 +++ b/tools/check/chk Fri Sep 2 09:02:13 2005 @@ -17,14 +17,11 @@ case $1 in build) check="CHECK-BUILD" - info="/tmp/xen.chkbuild" ;; install) check="CHECK-INSTALL" - info="/tmp/xen.chkinstall" ;; clean) - rm -f /tmp/xen.chkbuild /tmp/xen.chkinstall exit 0 ;; *) @@ -34,7 +31,7 @@ failed=0 -echo "Xen ${check} " $(date) > ${info} +echo "Xen ${check} " $(date) for f in check_* ; do case $f in *~) @@ -49,24 +46,12 @@ if ! grep -q ${check} $f ; then continue fi - echo ' ' >> ${info} - echo "Checking $f" >> ${info} - if ./$f 1>>${info} 2>&1 ; then - echo OK >> ${info} + echo -n "Checking $f: " + if ./$f 2>&1 ; then + echo OK else failed=1 - echo "FAILED $f" - echo FAILED >> ${info} fi done -echo >> ${info} - -if [ "$failed" == "1" ] ; then - echo "Checks failed. See `pwd`/${info} for details." - echo "FAILED" >> ${info} - exit 1 -else - echo "OK" >> ${info} - exit 0 -fi +exit $failed _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |