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|" \
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
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
)
26 $(SELFTEST
) $(DEFAULT_TEST_OPTIONS
) $(TESTS
) $(ST_TOUCH
) |
$(FORMAT_TEST_OUTPUT
) --immediate
29 ifeq ($(RUN_FROM_BUILD_FARM
),yes
)
31 $(ST_RM
) $(SELFTEST
) $(SELFTEST_NOSLOW_OPTS
) $(DEFAULT_TEST_OPTIONS
) $(TESTS
) $(ST_TOUCH
) |
$(FILTER_XFAIL
) --strip-passed-output
35 $(ST_RM
) $(SELFTEST
) $(SELFTEST_NOSLOW_OPTS
) $(DEFAULT_TEST_OPTIONS
) $(TESTS
) $(ST_TOUCH
) |
$(FORMAT_TEST_OUTPUT
) --immediate
40 $(ST_RM
) $(SELFTEST
) $(SELFTEST_NOSLOW_OPTS
) $(DEFAULT_TEST_OPTIONS
) \
41 --target
=kvm
--image
=$(KVM_IMAGE
) $(ST_TOUCH
) |
$(FORMAT_TEST_OUTPUT
) --immediate
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
50 $(ST_RM
) $(SELFTEST
) $(SELFTEST_NOSLOW_OPTS
) $(DEFAULT_TEST_OPTIONS
) --one
$(TESTS
) $(ST_TOUCH
) |
$(FORMAT_TEST_OUTPUT
)
53 test-swrap
:: everything
54 $(ST_RM
) $(SELFTEST
) $(SELFTEST_NOSLOW_OPTS
) --socket-wrapper
$(TESTS
) $(ST_TOUCH
) |
$(FORMAT_TEST_OUTPUT
) --immediate
57 test-swrap-pcap
:: everything
58 $(ST_RM
) $(SELFTEST
) $(SELFTEST_NOSLOW_OPTS
) --socket-wrapper-pcap
$(TESTS
) $(ST_TOUCH
) |
$(FORMAT_TEST_OUTPUT
) --immediate
61 test-swrap-keep-pcap
:: everything
62 $(ST_RM
) $(SELFTEST
) $(SELFTEST_NOSLOW_OPTS
) --socket-wrapper-keep-pcap
$(TESTS
) $(ST_TOUCH
) |
$(FORMAT_TEST_OUTPUT
) --immediate
65 test-noswrap
:: everything
66 $(ST_RM
) $(SELFTEST
) $(SELFTEST_NOSLOW_OPTS
) $(TESTS
) $(ST_TOUCH
) |
$(FORMAT_TEST_OUTPUT
) --immediate
70 $(ST_RM
) $(SELFTEST
) $(SELFTEST_QUICK_OPTS
) --socket-wrapper
$(TESTS
) $(ST_TOUCH
) |
$(FORMAT_TEST_OUTPUT
) --immediate
73 quicktest-subunit
:: all
74 $(ST_RM
) $(SELFTEST
) $(SELFTEST_QUICK_OPTS
) --socket-wrapper
$(TESTS
) $(ST_TOUCH
)
78 $(ST_RM
) $(SELFTEST
) $(SELFTEST_QUICK_OPTS
) --socket-wrapper
--one
$(TESTS
) |
$(FORMAT_TEST_OUTPUT
)
82 $(SELFTEST
) $(SELFTEST_NOSLOW_OPTS
) --socket-wrapper
--testenv
84 testenv-
%:: everything
85 SELFTEST_TESTENV
=$* $(SELFTEST
) $(SELFTEST_NOSLOW_OPTS
) --socket-wrapper
--testenv
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
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