mirror of
https://github.com/samba-team/samba.git
synced 2025-11-07 12:23:51 +03:00
r21707: Finally merge my (long-living) perlselftest branch.
This changes the main selftest code to be in perl rather than in shell script. The selftest script is now no longer a black box but a regular executable that takes --help. This adds the following features: * "make test TESTS=foo" will run only the tests that match the regex "foo" * ability to deal with expected failures. the suite will not warn about tests that fail and are known to fail, but will warn about other failing tests and tests that are succeeding tests but incorrectly marked as failing. * ability to print a summary with all failures at the end of the run It also opens up the way to the following features, which I hope to implement later: * "environments", for example having a complete domains with DCs and domain members in a testenvironment * only set up smbd if necessary (not when running LOCAL tests, for example) * different mktestsetup scripts per target. except for the mktestsetup script, we can use the same infrastructure for samba 3 or windows.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
e4cf8f1dea
commit
38f867880b
34
source/script/tests/SocketWrapper.pm
Normal file
34
source/script/tests/SocketWrapper.pm
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/perl
|
||||
# Bootstrap Samba and run a number of tests against it.
|
||||
# Copyright (C) 2005-2007 Jelmer Vernooij <jelmer@samba.org>
|
||||
# Published under the GNU GPL, v3 or later.
|
||||
|
||||
package SocketWrapper;
|
||||
|
||||
use Exporter;
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT_OK = qw(setup_dir setup_pcap set_default_iface);
|
||||
|
||||
use strict;
|
||||
use FindBin qw($RealBin);
|
||||
|
||||
sub setup_dir($)
|
||||
{
|
||||
my ($dir) = @_;
|
||||
$ENV{SOCKET_WRAPPER_DIR} = $dir;
|
||||
return $dir;
|
||||
}
|
||||
|
||||
sub setup_pcap($)
|
||||
{
|
||||
my ($pcap_file) = @_;
|
||||
|
||||
}
|
||||
|
||||
sub set_default_iface($)
|
||||
{
|
||||
my ($i) = @_;
|
||||
$ENV{SOCKET_WRAPPER_DEFAULT_IFACE} = $i;
|
||||
}
|
||||
|
||||
1;
|
||||
Reference in New Issue
Block a user