#!/usr/bin/perl
# Bootstrap Samba and run a number of tests against it.
-# Copyright (C) 2005-2007 Jelmer Vernooij <jelmer@samba.org>
+# Copyright (C) 2005-2008 Jelmer Vernooij <jelmer@samba.org>
# Published under the GNU GPL, v3 or later.
=pod
my @opt_exclude = ();
my @opt_include = ();
my $opt_verbose = 0;
+my $opt_image = undef;
my $opt_testenv = 0;
my $ldap = undef;
my $opt_analyse_cmd = undef;
--bindir=PATH path to binaries
Kvm Specific:
- --image=PATH path to KVM image
+ --image=PATH path to KVM image
Behaviour:
--quick run quick overall test
require target::Windows;
$target = new Windows();
} elsif ($opt_target eq "kvm") {
+ die("Kvm tests will not run with socket wrapper enabled.")
+ if ($opt_socket_wrapper);
require target::Kvm;
die("No image specified") unless ($opt_image);
- $target = new Kvm($opt_image);
+ $target = new Kvm($opt_image, undef);
+}
+
+#
+# Start a Virtual Distributed Ethernet Switch
+# Returns the pid of the switch.
+#
+sub start_vde_switch($)
+{
+ my ($path) = @_;
+
+ system("vde_switch --pidfile $path/vde.pid --sock $path/vde.sock --daemon");
+
+ open(PID, "$path/vde.pid");
+ <PID> =~ /([0-9]+)/;
+ my $pid = $1;
+ close(PID);
+
+ return $pid;
+}
+
+# Stop a Virtual Distributed Ethernet Switch
+sub stop_vde_switch($)
+{
+ my ($pid) = @_;
+ kill 9, $pid;
}
sub read_test_regexes($)
if (defined($vars->{WINBINDD_SOCKET_DIR})) {
print CF "\twinbindd socket directory = $vars->{WINBINDD_SOCKET_DIR}\n";
}
+ if ($opt_socket_wrapper) {
+ print CF "\tinterfaces = $interfaces\n";
+ }
print CF "
private dir = $prefix_abs/client/private
js include = $srcdir_abs/scripting/libjs
name resolve order = bcast
- interfaces = $interfaces
panic action = $srcdir_abs/script/gdb_backtrace \%PID\% \%PROG\%
max xmit = 32K
notify:inotify = false