mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
This commit is contained in:
commit
3beaa04ef7
@ -19,6 +19,7 @@ SWIG = swig
|
||||
EXTRA_OBJ=@EXTRA_OBJ@
|
||||
TESTS=test-tdb.sh @TESTS@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PYTHON_CONFIG = @PYTHON_CONFIG@
|
||||
tdbdir = @tdbdir@
|
||||
ldbdir = $(srcdir)
|
||||
tallocdir = @tallocdir@
|
||||
@ -121,7 +122,7 @@ distclean:: clean
|
||||
realdistclean:: distclean
|
||||
rm -f configure.in include/config.h.in
|
||||
|
||||
check:: test
|
||||
check:: test @PYTHON_CHECK_TARGET@
|
||||
|
||||
check-soloading: sample_module.$(SHLIBEXT)
|
||||
LDB_MODULES_PATH=$(builddir) $(srcdir)/tests/test-soloading.sh
|
||||
|
@ -78,14 +78,18 @@ AC_LIBREPLACE_MDLD_FLAGS
|
||||
AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR
|
||||
|
||||
AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
|
||||
AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python2.4 python])
|
||||
|
||||
PYTHON_BUILD_TARGET="build-python"
|
||||
PYTHON_INSTALL_TARGET="install-python"
|
||||
PYTHON_CHECK_TARGET="check-python"
|
||||
AC_SUBST(PYTHON_BUILD_TARGET)
|
||||
AC_SUBST(PYTHON_INSTALL_TARGET)
|
||||
AC_SUBST(PYTHON_CHECK_TARGET)
|
||||
|
||||
if test -z "$PYTHON_CONFIG"; then
|
||||
PYTHON_BUILD_TARGET=""
|
||||
PYTHON_CHECK_TARGET=""
|
||||
PYTHON_INSTALL_TARGET=""
|
||||
fi
|
||||
|
||||
|
@ -65,18 +65,25 @@ examples/ldifreader: examples/ldifreader.o $(LIBS)
|
||||
$(CC) -o examples/ldifreader examples/ldifreader.o $(LIB_FLAGS)
|
||||
|
||||
# Python bindings
|
||||
build-python:: lib/libldb.$(SHLIBEXT) ldb_wrap.c
|
||||
$(ldbdir)/setup.py build
|
||||
build-python:: _ldb.$(SHLIBEXT)
|
||||
|
||||
ldb_wrap.o: $(ldbdir)/ldb_wrap.c
|
||||
$(CC) -c $(ldbdir)/ldb_wrap.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags`
|
||||
|
||||
_ldb.$(SHLIBEXT): $(LIBS) ldb_wrap.o
|
||||
$(SHLD) $(SHLD_FLAGS) -o _ldb.$(SHLIBEXT) ldb_wrap.o $(LIB_FLAGS)
|
||||
|
||||
install-python:: build-python
|
||||
$(ldbdir)/setup.py install --prefix=$(DESTDIR)$(prefix)
|
||||
mkdir -p $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix='$(prefix)')"` \
|
||||
$(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
|
||||
cp $(ldbdir)/ldb.py $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix='$(prefix)')"`
|
||||
cp _ldb.$(SHLIBEXT) $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
|
||||
|
||||
install-swig::
|
||||
cp ldb.i `$(SWIG) -swiglib`
|
||||
|
||||
check-python:: build-python
|
||||
# FIXME: This isn't portable
|
||||
LD_LIBRARY_PATH=lib PYTHONPATH=.:build/lib.linux-i686-2.4/ trial tests/python/api.py
|
||||
LD_LIBRARY_PATH=lib PYTHONPATH=.:$(ldbdir) $(PYTHON) $(ldbdir)/tests/python/api.py
|
||||
|
||||
clean-python::
|
||||
$(ldbdir)/setup.py clean
|
||||
clean::
|
||||
rm -f _ldb.$(SHLIBEXT)
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
|
||||
setup(name="ldb",
|
||||
version="1.0",
|
||||
url="http://ldb.samba.org/",
|
||||
author="LDB Developers",
|
||||
author_email="ldb@samba.org",
|
||||
license="LGPLv3",
|
||||
keywords=["ldap","ldb","db","ldif"],
|
||||
py_modules=["ldb"],
|
||||
ext_modules=[Extension('_ldb', ['ldb_wrap.c'], include_dirs=['include'],
|
||||
library_dirs=["lib"], libraries=['ldb'])],
|
||||
)
|
@ -418,3 +418,6 @@ class ModuleTests(unittest.TestCase):
|
||||
def test_register_module(self):
|
||||
ldb.register_module(ExampleModule())
|
||||
|
||||
if __name__ == '__main__':
|
||||
import unittest
|
||||
unittest.TestProgram()
|
||||
|
@ -22,8 +22,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PICFLAG = @PICFLAG@
|
||||
SHLIBEXT = @SHLIBEXT@
|
||||
SWIG = swig
|
||||
PYTHON = @PYTHON@
|
||||
PYTHON_CONFIG = @PYTHON_CONFIG@
|
||||
PYTHON_BUILD_TARGET = @PYTHON_BUILD_TARGET@
|
||||
PYTHON_INSTALL_TARGET = @PYTHON_INSTALL_TARGET@
|
||||
PYTHON_CHECK_TARGET = @PYTHON_CHECK_TARGET@
|
||||
LIB_PATH_VAR = @LIB_PATH_VAR@
|
||||
tdbdir = @tdbdir@
|
||||
|
||||
TDB_OBJ = @TDB_OBJ@ @LIBREPLACEOBJ@
|
||||
@ -39,7 +43,7 @@ $(SOLIB): $(TDB_OBJ)
|
||||
|
||||
check: test
|
||||
|
||||
test::
|
||||
test:: $(PYTHON_CHECK_TARGET)
|
||||
installcheck:: test install
|
||||
|
||||
clean::
|
||||
|
@ -11,15 +11,20 @@ AC_LD_PICFLAG
|
||||
AC_LD_SHLIBEXT
|
||||
AC_LIBREPLACE_SHLD
|
||||
AC_LIBREPLACE_SHLD_FLAGS
|
||||
AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR
|
||||
m4_include(libtdb.m4)
|
||||
AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
|
||||
AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python2.4 python])
|
||||
|
||||
PYTHON_BUILD_TARGET="build-python"
|
||||
PYTHON_INSTALL_TARGET="install-python"
|
||||
PYTHON_CHECK_TARGET="check-python"
|
||||
AC_SUBST(PYTHON_BUILD_TARGET)
|
||||
AC_SUBST(PYTHON_INSTALL_TARGET)
|
||||
AC_SUBST(PYTHON_CHECK_TARGET)
|
||||
if test -z "$PYTHON_CONFIG"; then
|
||||
PYTHON_BUILD_TARGET=""
|
||||
PYTHON_INSTALL_TARGET=""
|
||||
PYTHON_CHECK_TARGET=""
|
||||
fi
|
||||
AC_OUTPUT(Makefile tdb.pc)
|
||||
|
@ -142,3 +142,8 @@ class SimpleTdbTests(TestCase):
|
||||
self.assertEquals(0, len(self.tdb))
|
||||
self.tdb["entry"] = "value"
|
||||
self.assertEquals(1, len(self.tdb))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import unittest
|
||||
unittest.TestProgram()
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
|
||||
setup(name='tdb',
|
||||
version='1.0',
|
||||
url="http://tdb.samba.org/",
|
||||
py_modules=["tdb"],
|
||||
ext_modules=[Extension('_tdb', ['tdb_wrap.c'], include_dirs=['include'],
|
||||
library_dirs=["."], libraries=['tdb'])],
|
||||
)
|
@ -33,25 +33,32 @@ clean::
|
||||
rm -f $(SONAME) $(SOLIB) libtdb.a libtdb.$(SHLIBEXT)
|
||||
rm -f $(ALL_PROGS) tdb.pc
|
||||
|
||||
build-python:: libtdb.$(SHLIBEXT) tdb_wrap.c
|
||||
$(tdbdir)/setup.py build
|
||||
build-python:: _tdb.$(SHLIBEXT)
|
||||
|
||||
tdb_wrap.o: $(tdbdir)/tdb_wrap.c
|
||||
$(CC) -c $(tdbdir)/tdb_wrap.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags`
|
||||
|
||||
_tdb.$(SHLIBEXT): libtdb.$(SHLIBEXT) tdb_wrap.o
|
||||
$(SHLD) $(SHLD_FLAGS) -o $@ tdb_wrap.o -L. -ltdb `$(PYTHON_CONFIG) --libs`
|
||||
|
||||
install:: installdirs installbin installheaders installlibs \
|
||||
$(PYTHON_INSTALL_TARGET)
|
||||
|
||||
installpython:: build-python
|
||||
./setup.py install --prefix=$(DESTDIR)$(prefix)
|
||||
install-python:: build-python
|
||||
mkdir -p $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix='$(prefix)')"` \
|
||||
$(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
|
||||
cp $(tdbdir)/tdb.py $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix='$(prefix)')"`
|
||||
cp _tdb.$(SHLIBEXT) $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
|
||||
|
||||
check-python:: build-python
|
||||
# FIXME: Should be more portable:
|
||||
LD_LIBRARY_PATH=. PYTHONPATH=.:build/lib.linux-i686-2.4 trial python/tests/simple.py
|
||||
$(LIB_PATH_VAR)=. PYTHONPATH=".:$(tdbdir)" $(PYTHON) $(tdbdir)/python/tests/simple.py
|
||||
|
||||
install-swig::
|
||||
mkdir -p $(DESTDIR)`$(SWIG) -swiglib`
|
||||
cp tdb.i $(DESTDIR)`$(SWIG) -swiglib`
|
||||
|
||||
clean-python::
|
||||
./setup.py clean
|
||||
clean::
|
||||
rm -f _tdb.$(SHLIBEXT)
|
||||
|
||||
installdirs::
|
||||
mkdir -p $(DESTDIR)$(bindir)
|
||||
@ -77,5 +84,3 @@ libtdb.$(SHLIBEXT): $(SOLIB)
|
||||
|
||||
$(SONAME): $(SOLIB)
|
||||
ln -fs $< $@
|
||||
|
||||
|
||||
|
@ -35,4 +35,4 @@ BASE-CHARSET.*.Testing partial surrogate
|
||||
.*NET-API-DELSHARE.* # DelShare isn't implemented yet
|
||||
RAP.*netservergetinfo
|
||||
kinit with pkinit # fails with: salt type 3 not supported
|
||||
|
||||
samba4.blackbox.provision.py.reprovision # Fails with entry already exists
|
||||
|
@ -262,6 +262,8 @@ done
|
||||
|
||||
DATADIR=$samba4srcdir/../testdata
|
||||
|
||||
plantest "js.samba3sam" none $SCRIPTDIR/samba3sam.js $CONFIGURATION `pwd` $DATADIR/samba3/
|
||||
|
||||
# Domain Member Tests
|
||||
|
||||
plantest "RPC-ECHO against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" RPC-ECHO "$*"
|
||||
@ -327,5 +329,6 @@ then
|
||||
rm -rf $PREFIX/upgrade
|
||||
plantest "blackbox.upgrade" none $PYTHON setup/upgrade.py $CONFIGURATION --targetdir=$PREFIX/upgrade ../testdata/samba3 ../testdata/samba3/smb.conf
|
||||
rm -rf $PREFIX/provision
|
||||
plantest "blackbox.provision.py" none $PYTHON ./setup/provision.py $CONFIGURATION --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/provision
|
||||
mkdir $PREFIX/provision
|
||||
plantest "blackbox.provision.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_provision.sh "$PREFIX/provision" "$CONFIGURATION"
|
||||
fi
|
||||
|
39
source/setup/tests/blackbox_provision.sh
Executable file
39
source/setup/tests/blackbox_provision.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
cat <<EOF
|
||||
Usage: blackbox_provision.sh PREFIX CONFIGURATION
|
||||
EOF
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
PREFIX="$1"
|
||||
CONFIGURATION="$2"
|
||||
shift 2
|
||||
|
||||
testit() {
|
||||
name="$1"
|
||||
shift
|
||||
cmdline="$*"
|
||||
echo "test: $name"
|
||||
$cmdline
|
||||
status=$?
|
||||
if [ x$status = x0 ]; then
|
||||
echo "success: $name"
|
||||
else
|
||||
echo "failure: $name"
|
||||
failed=`expr $failed + 1`
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
testit "simple" $PYTHON ./setup/provision.py $CONFIGURATION --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple
|
||||
|
||||
reprovision() {
|
||||
$PYTHON ./setup/provision.py $CONFIGURATION --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/reprovision"
|
||||
$PYTHON ./setup/provision.py $CONFIGURATION --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/reprovision"
|
||||
}
|
||||
|
||||
testit "reprovision" reprovision
|
||||
|
||||
exit $failed
|
1255
testprogs/ejs/samba3sam.js
Normal file
1255
testprogs/ejs/samba3sam.js
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user