diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-03-05 21:28:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:15 -0500 |
commit | 72d88d158a6e82392116bab09ce8704115072d07 (patch) | |
tree | 784921beb62ef9299515fb6910a3de3bff4ebbc0 /source4/main.mk | |
parent | d18afd6aeec0831a46d75470383e7eb7bdfd8de5 (diff) | |
download | samba-72d88d158a6e82392116bab09ce8704115072d07.tar.gz samba-72d88d158a6e82392116bab09ce8704115072d07.tar.xz samba-72d88d158a6e82392116bab09ce8704115072d07.zip |
r21707: Finally merge my (long-living) perlselftest branch.
This changes the main selftest code to be in perl rather than in shell script.
The selftest script is now no longer a black box but a regular executable that takes
--help.
This adds the following features:
* "make test TESTS=foo" will run only the tests that match the regex "foo"
* ability to deal with expected failures. the suite will not warn about tests
that fail and are known to fail, but will warn about other failing tests and
tests that are succeeding tests but incorrectly marked as failing.
* ability to print a summary with all failures at the end of the run
It also opens up the way to the following features, which I hope to implement later:
* "environments", for example having a complete domains with DCs and domain members
in a testenvironment
* only set up smbd if necessary (not when running LOCAL tests, for example)
* different mktestsetup scripts per target. except for the mktestsetup script, we can
use the same infrastructure for samba 3 or windows.
(This used to be commit 38f867880beb40c691e9713f854426031310629c)
Diffstat (limited to 'source4/main.mk')
-rw-r--r-- | source4/main.mk | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/source4/main.mk b/source4/main.mk index 4cfbf8a8fb4..18ced055f5b 100644 --- a/source4/main.mk +++ b/source4/main.mk @@ -282,49 +282,56 @@ realdistclean: distclean removebackup -rm -f $(MANPAGES) check:: test -test: $(DEFAULT_TEST_TARGET) -SELFTEST = builddir=$(builddir) srcdir=$(srcdir) \ - $(srcdir)/script/tests/selftest.sh ${selftest_prefix} +SELFTEST = $(srcdir)/script/tests/selftest.pl --prefix=${selftest_prefix} --builddir=$(builddir) --srcdir=$(srcdir) --expected-failures=samba4-knownfail + +test: all libraries + $(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS) --immediate + +testone: all libraries + $(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS) --one test-swrap: all libraries - $(SELFTEST) all SOCKET_WRAPPER + $(SELFTEST) --socket-wrapper --immediate $(TESTS) test-noswrap: all libraries - $(SELFTEST) all + $(SELFTEST) --immediate $(TESTS) + +quicktestone: all + $(SELFTEST) --quick --socket-wrapper --one $(TESTS) quicktest: all - $(SELFTEST) quick SOCKET_WRAPPER + $(SELFTEST) --quick --socket-wrapper --immediate $(TESTS) testenv: all libraries - $(SELFTEST) xterm SOCKET_WRAPPER + $(srcdir)/script/tests/testenv.pl valgrindtest: valgrindtest-quick valgrindtest-quick: all SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \ VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \ - $(SELFTEST) quick SOCKET_WRAPPER + $(SELFTEST) --quick --immediate --socket-wrapper valgrindtest-all: all libraries SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \ VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \ - $(SELFTEST) all SOCKET_WRAPPER + $(SELFTEST) --immediate --socket-wrapper valgrindtest-env: all libraries SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \ VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \ - $(SELFTEST) xterm SOCKET_WRAPPER + $(srcdir)/script/tests/testenv.pl gdbtest: gdbtest-quick gdbtest-quick: all SMBD_VALGRIND="xterm -n smbd -e gdb --args " \ - $(SELFTEST) quick SOCKET_WRAPPER + $(SELFTEST) --immediate --quick --socket-wrapper gdbtest-all: all libraries SMBD_VALGRIND="xterm -n smbd -e gdb --args " \ - $(SELFTEST) all SOCKET_WRAPPER + $(SELFTEST) --immediate --socket-wrapper wintest: all $(SELFTEST) win |