r26671: rap: Convert the RAP tests to the new torture API and run them by default.
[ira/wip.git] / source / selftest / samba4_tests.sh
index 424e1f0209c63ca5dbdd29750fd4619594b018e7..66717c03aef264bf705d27a0dd357786827c03f1 100755 (executable)
@@ -190,6 +190,11 @@ for t in $base $raw $smb2; do
     plantest "$t" dc $VALGRIND $smb4torture $ADDARGS //\$SERVER/tmp -U"\$USERNAME"%"\$PASSWORD" $t
 done
 
+rap=`$smb4torture --list | grep "^RAP-" | xargs`
+for t in $rap; do
+    plantest "$t" dc $VALGRIND $smb4torture $ADDARGS //\$SERVER/IPC\\\$ -U"\$USERNAME"%"\$PASSWORD" $t
+done
+
 # Tests against the NTVFS CIFS backend
 for t in $base $raw; do
     plantest "ntvfs.cifs.$t" dc $VALGRIND $smb4torture //\$NETBIOSNAME/cifs -U"\$USERNAME"%"\$PASSWORD" $t
@@ -212,7 +217,7 @@ if test x"${PIDL_TESTS_SKIP}" = x"yes"; then
    echo "Skipping pidl tests - PIDL_TESTS_SKIP=yes"
 elif $PERL -e 'eval require Test::More;' > /dev/null 2>&1; then
   for f in $samba4srcdir/pidl/tests/*.pl; do
-     plantest "pidl/`basename $f`" none $PERL $f "|" $samba4srcdir/script/harness2subunit.pl
+     plantest "pidl.`basename $f .pl`" none $PERL $f "|" $samba4srcdir/script/harness2subunit.pl
   done
 else 
    echo "Skipping pidl tests - Test::More not installed"
@@ -241,10 +246,6 @@ DATADIR=$samba4srcdir/../testdata
 plantest "parse samba3" none $samba4bindir/smbscript $DATADIR/samba3/verify $CONFIGURATION $DATADIR/samba3
 plantest "js.samba3sam" none $SCRIPTDIR/samba3sam.js $CONFIGURATION `pwd` $DATADIR/samba3/
 
-rm -rf $PREFIX/upgrade
-mkdir -p $PREFIX/upgrade
-#plantest "upgrade" none $samba4bindir/smbscript setup/upgrade $CONFIGURATION --verify --targetdir=$PREFIX ../testdata/samba3 ../testdata/samba3/smb.conf
-
 # Domain Member Tests
 
 plantest "RPC-ECHO against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" RPC-ECHO "$*"
@@ -279,26 +280,33 @@ for env in dc member; do
        done
 done
 
-# Tests for SWIG
-# export PYTHONPATH=lib/tdb/swig:lib/ldb/swig:scripting/swig:$PYTHONPATH
-# export LD_LIBRARY_PATH=bin:$LD_LIBRARY_PATH
-
-# plantest "tdb wrappers" scripting/swig/torture/torture_tdb.py
-# plantest "ldb wrappers" scripting/swig/torture/torture_ldb.py
-
 if test -f $samba4bindir/nsstest 
 then
        plantest "NSS-TEST using winbind" member $VALGRIND $samba4bindir/nsstest $samba4bindir/shared/libnss_winbind.so
 fi
 
 # if python is available, run the python tests:
-if which python 2>/dev/null >/dev/null
+if test -f $samba4bindir/smbpython
 then
-       plantest "ldb.python" none PYTHONPATH=bin/python:scripting/python:lib/ldb/tests/python/ scripting/bin/subunitrun api
-       plantest "credentials.python" none PYTHONPATH=bin/python:scripting/python:auth/credentials/tests scripting/bin/subunitrun bindings
-       plantest "registry.python" none PYTHONPATH=bin/python:scripting/python:lib/registry/tests/ scripting/bin/subunitrun bindings
-       plantest "tdb.python" none PYTHONPATH=bin/python:scripting/python:lib/tdb/python/tests scripting/bin/subunitrun simple
-       plantest "auth.python" none PYTHONPATH=bin/python:scripting/python:auth/tests/ scripting/bin/subunitrun bindings
-       plantest "security.python" none PYTHONPATH=bin/python:scripting/python:libcli/security/tests/ scripting/bin/subunitrun bindings
-       plantest "param.python" none PYTHONPATH=bin/python:scripting/python:param/tests scripting/bin/subunitrun bindings
+       PYTHON=bin/smbpython
+       SUBUNITRUN="$PYTHON ./scripting/bin/subunitrun"
+       plantest "ldb.python" none PYTHONPATH="$PYTHONPATH:lib/ldb/tests/python/" $SUBUNITRUN api
+       plantest "credentials.python" none PYTHONPATH="$PYTHONPATH:auth/credentials/tests" $SUBUNITRUN bindings
+       plantest "registry.python" none PYTHONPATH="$PYTHONPATH:lib/registry/tests/" $SUBUNITRUN bindings
+       plantest "tdb.python" none PYTHONPATH="$PYTHONPATH:lib/tdb/python/tests" $SUBUNITRUN simple
+       plantest "auth.python" none PYTHONPATH="$PYTHONPATH:auth/tests/" $SUBUNITRUN bindings
+       plantest "security.python" none PYTHONPATH="$PYTHONPATH:libcli/security/tests" $SUBUNITRUN bindings
+       plantest "param.python" none PYTHONPATH="$PYTHONPATH:param/tests" $SUBUNITRUN bindings
+       plantest "upgrade.python" none $SUBUNITRUN samba.tests.upgrade
+       plantest "samba.python" none $SUBUNITRUN samba.tests
+       plantest "provision.python" none $SUBUNITRUN samba.tests.provision
+       plantest "samba3.python" none $SUBUNITRUN samba.tests.samba3
+       plantest "events.python" none PYTHONPATH="$PYTHONPATH:lib/events" $SUBUNITRUN tests
+       plantest "samba3sam.python" none PYTHONPATH="$PYTHONPATH:dsdb/samdb/ldb_modules/tests" $SUBUNITRUN samba3sam
+       plantest "ldap.python" dc $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap.py \$SERVER -U\$USERNAME%\$PASSWORD
+       plantest "blackbox.samba3dump" none $PYTHON scripting/bin/samba3dump $samba4srcdir/../testdata/samba3
+       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 --targetdir=$PREFIX/provision
 fi