summaryrefslogtreecommitdiff
path: root/source4/selftest
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-22 16:39:56 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-22 16:39:56 +0100
commit4075a2ba982ea56ff925e0a33839f0760fd71911 (patch)
tree87d87734257f814b7960a843e54455c447f34a9e /source4/selftest
parent24da29746998de1001d18871dcbe8d37643667d5 (diff)
parent35c68316442808a135aafa864d19592108a4d879 (diff)
downloadsamba-4075a2ba982ea56ff925e0a33839f0760fd71911.tar.gz
samba-4075a2ba982ea56ff925e0a33839f0760fd71911.tar.bz2
samba-4075a2ba982ea56ff925e0a33839f0760fd71911.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-python
(This used to be commit 2f57e25f8f692889d9e057e13256f8a24c5ec10c)
Diffstat (limited to 'source4/selftest')
-rw-r--r--source4/selftest/README17
-rwxr-xr-xsource4/selftest/samba4_tests.sh5
-rwxr-xr-xsource4/selftest/selftest.pl9
-rw-r--r--source4/selftest/target/Samba3.pm (renamed from source4/selftest/env/Samba3.pm)0
-rw-r--r--source4/selftest/target/Samba4.pm (renamed from source4/selftest/env/Samba4.pm)8
-rw-r--r--source4/selftest/target/Windows.pm (renamed from source4/selftest/env/Windows.pm)0
6 files changed, 32 insertions, 7 deletions
diff --git a/source4/selftest/README b/source4/selftest/README
index a0afda3d19..3250f32ec7 100644
--- a/source4/selftest/README
+++ b/source4/selftest/README
@@ -1,6 +1,23 @@
+# vim: ft=rst
+
This directory contains test scripts that are useful for running a
bunch of tests all at once.
+===============
+Available tests
+===============
+The available tests are obtained from a script, usually
+selftest/samba{3,4}_tests.sh. This script should for each test output
+the name of the test, the command to run and the environment that should be
+provided.
+
+============
+Environments
+============
+Tests often need to run against a server with particular things set up,
+a "environment". This environment is provided by the test "target": Samba 3,
+Samba 4 or Windows.
+
The following environments are currently available:
- none: No server set up, no variables set.
diff --git a/source4/selftest/samba4_tests.sh b/source4/selftest/samba4_tests.sh
index 290c06fa6a..2068a971ca 100755
--- a/source4/selftest/samba4_tests.sh
+++ b/source4/selftest/samba4_tests.sh
@@ -320,9 +320,12 @@ then
plantest "samba.python" none $SUBUNITRUN samba.tests
plantest "provision.python" none $SUBUNITRUN samba.tests.provision
plantest "samba3.python" none $SUBUNITRUN samba.tests.samba3
+ plantest "samr.python" dc $SUBUNITRUN samba.tests.dcerpc.sam
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 "rpcecho.python" dc $SUBUNITRUN samba.tests.dcerpc.rpcecho
+ plantest "winreg.python" dc $SUBUNITRUN samba.tests.dcerpc.registry
+ plantest "ldap.python" dc $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
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
diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl
index 96409558b1..004332a1fc 100755
--- a/source4/selftest/selftest.pl
+++ b/source4/selftest/selftest.pl
@@ -67,7 +67,7 @@ these tests will be counted as successes, successes will be counted as failures.
The format for the file is, one entry per line:
-TESTSUITE-NAME/TEST-NAME
+TESTSUITE-NAME.TEST-NAME
The reason for a test can also be specified, by adding a hash sign (#) and the reason
after the test name.
@@ -130,9 +130,6 @@ use POSIX;
use Cwd qw(abs_path);
use lib "$RealBin";
use Subunit qw(parse_results);
-use env::Samba3;
-use env::Samba4;
-use env::Windows;
use SocketWrapper;
my $opt_help = 0;
@@ -429,17 +426,20 @@ my $testenv_default = "none";
if ($opt_target eq "samba4") {
$testenv_default = "member";
+ require target::Samba4;
$target = new Samba4($opt_bindir or "$srcdir/bin", $ldap, "$srcdir/setup");
} elsif ($opt_target eq "samba3") {
if ($opt_socket_wrapper and `$opt_bindir/smbd -b | grep SOCKET_WRAPPER` eq "") {
die("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting....");
}
$testenv_default = "dc";
+ require target::Samba3;
$target = new Samba3($opt_bindir);
} elsif ($opt_target eq "win") {
die("Windows tests will not run with socket wrapper enabled.")
if ($opt_socket_wrapper);
$testenv_default = "dc";
+ require target::Windows;
$target = new Windows();
}
@@ -741,7 +741,6 @@ sub teardown_env($)
delete $running_envs{$envname};
}
-
if ($opt_no_lazy_setup) {
setup_env($_) foreach (keys %required_envs);
}
diff --git a/source4/selftest/env/Samba3.pm b/source4/selftest/target/Samba3.pm
index b0c4eb22bd..b0c4eb22bd 100644
--- a/source4/selftest/env/Samba3.pm
+++ b/source4/selftest/target/Samba3.pm
diff --git a/source4/selftest/env/Samba4.pm b/source4/selftest/target/Samba4.pm
index aacf3c3802..fba0f6a6f8 100644
--- a/source4/selftest/env/Samba4.pm
+++ b/source4/selftest/target/Samba4.pm
@@ -244,6 +244,7 @@ sub mk_openldap($$$)
modulepath $olroot/libexec/openldap
moduleload syncprov
moduleload memberof
+moduleload refint
";
close(CONF);
}
@@ -255,6 +256,7 @@ modulepath $olroot/libexec/openldap
moduleload back_hdb
moduleload syncprov
moduleload memberof
+moduleload refint
";
close(CONF);
}
@@ -266,6 +268,7 @@ moduleload memberof
moduleload back_hdb
moduleload syncprov
moduleload memberof
+moduleload refint
";
close(CONF);
}
@@ -278,6 +281,7 @@ modulepath /usr/lib/ldap
moduleload back_hdb
moduleload syncprov
moduleload memberof
+moduleload refint
";
close(CONF);
}
@@ -289,6 +293,7 @@ moduleload memberof
modulepath /usr/lib/openldap
moduleload syncprov
moduleload memberof
+moduleload refint
";
close(CONF);
}
@@ -300,6 +305,7 @@ moduleload memberof
modulepath /usr/lib64/openldap
moduleload syncprov
moduleload memberof
+moduleload refint
";
close(CONF);
}
@@ -712,7 +718,7 @@ nogroup:x:65534:nobody
} elsif ($self->{ldap} eq "fedora-ds") {
($ret->{FEDORA_DS_DIR}, $ret->{FEDORA_DS_PIDFILE}) = $self->mk_fedora_ds($ldapdir, $configuration) or die("Unable to create fedora ds directories");
push (@provision_options, "--ldap-module=nsuniqueid");
- push (@provision_options, "--aci=aci:: KHRhcmdldGF0dHIgPSAiKiIpICh2ZXJzaW9uIDMuMDthY2wgImZ1bGwgYWNjZXNzIHRvIGFsbCBieSBhbGwiO2FsbG93IChhbGwpKHVzZXJkbiA9ICJsZGFwOi8vL2FueW9uZSIpOykK");
+ push (@provision_options, "'--aci=aci:: KHRhcmdldGF0dHIgPSAiKiIpICh2ZXJzaW9uIDMuMDthY2wgImZ1bGwgYWNjZXNzIHRvIGFsbCBieSBhbGwiO2FsbG93IChhbGwpKHVzZXJkbiA9ICJsZGFwOi8vL2FueW9uZSIpOykK'");
}
$self->slapd_start($ret) or
diff --git a/source4/selftest/env/Windows.pm b/source4/selftest/target/Windows.pm
index d0c90d7f7b..d0c90d7f7b 100644
--- a/source4/selftest/env/Windows.pm
+++ b/source4/selftest/target/Windows.pm