selftest: Fix run for systems without testtools installed.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 22 Sep 2010 04:33:30 +0000 (21:33 -0700)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 22 Sep 2010 05:54:37 +0000 (22:54 -0700)
source4/scripting/python/pyglue.c
source4/scripting/python/samba/__init__.py
source4/selftest/tests.sh

index ec15e77a9378a26f2a1cb165628f94e6065ab78b..1f968e16f9bb7d02740886111eacdd85d5120f9e 100644 (file)
@@ -110,8 +110,6 @@ static PyObject *py_set_debug_level(PyObject *self, PyObject *args)
        Py_RETURN_NONE;
 }
 
-
-
 /*
   return the list of interface IPs we have configured
   takes an loadparm context, returns a list of IPs in string form
index 72bbb4a7e35f5d14c6eac2b67d0399bdb972f5cf..fb71110600c2961d4dfc2eedaeb86c9222b70678 100644 (file)
@@ -52,6 +52,7 @@ class Ldb(_Ldb):
     not necessarily the Sam database. For Sam-specific helper
     functions see samdb.py.
     """
+
     def __init__(self, url=None, lp=None, modules_dir=None, session_info=None,
                  credentials=None, flags=0, options=None):
         """Opens a Samba Ldb file.
index 719f4a65b14dc08d40ee13dfbdb61e70f28dffb3..596604b6279c4f3a32d4595250296e10fafa52e1 100755 (executable)
@@ -104,7 +104,7 @@ planpythontestsuite() {
        env=$2
        module="$3"
        shift 3
-       plantestsuite_idlist "$name" "$env" python -m subunit.run $module
+       plantestsuite_idlist "$name" "$env" PYTHONPATH=$samba4srcdir/../lib/subunit/python:$samba4srcdir/../lib/testtools $PYTHON -m subunit.run $module
 }
 
 plansmbtorturetestsuite() {