summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/lib/ldb/tests/python/deletetest.py1
-rwxr-xr-xsource4/lib/ldb/tests/python/urgent_replication.py8
-rwxr-xr-xsource4/script/installmisc.sh9
-rw-r--r--source4/scripting/python/config.mk4
-rwxr-xr-xsource4/scripting/python/samba_external/missing.py7
-rwxr-xr-xsource4/selftest/tests.sh14
6 files changed, 19 insertions, 24 deletions
diff --git a/source4/lib/ldb/tests/python/deletetest.py b/source4/lib/ldb/tests/python/deletetest.py
index 13bec7efae..eff92c5f33 100755
--- a/source4/lib/ldb/tests/python/deletetest.py
+++ b/source4/lib/ldb/tests/python/deletetest.py
@@ -8,6 +8,7 @@ import os
sys.path.append("bin/python")
sys.path.append("../lib/subunit/python")
+sys.path.append("../lib/testtools")
import samba.getopt as options
diff --git a/source4/lib/ldb/tests/python/urgent_replication.py b/source4/lib/ldb/tests/python/urgent_replication.py
index b8df072bf3..28b3a5fa78 100755
--- a/source4/lib/ldb/tests/python/urgent_replication.py
+++ b/source4/lib/ldb/tests/python/urgent_replication.py
@@ -2,16 +2,13 @@
# -*- coding: utf-8 -*-
# This is a port of the original in testprogs/ejs/ldap.js
-import getopt
import optparse
import sys
-import time
-import random
-import base64
import os
sys.path.append("bin/python")
sys.path.append("../lib/subunit/python")
+sys.path.append("../lib/testtools")
import samba.getopt as options
@@ -26,9 +23,6 @@ from samba import glue
from subunit.run import SubunitTestRunner
import unittest
-from samba.ndr import ndr_pack, ndr_unpack
-from samba.dcerpc import security
-
parser = optparse.OptionParser("urgent_replication [options] <host>")
sambaopts = options.SambaOptions(parser)
parser.add_option_group(sambaopts)
diff --git a/source4/script/installmisc.sh b/source4/script/installmisc.sh
index ddc25d3edc..6a53b988f5 100755
--- a/source4/script/installmisc.sh
+++ b/source4/script/installmisc.sh
@@ -82,12 +82,13 @@ cp setup/provision.smb.conf.member $SETUPDIR || exit 1
cp setup/provision.smb.conf.standalone $SETUPDIR || exit 1
echo "Installing external python libraries"
-mkdir -p $DESTDIR$PYTHONDIR/samba_external || exit 1
+mkdir -p $DESTDIR$PYTHONDIR || exit 1
for p in $($PYTHON scripting/python/samba_external/missing.py);
do
- echo "Installing missing python library $p"
- mkdir -p $DESTDIR$PYTHONDIR/samba_external/$p
- cp -r ../lib/$p/* $DESTDIR$PYTHONDIR/samba_external/$p/ || exit 1
+ package=`basename $p`
+ echo "Installing missing python package $package"
+ mkdir -p $DESTDIR$PYTHONDIR/$package
+ cp -r ../lib/$p/* $DESTDIR$PYTHONDIR/$package/ || exit 1
done
echo "Installing stuff in $PRIVATEDIR"
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk
index d36e136346..db35669e1a 100644
--- a/source4/scripting/python/config.mk
+++ b/source4/scripting/python/config.mk
@@ -23,9 +23,9 @@ python_glue_OBJ_FILES = $(pyscriptsrcdir)/pyglue.o
$(python_glue_OBJ_FILES): CFLAGS+=-I$(ldbsrcdir)
-_PY_FILES = $(shell find $(pyscriptsrcdir)/samba ../lib/subunit/python -type f -name "*.py")
+_PY_FILES = $(shell find $(pyscriptsrcdir)/samba -type f -name "*.py")
-$(eval $(foreach pyfile, $(_PY_FILES),$(call python_py_module_template,$(patsubst $(pyscriptsrcdir)/%,%,$(subst ../lib/subunit/python,,$(pyfile))),$(pyfile))))
+$(eval $(foreach pyfile, $(_PY_FILES),$(call python_py_module_template,$(patsubst $(pyscriptsrcdir)/%,%,$(pyfile)),$(pyfile))))
PYDOCTOR = pydoctor
PYDOCTOR_OPTIONS = --project-name Samba --project-url http://www.samba.org/ \
diff --git a/source4/scripting/python/samba_external/missing.py b/source4/scripting/python/samba_external/missing.py
index 082afd8397..d3dd2b9290 100755
--- a/source4/scripting/python/samba_external/missing.py
+++ b/source4/scripting/python/samba_external/missing.py
@@ -1,11 +1,10 @@
#!/usr/bin/python
# work out what python external libraries we need to install
-
external_libs = {
- "dns.resolver": "dnspython",
- "subunit": "subunit",
- "testtools": "testtools"}
+ "dns.resolver": "dnspython/dns",
+ "subunit": "subunit/python/subunit",
+ "testtools": "testtools/testtools"}
list = []
diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh
index f832b4f15e..bf6127f4a5 100755
--- a/source4/selftest/tests.sh
+++ b/source4/selftest/tests.sh
@@ -85,7 +85,7 @@ smb4torture="$samba4bindir/smbtorture${EXEEXT}"
if which tap2subunit 2>/dev/null; then
TAP2SUBUNIT=tap2subunit
else
- TAP2SUBUNIT="PYTHONPATH=$samba4srcdir/../lib/subunit/python $PYTHON $samba4srcdir/../lib/subunit/filters/tap2subunit"
+ TAP2SUBUNIT="PYTHONPATH=$samba4srcdir/../lib/subunit/python:$samba4srcdir/../lib/testtools $PYTHON $samba4srcdir/../lib/subunit/filters/tap2subunit"
fi
$smb4torture -V
@@ -466,15 +466,15 @@ plantest "samba3sam.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/dsdb/samd
plantest "subunit.python" none $SUBUNITRUN subunit
plantest "rpcecho.python" dc:local $SUBUNITRUN samba.tests.dcerpc.rpcecho
plantest "winreg.python" dc:local $SUBUNITRUN -U\$USERNAME%\$PASSWORD samba.tests.dcerpc.registry
-plantest "ldap.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python" $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
-plantest "urgent_replication.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python" $PYTHON $samba4srcdir/lib/ldb/tests/python/urgent_replication.py \$PREFIX_ABS/dc/private/sam.ldb
-plantest "ldap_schema.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python" $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap_schema.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
+plantest "ldap.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
+plantest "urgent_replication.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/urgent_replication.py \$PREFIX_ABS/dc/private/sam.ldb
+plantest "ldap_schema.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap_schema.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
plantest "ldap.possibleInferiors.python" dc $PYTHON $samba4srcdir/dsdb/samdb/ldb_modules/tests/possibleinferiors.py $CONFIGURATION ldap://\$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
-plantest "ldap.secdesc.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python" $PYTHON $samba4srcdir/lib/ldb/tests/python/sec_descriptor.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
-plantest "ldap.acl.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python" $PYTHON $samba4srcdir/lib/ldb/tests/python/acl.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
+plantest "ldap.secdesc.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/sec_descriptor.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
+plantest "ldap.acl.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/acl.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
plantest "xattr.python" none $SUBUNITRUN samba.tests.xattr
plantest "ntacls.python" none $SUBUNITRUN samba.tests.ntacls
-plantest "deletetest.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python" $PYTHON $samba4srcdir/lib/ldb/tests/python/deletetest.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
+plantest "deletetest.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/deletetest.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
plantest "blackbox.samba3dump" none $PYTHON $samba4srcdir/scripting/bin/samba3dump $samba4srcdir/../testdata/samba3
rm -rf $PREFIX/upgrade
plantest "blackbox.upgrade" none $PYTHON $samba4srcdir/setup/upgrade_from_s3 $CONFIGURATION --targetdir=$PREFIX/upgrade $samba4srcdir/../testdata/samba3 ../testdata/samba3/smb.conf