2007-12-20 17:54:00 +03:00
TEST_FORMAT = plain
2009-01-30 22:38:27 +03:00
SELFTEST = $( LD_LIBPATH_OVERRIDE) PYTHON = $( PYTHON) \
$( PERL) $( selftestdir) /selftest.pl --prefix= ${ selftest_prefix } \
2007-10-22 03:05:31 +04:00
--builddir= $( builddir) --srcdir= $( srcdir) \
2008-09-18 21:51:03 +04:00
--exclude= $( srcdir) /selftest/skip --testlist= "./selftest/tests.sh|" \
2007-10-22 03:05:31 +04:00
$( TEST_OPTIONS)
2008-09-18 21:51:03 +04:00
SELFTEST_NOSLOW_OPTS = --exclude= $( srcdir) /selftest/slow
2008-10-22 06:09:17 +04:00
SELFTEST_QUICK_OPTS = $( SELFTEST_NOSLOW_OPTS) --quick --include= $( srcdir) /selftest/quick
2009-06-05 15:16:46 +04:00
FILTER_XFAIL = $( PERL) $( selftestdir) /filter-subunit.pl --expected-failures= $( srcdir) /selftest/knownfail
2009-06-03 20:19:01 +04:00
FORMAT_TEST_OUTPUT = $( FILTER_XFAIL) | $( PERL) $( selftestdir) /format-subunit.pl --format= $( TEST_FORMAT)
subunittest :: everything
2009-06-04 15:49:11 +04:00
$( SELFTEST) --socket-wrapper $( TESTS)
2008-05-29 20:19:19 +04:00
slowtest :: everything
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( DEFAULT_TEST_OPTIONS) $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2007-10-22 03:05:31 +04:00
2008-05-29 20:19:19 +04:00
test :: everything
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) $( DEFAULT_TEST_OPTIONS) $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2008-05-29 20:19:19 +04:00
2008-02-19 05:29:03 +03:00
kvmtest :: everything
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) $( DEFAULT_TEST_OPTIONS) \
2009-06-03 19:23:09 +04:00
--target= kvm --image= $( KVM_IMAGE) | $( FORMAT_TEST_OUTPUT) --immediate
2008-02-19 05:29:03 +03:00
2008-02-19 17:12:57 +03:00
kvmquicktest :: everything
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( DEFAULT_TEST_OPTIONS) \
2009-06-03 19:23:09 +04:00
$( SELFTEST_QUICK_OPTS) --target= kvm --image= $( KVM_IMAGE) | $( FORMAT_TEST_OUTPUT) | $( FORMAT_TEST_OUTPUT) --immediate
2008-02-19 17:12:57 +03:00
2008-02-09 18:05:55 +03:00
testone :: everything
2009-06-03 19:23:09 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) $( DEFAULT_TEST_OPTIONS) --one $( TESTS) | $( FORMAT_TEST_OUTPUT)
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
test-swrap :: everything
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) --socket-wrapper $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
test-swrap-pcap :: everything
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) --socket-wrapper-pcap $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
test-swrap-keep-pcap :: everything
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) --socket-wrapper-keep-pcap $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
test-noswrap :: everything
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
quicktest :: all
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_QUICK_OPTS) --socket-wrapper $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
quicktestone :: all
2009-06-03 19:23:09 +04:00
$( SELFTEST) $( SELFTEST_QUICK_OPTS) --socket-wrapper --one $( TESTS) | $( FORMAT_TEST_OUTPUT)
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
testenv :: everything
2009-06-03 19:23:09 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv | $( FORMAT_TEST_OUTPUT)
2007-10-22 03:05:31 +04:00
2008-10-06 18:00:10 +04:00
testenv-% :: everything
2009-06-03 19:23:09 +04:00
SELFTEST_TESTENV = $* $( SELFTEST) $( SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv | $( FORMAT_TEST_OUTPUT)
2008-10-06 18:00:10 +04:00
2008-10-12 00:22:29 +04:00
test-% ::
$( MAKE) test TESTS = $*
2008-02-09 18:05:55 +03:00
valgrindtest :: valgrindtest -all
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
valgrindtest-quick :: all
2009-03-20 18:11:14 +03:00
SAMBA_VALGRIND = " xterm -n server -e $( selftestdir) /valgrind_run $( LD_LIBPATH_OVERRIDE) " \
2007-10-22 03:05:31 +04:00
VALGRIND = " valgrind -q --num-callers=30 --log-file= ${ selftest_prefix } /valgrind.log " \
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_QUICK_OPTS) --socket-wrapper $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
valgrindtest-all :: everything
2009-03-20 18:11:14 +03:00
SAMBA_VALGRIND = " xterm -n server -e $( selftestdir) /valgrind_run $( LD_LIBPATH_OVERRIDE) " \
2007-10-22 03:05:31 +04:00
VALGRIND = " valgrind -q --num-callers=30 --log-file= ${ selftest_prefix } /valgrind.log " \
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) --socket-wrapper $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
valgrindtest-env :: everything
2009-03-20 18:11:14 +03:00
SAMBA_VALGRIND = " xterm -n server -e $( selftestdir) /valgrind_run $( LD_LIBPATH_OVERRIDE) " \
2007-10-22 03:05:31 +04:00
VALGRIND = " valgrind -q --num-callers=30 --log-file= ${ selftest_prefix } /valgrind.log " \
2008-05-29 20:19:19 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
gdbtest :: gdbtest -all
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
gdbtest-quick :: all
2009-03-20 18:11:14 +03:00
SAMBA_VALGRIND = " xterm -n server -e $( selftestdir) /gdb_run $( LD_LIBPATH_OVERRIDE) " \
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_QUICK_OPTS) --socket-wrapper $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
gdbtest-all :: everything
2009-03-20 18:11:14 +03:00
SAMBA_VALGRIND = " xterm -n server -e $( selftestdir) /gdb_run $( LD_LIBPATH_OVERRIDE) " \
2009-06-04 15:49:11 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) --socket-wrapper $( TESTS) | $( FORMAT_TEST_OUTPUT) --immediate
2007-10-22 03:05:31 +04:00
2008-02-09 18:05:55 +03:00
gdbtest-env :: everything
2009-03-20 18:11:14 +03:00
SAMBA_VALGRIND = " xterm -n server -e $( selftestdir) /gdb_run $( LD_LIBPATH_OVERRIDE) " \
2008-07-15 09:01:43 +04:00
$( SELFTEST) $( SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
2008-10-28 14:20:59 +03:00