summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-09-16 00:01:51 +0000
committerJelmer Vernooij <jelmer@samba.org>2010-09-16 00:15:29 +0000
commitbad0041390da289f6cfad3a44f702998291edd8c (patch)
tree0f3b066ec1815b5c8b365b5c10fe62e5ea0abdb2 /source3
parentcd56e40117c542fd90362abe8130f7f8d8ee02e3 (diff)
downloadsamba-bad0041390da289f6cfad3a44f702998291edd8c.tar.gz
samba-bad0041390da289f6cfad3a44f702998291edd8c.tar.bz2
samba-bad0041390da289f6cfad3a44f702998291edd8c.zip
s3-selftest: Move Samba3-specific script to source3/selftest.
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in2
-rwxr-xr-xsource3/selftest/s3-selftest.sh44
2 files changed, 45 insertions, 1 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 863274575a..0046a1805f 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -3377,7 +3377,7 @@ test:: all torture timelimit
SOURCEDIR="$(srcdir)" \
RUN_FROM_BUILD_FARM="$(RUN_FROM_BUILD_FARM)" \
PERL="$(PERL)" PYTHON="$(PYTHON)" \
- $(selftestdir)/s3-selftest.sh
+ $(srcdir)/selftest/s3-selftest.sh
test-%:
$(MAKE) test TESTS=$*
diff --git a/source3/selftest/s3-selftest.sh b/source3/selftest/s3-selftest.sh
new file mode 100755
index 0000000000..86e4b75865
--- /dev/null
+++ b/source3/selftest/s3-selftest.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+FILTER_XFAIL="${PYTHON} -u ${SELFTESTDIR}/filter-subunit --expected-failures=${SOURCEDIR}/selftest/knownfail"
+SUBUNIT_FORMATTER="${PYTHON} -u ${SELFTESTDIR}/format-subunit --prefix=${SELFTESTPREFIX} --immediate"
+
+cleanup_and_exit() {
+ if test "$1" = 0 -o -z "$1"; then
+ exit 0
+ else
+ exit $1
+ fi
+}
+
+st_test_done() {
+ test -f ${SELFTESTPREFIX}/st_done || { echo "SELFTEST FAILED"; cleanup_and_exit 1; }
+}
+
+if [ "x${RUN_FROM_BUILD_FARM}" = "xyes" ]; then
+ ( rm -f ${SELFTESTPREFIX}/st_done && \
+ ${PERL} ${SELFTESTDIR}/selftest.pl \
+ --prefix=${SELFTESTPREFIX} --target=samba3 \
+ --testlist="${SOURCEDIR}/selftest/tests.sh|" \
+ --exclude=${SOURCEDIR}/selftest/skip \
+ --socket-wrapper ${TESTS} \
+ && touch ${SELFTESTPREFIX}/st_done ) | \
+ ${FILTER_XFAIL} --strip-passed-output
+ EXIT_STATUS=$?
+
+ st_test_done
+else
+ ( rm -f ${SELFTESTPREFIX}/st_done && \
+ ${PERL} ${SELFTESTDIR}/selftest.pl \
+ --prefix=${SELFTESTPREFIX} --target=samba3 \
+ --testlist="${SOURCEDIR}/selftest/tests.sh|" \
+ --exclude=${SOURCEDIR}/selftest/skip \
+ --socket-wrapper ${TESTS} \
+ && touch ${SELFTESTPREFIX}/st_done ) | \
+ ${FILTER_XFAIL} | ${SUBUNIT_FORMATTER}
+ EXIT_STATUS=$?
+
+ st_test_done
+fi
+
+cleanup_and_exit ${EXIT_STATUS}