summaryrefslogtreecommitdiff
path: root/source4/script/tests/Windows.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-03-21 15:57:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:37 -0500
commit2fca3f9082a70e1f153f6c9f195d95b0d48e363d (patch)
tree57146b03e224aede0bd6495beb3d5d717d424930 /source4/script/tests/Windows.pm
parente2f26316cdeba1875be2cd583870ac6127c2be56 (diff)
downloadsamba-2fca3f9082a70e1f153f6c9f195d95b0d48e363d.tar.gz
samba-2fca3f9082a70e1f153f6c9f195d95b0d48e363d.tar.bz2
samba-2fca3f9082a70e1f153f6c9f195d95b0d48e363d.zip
r21909: Merge some of my recent improvements to the test infrastructure:
- Allow tests to specify what environment they need to run in (dc and none are thecurrent supported ones). - Move more Samba4-specific code out of the common code (This used to be commit dbe9de10287c902f4a5ea5d431dea4a79f9b170b)
Diffstat (limited to 'source4/script/tests/Windows.pm')
-rw-r--r--source4/script/tests/Windows.pm40
1 files changed, 40 insertions, 0 deletions
diff --git a/source4/script/tests/Windows.pm b/source4/script/tests/Windows.pm
new file mode 100644
index 0000000000..710ffeda14
--- /dev/null
+++ b/source4/script/tests/Windows.pm
@@ -0,0 +1,40 @@
+#!/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 Windows;
+
+use strict;
+use FindBin qw($RealBin);
+use POSIX;
+
+sub new($)
+{
+ my ($classname) = @_;
+ my $self = { };
+ bless $self;
+ return $self;
+}
+
+sub provision($$$)
+{
+ my ($self, $environment, $prefix) = @_;
+
+ die ("Windows tests will not run without root privileges.")
+ if (`whoami` ne "root");
+
+ die("Environment variable WINTESTCONF has not been defined.\n".
+ "Windows tests will not run unconfigured.") if (not defined($ENV{WINTESTCONF}));
+
+ die ("$ENV{WINTESTCONF} could not be read.") if (! -r $ENV{WINTESTCONF});
+
+ $ENV{WINTEST_DIR}="$ENV{SRCDIR}/script/tests/win";
+}
+
+sub setup_env($$)
+{
+ my ($self, $name) = @_;
+}
+
+1;