Make the posix ACL module cope with a NULL incoming DACL and a
[Samba/vl.git] / source3 / selftest / s3-selftest.sh
blob6105ff466065d2c494d782f66cdd347c6db816a4
1 #!/bin/sh
3 FILTER_XFAIL="${PYTHON} -u ${SELFTESTDIR}/filter-subunit --expected-failures=${SOURCEDIR}/selftest/knownfail"
4 if [ "x${SUBUNIT_FORMATTER}" = x"" ]; then
5 SUBUNIT_FORMATTER="${PYTHON} -u ${SELFTESTDIR}/format-subunit --prefix=${SELFTESTPREFIX} --immediate"
6 fi
8 cleanup_and_exit() {
9 if test "$1" = 0 -o -z "$1"; then
10 exit 0
11 else
12 exit $1
16 st_test_done() {
17 test -f ${SELFTESTPREFIX}/st_done || { echo "SELFTEST FAILED"; cleanup_and_exit 1; }
20 if [ "x${RUN_FROM_BUILD_FARM}" = "xyes" ]; then
21 ( rm -f ${SELFTESTPREFIX}/st_done && \
22 ${PERL} ${SELFTESTDIR}/selftest.pl \
23 --prefix=${SELFTESTPREFIX} --target=samba3 \
24 --testlist="${SOURCEDIR}/selftest/tests.sh|" \
25 --exclude=${SOURCEDIR}/selftest/skip \
26 --socket-wrapper ${TESTS} \
27 && touch ${SELFTESTPREFIX}/st_done ) | \
28 ${FILTER_XFAIL} --strip-passed-output
29 EXIT_STATUS=$?
31 st_test_done
32 else
33 ( rm -f ${SELFTESTPREFIX}/st_done && \
34 ${PERL} ${SELFTESTDIR}/selftest.pl \
35 --prefix=${SELFTESTPREFIX} --target=samba3 \
36 --testlist="${SOURCEDIR}/selftest/tests.sh|" \
37 --exclude=${SOURCEDIR}/selftest/skip \
38 --socket-wrapper ${TESTS} \
39 && touch ${SELFTESTPREFIX}/st_done ) | \
40 ${FILTER_XFAIL} | ${SUBUNIT_FORMATTER}
41 EXIT_STATUS=$?
43 st_test_done
46 cleanup_and_exit ${EXIT_STATUS}