+# 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.
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.
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;
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();
}
delete $running_envs{$envname};
}
-
if ($opt_no_lazy_setup) {
setup_env($_) foreach (keys %required_envs);
}