74c177d8e84dd36d3eb4c5ade14058f53284ddcc
[ira/wip.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 test-%:: 
56         $(MAKE) test TESTS=$*
57
58 valgrindtest:: valgrindtest-all
59
60 valgrindtest-quick:: all
61         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
62         VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
63         $(SELFTEST) $(SELFTEST_QUICK_OPTS) --immediate --socket-wrapper $(TESTS)
64
65 valgrindtest-all:: everything
66         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
67         VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
68         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --immediate --socket-wrapper $(TESTS)
69
70 valgrindtest-env:: everything
71         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
72         VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
73         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
74
75 gdbtest:: gdbtest-all
76
77 gdbtest-quick:: all
78         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
79         $(SELFTEST) $(SELFTEST_QUICK_OPTS) --immediate --socket-wrapper $(TESTS)
80
81 gdbtest-all:: everything
82         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
83         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --immediate --socket-wrapper $(TESTS)
84
85 gdbtest-env:: everything
86         SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
87         $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv