diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-16 17:40:25 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-01-16 17:58:50 +0100 |
commit | a760146e73ea0f6bb30f01276f3756d97644722c (patch) | |
tree | 0043c502bc4abc6aea95dd580c7a2cd4daf5fb44 /source4/selftest | |
parent | fa6ce1e4a9d285c82faed49a09bb2bd297bbea39 (diff) | |
download | samba-a760146e73ea0f6bb30f01276f3756d97644722c.tar.gz samba-a760146e73ea0f6bb30f01276f3756d97644722c.tar.bz2 samba-a760146e73ea0f6bb30f01276f3756d97644722c.zip |
selftest: Add some more documentation. Rename env => target to avoid confusion.
(This used to be commit 50b8a16d0cb5e1c4352e73900d1e98a812340cca)
Diffstat (limited to 'source4/selftest')
-rw-r--r-- | source4/selftest/README | 17 | ||||
-rwxr-xr-x | source4/selftest/selftest.pl | 9 | ||||
-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) | 0 | ||||
-rw-r--r-- | source4/selftest/target/Windows.pm (renamed from source4/selftest/env/Windows.pm) | 0 |
5 files changed, 21 insertions, 5 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/selftest.pl b/source4/selftest/selftest.pl index 96409558b1..46c3846b54 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"; + use 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"; + use 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"; + use 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 87a86ef06f..87a86ef06f 100644 --- a/source4/selftest/env/Samba4.pm +++ b/source4/selftest/target/Samba4.pm 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 |