summaryrefslogtreecommitdiff
path: root/source3/selftest
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-19 14:56:29 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-19 14:56:29 +0200
commit86576f0f1627bf799e422d16baac5a7057de0316 (patch)
treecefd60815b763cdf64d6fa9836f3b6da8098a1e9 /source3/selftest
parent085e7b0b6cc882b31c11b6d6ea7834235588e1ed (diff)
downloadsamba-86576f0f1627bf799e422d16baac5a7057de0316.tar.gz
Add 'selftest' target to Samba 3 that uses the perl selftest code.
Diffstat (limited to 'source3/selftest')
-rw-r--r--source3/selftest/knownfail0
-rw-r--r--source3/selftest/quick0
-rw-r--r--source3/selftest/skip0
-rw-r--r--source3/selftest/slow0
-rwxr-xr-xsource3/selftest/tests.sh52
5 files changed, 52 insertions, 0 deletions
diff --git a/source3/selftest/knownfail b/source3/selftest/knownfail
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/source3/selftest/knownfail
diff --git a/source3/selftest/quick b/source3/selftest/quick
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/source3/selftest/quick
diff --git a/source3/selftest/skip b/source3/selftest/skip
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/source3/selftest/skip
diff --git a/source3/selftest/slow b/source3/selftest/slow
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/source3/selftest/slow
diff --git a/source3/selftest/tests.sh b/source3/selftest/tests.sh
new file mode 100755
index 00000000000..3ded5686c28
--- /dev/null
+++ b/source3/selftest/tests.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+# This script generates a list of testsuites that should be run as part of
+# the Samba 3 test suite.
+
+# The output of this script is parsed by selftest.pl, which then decides
+# which of the tests to actually run. It will, for example, skip all tests
+# listed in selftest/skip or only run a subset during "make quicktest".
+
+# The idea is that this script outputs all of the tests of Samba 3, not
+# just those that are known to pass, and list those that should be skipped
+# or are known to fail in selftest/skip or selftest/samba4-knownfail. This makes it
+# very easy to see what functionality is still missing in Samba 3 and makes
+# it possible to run the testsuite against other servers, such as Samba 4 or
+# Windows that have a different set of features.
+
+# The syntax for a testsuite is "-- TEST --" on a single line, followed
+# by the name of the test, the environment it needs and the command to run, all
+# three separated by newlines. All other lines in the output are considered
+# comments.
+
+if [ ! -n "$PERL" ]
+then
+ PERL=perl
+fi
+
+plantest() {
+ name=$1
+ env=$2
+ shift 2
+ cmdline="$*"
+ echo "-- TEST --"
+ if [ "$env" = "none" ]; then
+ echo "samba3.$name"
+ else
+ echo "samba3.$name ($env)"
+ fi
+ echo $env
+ echo $cmdline
+}
+
+normalize_testname() {
+ name=$1
+ shift 1
+ echo $name | tr "A-Z-" "a-z."
+}
+
+BINDIR=`dirname $0`/../bin
+
+plantest "talloctort" none $VALGRIND $BINDIR/talloctort
+plantest "replacetort" none $VALGRIND $BINDIR/replacetort
+plantest "tdbtorture" none $VALGRIND $BINDIR/tdbtorture
+plantest "smbconftort" none $VALGRIND $BINDIR/smbconftort $CONFIGURATION