Merge branch 'master' of ssh://git.samba.org/data/git/samba into selftest
[kai/samba-autobuild/.git] / source4 / selftest / config.mk
1 TEST_FORMAT = plain
2
3 SELFTEST = $(LD_LIBPATH_OVERRIDE) $(PERL) $(selftestdir)/selftest.pl --prefix=${selftest_prefix} \
4     --builddir=$(builddir) --srcdir=$(srcdir) \
5     --expected-failures=$(srcdir)/selftest/knownfail \
6         --format=$(TEST_FORMAT) \
7     --exclude=$(srcdir)/selftest/skip --testlist="./selftest/tests.sh|" \
8     $(TEST_OPTIONS) 
9
10 SELFTEST_NOSLOW_OPTS = --exclude=$(srcdir)/selftest/slow
11 SELFTEST_QUICK_OPTS = $(SELFTEST_NOSLOW_OPTS) --quick 
12
13 slowtest:: everything
14         $(SELFTEST) $(DEFAULT_TEST_OPTIONS) --immediate $(TESTS)
15
16 test:: everything
17         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) --immediate \
18                 $(TESTS)
19
20 kvmtest:: everything
21         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) --immediate \
22                 --target=kvm --image=$(KVM_IMAGE)
23
24 kvmquicktest:: everything
25         $(SELFTEST) $(DEFAULT_TEST_OPTIONS) --immediate \
26                 $(SELFTEST_QUICK_OPTS) --target=kvm --image=$(KVM_IMAGE)
27
28 testone:: everything
29         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) --one $(TESTS)
30
31 test-swrap:: everything
32         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --immediate $(TESTS)
33
34 test-swrap-pcap:: everything
35         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper-pcap --immediate $(TESTS)
36
37 test-swrap-keep-pcap:: everything
38         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper-keep-pcap --immediate $(TESTS)
39
40 test-noswrap:: everything
41         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --immediate $(TESTS)
42
43 quicktest:: all
44         $(SELFTEST) $(SELFTEST_QUICK_OPTS) --socket-wrapper --immediate $(TESTS)
45
46 quicktestone:: all
47         $(SELFTEST) $(SELFTEST_QUICK_OPTS) --socket-wrapper --one $(TESTS)
48
49 testenv:: everything
50         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
51
52 testenv-%:: everything
53         SELFTEST_TESTENV=$* $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
54
55 valgrindtest:: valgrindtest-all
56
57 valgrindtest-quick:: all
58         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
59         VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
60         $(SELFTEST) $(SELFTEST_QUICK_OPTS) --immediate --socket-wrapper $(TESTS)
61
62 valgrindtest-all:: everything
63         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
64         VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
65         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --immediate --socket-wrapper $(TESTS)
66
67 valgrindtest-env:: everything
68         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
69         VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
70         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
71
72 gdbtest:: gdbtest-all
73
74 gdbtest-quick:: all
75         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
76         $(SELFTEST) $(SELFTEST_QUICK_OPTS) --immediate --socket-wrapper $(TESTS)
77
78 gdbtest-all:: everything
79         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
80         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --immediate --socket-wrapper $(TESTS)
81
82 gdbtest-env:: everything
83         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
84         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv