2010-08-25 13:17:33 +04:00
#!/bin/sh
2011-12-04 03:23:02 +04:00
FILTER_XFAIL = " ${ PYTHON } -u ${ SELFTESTDIR } /filter-subunit --expected-failures= ${ SELFTESTDIR } /knownfail --flapping= ${ SELFTESTDIR } /flapping "
2010-10-01 15:30:01 +04:00
if [ " x ${ SUBUNIT_FORMATTER } " = x"" ] ; then
SUBUNIT_FORMATTER = " ${ PYTHON } -u ${ SELFTESTDIR } /format-subunit --prefix= ${ SELFTESTPREFIX } --immediate "
fi
2010-08-25 13:17:33 +04:00
2012-03-14 15:18:50 +04:00
if [ x" ${ FAIL_IMMEDIATELY } " != x"" ] ; then
FILTER_XFAIL = " ${ FILTER_XFAIL } --fail-immediately "
fi
2010-08-25 13:17:33 +04:00
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 \
2011-04-15 10:39:53 +04:00
--binary-mapping= smbtorture3:smbtorture,nmblookup3:nmblookup,smbclient3:smbclient,ntlm_auth3:ntlm_auth \
2011-04-15 06:41:22 +04:00
--prefix= ${ SELFTESTPREFIX } --target= samba3 \
2011-02-21 08:01:44 +03:00
--testlist= " ${ PYTHON } ${ SOURCEDIR } /selftest/tests.py| " \
2011-10-26 06:38:15 +04:00
--exclude= ${ SELFTESTDIR } /skip \
2011-02-22 03:56:18 +03:00
--srcdir= " ${ SOURCEDIR } /.. " \
2010-08-25 13:17:33 +04:00
--socket-wrapper ${ TESTS } \
&& touch ${ SELFTESTPREFIX } /st_done ) | \
${ FILTER_XFAIL } --strip-passed-output
2010-08-26 13:41:05 +04:00
EXIT_STATUS = $?
2010-08-25 13:17:33 +04:00
st_test_done
else
( rm -f ${ SELFTESTPREFIX } /st_done && \
${ PERL } ${ SELFTESTDIR } /selftest.pl \
2011-04-15 10:39:53 +04:00
--binary-mapping= smbtorture3:smbtorture,nmblookup3:nmblookup,smbclient3:smbclient,ntlm_auth3:ntlm_auth \
2011-04-15 06:41:22 +04:00
--prefix= ${ SELFTESTPREFIX } --target= samba3 \
2011-02-21 08:01:44 +03:00
--testlist= " ${ PYTHON } ${ SOURCEDIR } /selftest/tests.py| " \
2011-10-26 06:38:15 +04:00
--exclude= ${ SELFTESTDIR } /skip \
2011-02-22 03:56:18 +03:00
--srcdir= " ${ SOURCEDIR } /.. " \
2010-08-25 13:17:33 +04:00
--socket-wrapper ${ TESTS } \
&& touch ${ SELFTESTPREFIX } /st_done ) | \
2010-09-08 19:56:33 +04:00
${ FILTER_XFAIL } | ${ SUBUNIT_FORMATTER }
2010-08-26 13:41:05 +04:00
EXIT_STATUS = $?
2010-08-25 13:17:33 +04:00
st_test_done
fi
2010-08-26 13:41:05 +04:00
cleanup_and_exit ${ EXIT_STATUS }