diff options
Diffstat (limited to 'tools/check')
-rw-r--r-- | tools/check/Makefile | 26 | ||||
-rw-r--r-- | tools/check/README | 20 | ||||
-rwxr-xr-x | tools/check/check_brctl | 13 | ||||
-rwxr-xr-x | tools/check/check_crypto_lib | 11 | ||||
-rwxr-xr-x | tools/check/check_curl | 13 | ||||
-rwxr-xr-x | tools/check/check_iproute | 15 | ||||
-rwxr-xr-x | tools/check/check_libaio_devel | 11 | ||||
-rwxr-xr-x | tools/check/check_libaio_lib | 9 | ||||
-rwxr-xr-x | tools/check/check_openssl_devel | 6 | ||||
-rwxr-xr-x | tools/check/check_python | 13 | ||||
-rwxr-xr-x | tools/check/check_python_devel | 17 | ||||
-rwxr-xr-x | tools/check/check_python_xml | 12 | ||||
-rwxr-xr-x | tools/check/check_udev | 22 | ||||
-rwxr-xr-x | tools/check/check_uuid_devel | 7 | ||||
-rwxr-xr-x | tools/check/check_x11_devel | 9 | ||||
-rwxr-xr-x | tools/check/check_xgettext | 6 | ||||
-rwxr-xr-x | tools/check/check_xml2 | 14 | ||||
-rwxr-xr-x | tools/check/check_yajl_devel | 8 | ||||
-rwxr-xr-x | tools/check/check_zlib_devel | 6 | ||||
-rwxr-xr-x | tools/check/check_zlib_lib | 12 | ||||
-rwxr-xr-x | tools/check/chk | 63 | ||||
-rw-r--r-- | tools/check/funcs.sh | 106 |
22 files changed, 0 insertions, 419 deletions
diff --git a/tools/check/Makefile b/tools/check/Makefile deleted file mode 100644 index c07008d095..0000000000 --- a/tools/check/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -XEN_ROOT = $(CURDIR)/../.. -include $(XEN_ROOT)/tools/Rules.mk - -# Export the necessary environment variables for the tests -export PYTHON -export LIBXENAPI_BINDINGS -export CHECK_INCLUDES -export CHECK_LIB -export CONFIG_SYSTEM_LIBAIO - -.PHONY: all install -all install: check-build - -# Check this machine is OK for building on. -.PHONY: check-build -check-build: - ./chk build - -# Check this machine is OK for installing on. -.PHONY: check-install -check-install: - ./chk install - -.PHONY: clean -clean: - ./chk clean diff --git a/tools/check/README b/tools/check/README deleted file mode 100644 index e6f105b073..0000000000 --- a/tools/check/README +++ /dev/null @@ -1,20 +0,0 @@ -Checks for the suitability of a machine for Xen build or install. -To check for build suitability use - - ./chk build - -To check for install suitability use - - ./chk install - -The chk script will run checks in this directory and print -the ones that failed. It prints nothing if checks succeed. -The chk script exits with 0 on success and 1 on failure. - -The chk script runs executable files in this directory whose -names begin with 'check_'. Files containing CHECK-BUILD -are run for the build check, and files containing CHECK-INSTALL -are run for the install check. - -Detailed output from the check scripts is in .chkbuild for build -and .chkinstall for install.
\ No newline at end of file diff --git a/tools/check/check_brctl b/tools/check/check_brctl deleted file mode 100755 index 5b3f2b4cfb..0000000000 --- a/tools/check/check_brctl +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# CHECK-INSTALL - -. ./funcs.sh - -case $OS in -OpenBSD|NetBSD|FreeBSD) - has_or_fail brconfig ;; -Linux) - has_or_fail brctl ;; -*) - fail "unknown OS" ;; -esac diff --git a/tools/check/check_crypto_lib b/tools/check/check_crypto_lib deleted file mode 100755 index af27da6521..0000000000 --- a/tools/check/check_crypto_lib +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# CHECK-BUILD CHECK-INSTALL - -. ./funcs.sh - -case $OS in -FreeBSD|NetBSD|OpenBSD) - exit 0 ;; -esac - -has_lib libcrypto.so || fail "missing libcrypto.so" diff --git a/tools/check/check_curl b/tools/check/check_curl deleted file mode 100755 index a001e7e437..0000000000 --- a/tools/check/check_curl +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# CHECK-BUILD CHECK-INSTALL - -. ./funcs.sh - -if [ "$LIBXENAPI_BINDINGS" != "y" ]; then - echo -n "unused, " - exit 0 -fi - -has_or_fail curl-config -curl_libs=`curl-config --libs` || fail "curl-config --libs failed" -test_link $curl_libs || fail "dependency libraries for curl are missing" diff --git a/tools/check/check_iproute b/tools/check/check_iproute deleted file mode 100755 index 2208944fb5..0000000000 --- a/tools/check/check_iproute +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# CHECK-INSTALL - -. ./funcs.sh - -PATH=/sbin:$PATH - -case $OS in -OpenBSD|NetBSD|FreeBSD) - has_or_fail ifconfig ;; -Linux) - has_or_fail ip ;; -*) - fail "unknown OS" ;; -esac diff --git a/tools/check/check_libaio_devel b/tools/check/check_libaio_devel deleted file mode 100755 index 6cf42b7a51..0000000000 --- a/tools/check/check_libaio_devel +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# CHECK-BUILD - -. ./funcs.sh - -if [ X${CONFIG_SYSTEM_LIBAIO} != X"y" ] ; then - exit 0 -fi -if ! has_header libaio.h ; then - fail "can't find libaio headers, install libaio devel package or set CONFIG_SYSTEM_LIBAIO=n" -fi diff --git a/tools/check/check_libaio_lib b/tools/check/check_libaio_lib deleted file mode 100755 index 40bafa2496..0000000000 --- a/tools/check/check_libaio_lib +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# CHECK-BUILD CHECK-INSTALL - -. ./funcs.sh - -if [ X${CONFIG_SYSTEM_LIBAIO} != X"y" ] ; then - exit 0 -fi -has_lib libaio.so || fail "can't find libaio" diff --git a/tools/check/check_openssl_devel b/tools/check/check_openssl_devel deleted file mode 100755 index e5ca03d2ca..0000000000 --- a/tools/check/check_openssl_devel +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# CHECK-BUILD - -. ./funcs.sh - -has_header openssl/md5.h || fail "missing openssl headers" diff --git a/tools/check/check_python b/tools/check/check_python deleted file mode 100755 index ca687a7b32..0000000000 --- a/tools/check/check_python +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# CHECK-BUILD CHECK-INSTALL - -. ./funcs.sh - -if test -z ${PYTHON}; then - PYTHON=python -fi - -${PYTHON} -c ' -import sys -sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 3) -' || fail "need python version >= 2.3" diff --git a/tools/check/check_python_devel b/tools/check/check_python_devel deleted file mode 100755 index ee90e5da00..0000000000 --- a/tools/check/check_python_devel +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# CHECK-BUILD - -. ./funcs.sh - -if test -z ${PYTHON}; then - PYTHON=python -fi -has_or_fail ${PYTHON} - -${PYTHON} -c ' -import os.path, sys -for p in sys.path: - if os.path.exists(p + "/config/Makefile"): - sys.exit(0) -sys.exit(1) -' || fail "can't find python devel files" diff --git a/tools/check/check_python_xml b/tools/check/check_python_xml deleted file mode 100755 index 5b14971f0f..0000000000 --- a/tools/check/check_python_xml +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# CHECK-INSTALL - -. ./funcs.sh - -if test -z ${PYTHON}; then - PYTHON=python -fi -has_or_fail ${PYTHON} - -${PYTHON} -c 'import xml.dom.minidom' 2>/dev/null || \ -fail "can't import xml.dom.minidom" diff --git a/tools/check/check_udev b/tools/check/check_udev deleted file mode 100755 index 27e557d2c2..0000000000 --- a/tools/check/check_udev +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# CHECK-INSTALL - -. ./funcs.sh - -case $OS in -OpenBSD|NetBSD|FreeBSD) - has_or_fail vnconfig - ;; -Linux) - has /sbin/udevadm && \ - udevver=`/sbin/udevadm info -V | awk '{print $NF}'` - [ -z "$udevver" ] && has_or_fail udevinfo && \ - udevver=`udevinfo -V | awk '{print $NF}'` - [ "$udevver" -ge 59 ] 2>/dev/null || \ - has hotplug || \ - fail "udev is too old, upgrade to version 59 or later" - ;; -*) - fail "unknown OS" - ;; -esac diff --git a/tools/check/check_uuid_devel b/tools/check/check_uuid_devel deleted file mode 100755 index 82bc2ed4b5..0000000000 --- a/tools/check/check_uuid_devel +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# CHECK-BUILD - -. ./funcs.sh - -has_header uuid.h || \ -has_header uuid/uuid.h || fail "missing uuid headers (package uuid-dev)" diff --git a/tools/check/check_x11_devel b/tools/check/check_x11_devel deleted file mode 100755 index 8b7df98400..0000000000 --- a/tools/check/check_x11_devel +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# CHECK-BUILD - -. ./funcs.sh - -has_header X11/keysymdef.h || \ -has_header /usr/X11R6/include/X11/keysymdef.h || \ -has_header /usr/X11R7/include/X11/keysymdef.h || \ -warning "can't find X11 headers" diff --git a/tools/check/check_xgettext b/tools/check/check_xgettext deleted file mode 100755 index 7e9fa2aada..0000000000 --- a/tools/check/check_xgettext +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# CHECK-BUILD - -. ./funcs.sh - -has_or_fail xgettext diff --git a/tools/check/check_xml2 b/tools/check/check_xml2 deleted file mode 100755 index 89fe5a4769..0000000000 --- a/tools/check/check_xml2 +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# CHECK-BUILD CHECK-INSTALL - -. ./funcs.sh - -if [ ! "$LIBXENAPI_BINDINGS" = "y" ] -then - echo -n "unused, " - exit 0 -fi - -has_or_fail xml2-config -xml2_libs=`xml2-config --libs` || fail "xml2-config --libs failed" -test_link $xml2_libs || fail "dependency libraries for xml2 are missing" diff --git a/tools/check/check_yajl_devel b/tools/check/check_yajl_devel deleted file mode 100755 index b8dac4f767..0000000000 --- a/tools/check/check_yajl_devel +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# CHECK-BUILD - -. ./funcs.sh - -has_header yajl/yajl_parse.h || fail "can't find yajl/yajl_parse.h" -has_header yajl/yajl_gen.h || fail "can't find yajl/yajl_gen.h" -has_lib libyajl.so || fail "can't find libyajl.so" diff --git a/tools/check/check_zlib_devel b/tools/check/check_zlib_devel deleted file mode 100755 index 2fc0165c21..0000000000 --- a/tools/check/check_zlib_devel +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# CHECK-BUILD - -. ./funcs.sh - -has_header zlib.h || fail "can't find zlib headers" diff --git a/tools/check/check_zlib_lib b/tools/check/check_zlib_lib deleted file mode 100755 index be8cf05e3f..0000000000 --- a/tools/check/check_zlib_lib +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# CHECK-BUILD CHECK-INSTALL - -. ./funcs.sh - -case $OS in -FreeBSD|NetBSD|OpenBSD) - exit 0 - ;; -esac - -has_lib libz.so || fail "can't find zlib" diff --git a/tools/check/chk b/tools/check/chk deleted file mode 100755 index e776cff3af..0000000000 --- a/tools/check/chk +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh - -func_usage () -{ - echo "Usage:" - echo " $0 [build|install|clean]" - echo - echo "Check suitability for Xen build or install." - echo "Exit with 0 if OK, 1 if not." - echo - echo "Calling with 'clean' removes generated files." - exit 1 -} - -PATH=$PATH:/sbin:/usr/sbin -OS=`uname -s` -export PATH OS - -if [ "$OS" = "SunOS" ]; then - exit 0 -fi - -case $1 in - build) - check="CHECK-BUILD" - ;; - install) - check="CHECK-INSTALL" - ;; - clean) - exit 0 - ;; - *) - func_usage - ;; -esac - -failed=0 - -echo "Xen ${check} " `date` -for f in check_* ; do - case $f in - *~) - continue - ;; - *) - ;; - esac - if ! [ -x $f ] ; then - continue - fi - if ! grep -Fq "$check" $f ; then - continue - fi - echo -n "Checking $f: " - if ./$f 2>&1 ; then - echo OK - else - failed=1 - fi -done - -exit ${failed} diff --git a/tools/check/funcs.sh b/tools/check/funcs.sh deleted file mode 100644 index 054c579f15..0000000000 --- a/tools/check/funcs.sh +++ /dev/null @@ -1,106 +0,0 @@ -# has is the same as which, except it handles cross environments -has() { - if [ -z "$CROSS_COMPILE" ]; then - command which "$@" - return $? - fi - - check_sys_root || return 1 - - # subshell to prevent pollution of caller's IFS - ( - IFS=: - for p in $PATH; do - if [ -x "$CROSS_SYS_ROOT/$p/$1" ]; then - echo "$CROSS_SYS_ROOT/$p/$1" - return 0 - fi - done - return 1 - ) -} - -has_or_fail() { - has "$1" >/dev/null || fail "can't find $1" -} - -has_header() { - check_sys_root || return 1 - - case $1 in - /*) ;; - *) - if [ -r "$CROSS_SYS_ROOT/usr/include/$1" ]; then - return 0 - fi - for path in ${CHECK_INCLUDES}; do - if [ -r "$CROSS_SYS_ROOT${path}/$1" ]; then - return 0 - fi - done - ;; - esac - - return 1 -} - -has_lib() { - check_sys_root || return 1 - - # subshell to prevent pollution of caller's environment - ( - PATH=/sbin:$PATH # for ldconfig - LIBRARIES="$CHECK_LIB /usr/lib" - - # This relatively common in a sys-root; libs are installed but - # ldconfig hasn't run there, so ldconfig -p won't work. - if [ "$OS" = Linux -a ! -f "$CROSS_SYS_ROOT/etc/ld.so.cache" ]; then - echo "Please run ldconfig -r \"$CROSS_SYS_ROOT\" to generate ld.so.cache" - # fall through; ldconfig test below should fail - fi - if [ "${OS}" = "Linux" ]; then - ldconfig -p ${CROSS_SYS_ROOT+-r "$CROSS_SYS_ROOT"} | grep -Fq "$1" - return $? - fi - if [ "${OS}" = "NetBSD" ]; then - ls -1 ${LIBRARIES} | grep -Fq "$1" - return $? - fi - return 1 - ) -} - -test_link() { - # subshell to trap removal of tmpfile - ( - unset tmpfile - trap 'rm -f "$tmpfile"; exit' 0 1 2 15 - tmpfile=`mktemp` || return 1 - ld "$@" -o "$tmpfile" >/dev/null 2>&1 - return $? - ) -} - -# this function is used commonly above -check_sys_root() { - [ -z "$CROSS_COMPILE" ] && return 0 - if [ -z "$CROSS_SYS_ROOT" ]; then - echo "please set CROSS_SYS_ROOT in the environment" - return 1 - fi - if [ ! -d "$CROSS_SYS_ROOT" ]; then - echo "no sys-root found at $CROSS_SYS_ROOT" - return 1 - fi -} - -warning() { - echo - echo " *** `basename "$0"` FAILED${*+: $*}" -} - -fail() { - echo - echo " *** `basename "$0"` FAILED${*+: $*}" - exit 1 -} |