TESTSUITE-NAME/TEST-NAME
+=item I<--skip>
+
+Specify a file containing a list of tests that should be skipped. Possible candidates are
+tests that segfault the server, flip or don't end.
+
=item I<--one>
Abort as soon as one test fails.
my $opt_one = 0;
my $opt_immediate = 0;
my $opt_expected_failures = undef;
+my $opt_skip = undef;
my $opt_verbose = 0;
my $srcdir = ".";
my $suitesfailed = [];
my $start = time();
my @expected_failures = ();
+my @skips = ();
my $statistics = {
SUITES_FAIL => 0,
SUITES_OK => 0,
+ SUITES_SKIPPED => 0,
TESTS_UNEXPECTED_OK => 0,
TESTS_EXPECTED_OK => 0,
{
my $fullname = shift;
- foreach (@expected_failures) {
- return 1 if $fullname =~ /^$_$/;
- }
+ return 1 if (grep(/^$fullname$/, @expected_failures));
return 0;
}
+sub skip($)
+{
+ my $fullname = shift;
+
+ return 1 if (grep(/^$fullname$/, @skips));
+ return 0;
+}
+
sub run_test_buildfarm($$$$)
{
my ($name, $cmd, $i, $suitestotal) = @_;
'one' => \$opt_one,
'immediate' => \$opt_immediate,
'expected-failures=s' => \$opt_expected_failures,
+ 'skip=s' => \$opt_skip,
'srcdir=s' => \$srcdir,
'builddir=s' => \$builddir,
'verbose' => \$opt_verbose
close(KNOWN);
}
+if (defined($opt_skip)) {
+ open(SKIP, "<$opt_skip") or die("unable to read skip file: $!");
+ while (<SKIP>) {
+ chomp;
+ s/([ \t]+)\#(.*)$//;
+ push (@skips, $_); }
+ close(SKIP);
+}
+
my $test_fifo = "$prefix/smbd_test.fifo";
$ENV{SMBD_TEST_FIFO} = $test_fifo;
my $cmd = $$_[1];
$cmd =~ s/([\(\)])/\\$1/g;
my $name = $$_[0];
+
+ if (skip($name)) {
+ print "SKIPPED: $name\n";
+ $statistics->{SUITES_SKIPPED}++;
+ next;
+ }
+
if ($from_build_farm) {
run_test_buildfarm($name, $cmd, $i, $suitestotal);
} else {
# the local tests don't need smbd
SMBD_TEST_FIFO=""
export SMBD_TEST_FIFO
-skipped="LOCAL-RESOLVE"
-
-echo "WARNING: Skipping $skipped"
failed=0
for t in $local_tests; do
- skip=0
- for s in $skipped; do
- if [ x"$s" = x"$t" ]; then
- skip=1;
- break;
- fi
- done
- if [ $skip = 1 ]; then
- continue;
- fi
-
- name="$t"
- testit "$name" $VALGRIND bin/smbtorture $TORTURE_OPTIONS ncalrpc: $t "$*"
+ testit "$t" $VALGRIND bin/smbtorture $TORTURE_OPTIONS ncalrpc: $t "$*"
done
testok $0 $failed
base=`bin/smbtorture --list | grep "^BASE-" | xargs`
tests="$base $raw $smb2"
-#
-# please add tests you want to be skipped here!
-#
-skipped="BASE-CHARSET BASE-DEFER_OPEN BASE-DELAYWRITE RAW-COMPOSITE RAW-OPLOCK BASE-IOMETER"
-skipped="$skipped BASE-SAMBA3ERROR BASE-CASETABLE BASE-NTTRANS BASE-BENCH-HOLDCON BASE-SCAN-MAXFID"
-skipped="$skipped RAW-BENCH-OPLOCK RAW-SAMBA3HIDE RAW-SAMBA3CLOSEERR RAW-SAMBA3CHECKFSP RAW-SAMBA3BADPATH"
-skipped="$skipped RAW-SCAN-EAMAX SMB2-LOCK SMB2-NOTIFY"
-
-echo "WARNING: Skipping tests $skipped"
-
-failed=0
for t in $tests; do
if [ ! -z "$start" -a "$start" != $t ]; then
continue;
fi
- skip=0
- for s in $skipped; do
- if [ x"$s" = x"$t" ]; then
- skip=1;
- break;
- fi
- done
- if [ $skip = 1 ]; then
- continue;
- fi
start=""
- name="$t"
- testit "$name" $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t
+ testit "$t" $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t
done
-
-testok $0 $failed