ia64/xen-unstable

changeset 13808:a9f30d8eea75

Use the new xen-python-path to set PYTHONPATH, rather than trying to do it in
XmTestLib.__init__ (and getting it wrong).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Thu Feb 01 14:41:58 2007 +0000 (2007-02-01)
parents afb41f6bc30a
children d34d43fb88ae
files tools/xm-test/configure.ac tools/xm-test/lib/XmTestLib/__init__.py
line diff
     1.1 --- a/tools/xm-test/configure.ac	Thu Feb 01 12:48:53 2007 +0000
     1.2 +++ b/tools/xm-test/configure.ac	Thu Feb 01 14:41:58 2007 +0000
     1.3 @@ -11,10 +11,12 @@ AC_PROG_CC
     1.4  #AC_PROG_INSTALL
     1.5  AC_CHECK_PROG([LILO],	lilo,	lilo,	"no",	[$PATH])
     1.6  
     1.7 +XEN_PYTHON_PATH=$(/usr/sbin/xen-python-path)
     1.8 +
     1.9  # Right now, we can assume that the lib/ directory
    1.10  # is two levels above the tests
    1.11  TESTLIB=../../lib
    1.12 -TENV="PYTHONPATH=$PYTHONPATH:$TESTLIB"
    1.13 +TENV="PYTHONPATH=$PYTHONPATH:$TESTLIB:$XEN_PYTHON_PATH"
    1.14  
    1.15  AC_ARG_ENABLE(hvm-support,
    1.16  	[[  --enable-hvm-support           enable hardware virtual machine assist]],
     2.1 --- a/tools/xm-test/lib/XmTestLib/__init__.py	Thu Feb 01 12:48:53 2007 +0000
     2.2 +++ b/tools/xm-test/lib/XmTestLib/__init__.py	Thu Feb 01 14:41:58 2007 +0000
     2.3 @@ -3,26 +3,6 @@
     2.4  # Author: Dan Smith <danms@us.ibm.com>
     2.5  #
     2.6  
     2.7 -import os.path
     2.8 -import sys
     2.9 -
    2.10 -# Use the auxbin module in Xend to determine the correct Python path.  We
    2.11 -# take the first installed instance of auxbin that we find, and then run it
    2.12 -# to determine the correct path, appending that to sys.path.
    2.13 -
    2.14 -AUXBIN = 'xen/util/auxbin.py'
    2.15 -
    2.16 -for p in ['python%s' % sys.version[:3], 'python']:
    2.17 -    for l in ['/usr/lib64', '/usr/lib']:
    2.18 -        d = os.path.join(l, p)
    2.19 -        if os.path.exists(os.path.join(d, AUXBIN)):
    2.20 -            sys.path.append(d)
    2.21 -            import xen.util.auxbin
    2.22 -            libpath = xen.util.auxbin.libpath()
    2.23 -            sys.path = sys.path[:-1]
    2.24 -            sys.path.append(libpath)
    2.25 -            break
    2.26 -
    2.27  from Console import *
    2.28  from Test import *
    2.29  from Xm import *