------------------------------------------------------------
revno: 11297
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: 4.0-perlselftest
timestamp: Fri 2007-01-26 10:23:23 +0100
message:
  Update documentation, make prefix an option
modified:
  source/main.mk                 svn-v2:[EMAIL PROTECTED]
  source/script/tests/selftest.pl svn-v2:[EMAIL PROTECTED]
=== modified file 'source/main.mk'
--- a/source/main.mk    2007-01-22 22:55:34 +0000
+++ b/source/main.mk    2007-01-26 09:23:23 +0000
@@ -287,7 +287,7 @@
 test: $(DEFAULT_TEST_TARGET)
 
 SELFTEST = builddir=$(builddir) srcdir=$(srcdir) \
-           $(srcdir)/script/tests/selftest.pl ${selftest_prefix}
+           $(srcdir)/script/tests/selftest.pl --prefix=${selftest_prefix}
 
 test-swrap: all libraries
        $(SELFTEST) --socket-wrapper

=== modified file 'source/script/tests/selftest.pl'
--- a/source/script/tests/selftest.pl   2007-01-26 01:08:57 +0000
+++ b/source/script/tests/selftest.pl   2007-01-26 09:23:23 +0000
@@ -13,7 +13,7 @@
 
 selftest --help
 
-selftest [--target=samba4|samba3|win] [--socket-wrapper] [--quick] [--one] 
PREFIX
+selftest [--target=samba4|samba3|win] [--socket-wrapper] [--quick] [--one] 
[--prefix=prefix] [--immediate]
 
 =head1 DESCRIPTION
 
@@ -26,6 +26,14 @@
 =item I<--help>
 
 Show list of available options.
+
+=item I<--prefix=dir>
+
+Change directory to run tests in. Default is 'st'.
+
+=item I<--immediate>
+
+Show errors as soon as they happen rather than at the end of the test run.
                
 =item I<--target samba4|samba3|win>
 
@@ -44,6 +52,15 @@
 Will prevent TCP and UDP ports being opened on the local host but 
 (transparently) redirects these calls to use unix domain sockets.
 
+=item I<--expected-failures>
+
+Specify a file containing a list of tests that are expected to fail. Failures 
for 
+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
+
 =item I<--one>
 
 Abort as soon as one test fails.
@@ -94,6 +111,7 @@
 my $opt_one = 0;
 my $opt_immediate = 0;
 my $opt_expected_failures = undef;
+my $prefix = "st";
 
 sub slapd_start($$) {
        my ($conf, $uri) = @_;
@@ -254,6 +272,7 @@
 
 Generic options:
  --help                     this help page
+ --prefix=DIR                          prefix to run tests in [st]
  --target=samba4|samba3|win Samba version to target
  --socket-wrapper           enable socket wrapper
  --quick                    run quick overall test
@@ -268,6 +287,7 @@
 my $result = GetOptions (
            'help|h|?' => \$opt_help,
                'target=s' => \$opt_target,
+               'prefix=s' => \$prefix,
                'socket-wrapper' => \$opt_socket_wrapper,
                'quick' => \$opt_quick,
                'one' => \$opt_one,
@@ -280,9 +300,6 @@
 }
 
 ShowHelp() if ($opt_help);
-ShowHelp() if ($#ARGV < 0);
-
-my $prefix = shift;
 
 my $torture_maxtime = $ENV{TORTURE_MAXTIME};
 unless (defined($torture_maxtime)) {

Reply via email to