s4:group policies - upcase directory names of default group policies
[Samba/ekacnet.git] / source4 / selftest / config.mk
blob927c40ea91bfa1b043b3e070eb9449c5351b98ee
1 TEST_FORMAT = plain
3 SELFTEST = $(LD_LIBPATH_OVERRIDE) PYTHON=$(PYTHON) \
4 $(PERL) $(selftestdir)/selftest.pl --prefix=${selftest_prefix} \
5 --builddir=$(builddir) --srcdir=$(srcdir) \
6 --exclude=$(srcdir)/selftest/skip --testlist="./selftest/tests.sh|" \
7 $(TEST_OPTIONS)
8 # this strange code is to handle the fact that the bash pipefail option is
9 # not portable. When we run selftest we use a pipeline, and the first element
10 # of that pipeline might abort. We need to catch this and mark the test
11 # as having failed
12 ST_RM = ( rm -f $(selftest_prefix)/st_done &&
13 ST_TOUCH = && touch $(selftest_prefix)/st_done )
14 ST_DONE_TEST = @test -f $(selftest_prefix)/st_done || { echo "SELFTEST FAILED"; exit 1; }
16 SELFTEST_NOSLOW_OPTS = --exclude=$(srcdir)/selftest/slow
17 SELFTEST_QUICK_OPTS = $(SELFTEST_NOSLOW_OPTS) --quick --include=$(srcdir)/selftest/quick
18 FILTER_XFAIL = $(PERL) $(selftestdir)/filter-subunit.pl --expected-failures=$(srcdir)/selftest/knownfail
19 FORMAT_TEST_OUTPUT = $(FILTER_XFAIL) | $(PERL) $(selftestdir)/format-subunit.pl --format=$(TEST_FORMAT)
21 test-subunit:: everything
22 $(SELFTEST) --socket-wrapper $(TESTS) $(ST_TOUCH)
23 $(ST_DONE_TEST)
25 slowtest:: everything
26 $(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate
27 $(ST_DONE_TEST)
29 ifeq ($(RUN_FROM_BUILD_FARM),yes)
30 test:: everything
31 $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) $(TESTS) $(ST_TOUCH) | $(FILTER_XFAIL) --strip-passed-output
32 $(ST_DONE_TEST)
33 else
34 test:: everything
35 $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate
36 $(ST_DONE_TEST)
37 endif
39 kvmtest:: everything
40 $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) \
41 --target=kvm --image=$(KVM_IMAGE) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate
42 $(ST_DONE_TEST)
44 kvmquicktest:: everything
45 $(ST_RM) $(SELFTEST) $(DEFAULT_TEST_OPTIONS) \
46 $(SELFTEST_QUICK_OPTS) --target=kvm --image=$(KVM_IMAGE) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) | $(FORMAT_TEST_OUTPUT) --immediate
47 $(ST_DONE_TEST)
49 testone:: everything
50 $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) --one $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT)
51 $(ST_DONE_TEST)
53 test-swrap:: everything
54 $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate
55 $(ST_DONE_TEST)
57 test-swrap-pcap:: everything
58 $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper-pcap $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate
59 $(ST_DONE_TEST)
61 test-swrap-keep-pcap:: everything
62 $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper-keep-pcap $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate
63 $(ST_DONE_TEST)
65 test-noswrap:: everything
66 $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate
67 $(ST_DONE_TEST)
69 quicktest:: all
70 $(ST_RM) $(SELFTEST) $(SELFTEST_QUICK_OPTS) --socket-wrapper $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate
71 $(ST_DONE_TEST)
73 quicktest-subunit:: all
74 $(ST_RM) $(SELFTEST) $(SELFTEST_QUICK_OPTS) --socket-wrapper $(TESTS) $(ST_TOUCH)
75 $(ST_DONE_TEST)
77 quicktestone:: all
78 $(ST_RM) $(SELFTEST) $(SELFTEST_QUICK_OPTS) --socket-wrapper --one $(TESTS) | $(FORMAT_TEST_OUTPUT)
79 $(ST_DONE_TEST)
81 testenv:: everything
82 $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
84 testenv-%:: everything
85 SELFTEST_TESTENV=$* $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
87 test-%::
88 $(MAKE) test TESTS=$*
90 valgrindtest:: valgrindtest-all
92 valgrindtest-quick:: all
93 SAMBA_VALGRIND="xterm -n server -e $(selftestdir)/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
94 VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
95 $(SELFTEST) $(SELFTEST_QUICK_OPTS) --socket-wrapper $(TESTS) | $(FORMAT_TEST_OUTPUT) --immediate
97 valgrindtest-all:: everything
98 SAMBA_VALGRIND="xterm -n server -e $(selftestdir)/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
99 VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
100 $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper $(TESTS) | $(FORMAT_TEST_OUTPUT) --immediate
102 valgrindtest-env:: everything
103 SAMBA_VALGRIND="xterm -n server -e $(selftestdir)/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
104 VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
105 $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
107 gdbtest:: gdbtest-all
109 gdbtest-quick:: all
110 SAMBA_VALGRIND="xterm -n server -e $(selftestdir)/gdb_run $(LD_LIBPATH_OVERRIDE)" \
111 $(SELFTEST) $(SELFTEST_QUICK_OPTS) --socket-wrapper $(TESTS) | $(FORMAT_TEST_OUTPUT) --immediate
113 gdbtest-all:: everything
114 SAMBA_VALGRIND="xterm -n server -e $(selftestdir)/gdb_run $(LD_LIBPATH_OVERRIDE)" \
115 $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper $(TESTS) | $(FORMAT_TEST_OUTPUT) --immediate
117 gdbtest-env:: everything
118 SAMBA_VALGRIND="xterm -n server -e $(selftestdir)/gdb_run $(LD_LIBPATH_OVERRIDE)" \
119 $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv