Testing is also important:
- - A patch that modifies existing code should be tested with
- `make check` before submission.
+ - A patch that modifies existing code should be tested with `make
+ check` before submission. Please see INSTALL.md, under
+ "Self-Tests", for more information.
- A patch that adds or deletes files should also be tested with
`make distcheck` before submission.
Sometimes a few tests may fail on some runs but not others. This is
usually a bug in the testsuite, not a bug in Open vSwitch itself. If
you find that a test fails intermittently, please report it, since the
-developers may not have noticed.
+developers may not have noticed. You can make the testsuite
+automatically rerun tests that fail, by adding RECHECK=yes to the
+"make" command line, e.g.:
+ `make check TESTSUITEFLAGS=-j8 RECHECK=yes`
OFTest
------
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
- if $(MAKE) check TESTSUITEFLAGS='$(PARALLEL)' || \
- $(MAKE) check TESTSUITEFLAGS='--recheck'; then :; \
+ if $(MAKE) check TESTSUITEFLAGS='$(PARALLEL)' RECHECK=yes; then :; \
else \
cat tests/testsuite.log; \
exit 1; \
%check
%if %{with check}
- if make check TESTSUITEFLAGS='%{_smp_mflags}' ||
- make check TESTSUITEFLAGS='--recheck'; then :;
+ if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;
else
cat tests/testsuite.log
exit 1
%check
%if %{with check}
- if make check TESTSUITEFLAGS='%{_smp_mflags}' ||
- make check TESTSUITEFLAGS='--recheck'; then :;
+ if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;
else
cat tests/testsuite.log
exit 1
AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep:tests:$(PTHREAD_WIN32_DIR_DLL):ovn/controller-vtep:ovn/northd:ovn/utilities:ovn/controller
check-local: tests/atconfig tests/atlocal $(TESTSUITE)
- $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
+ set $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS); \
+ "$$@" || (test X'$(RECHECK)' = Xyes && "$$@" --recheck)
\f
# Python Coverage support.
# Requires coverage.py http://nedbatchelder.com/code/coverage/.
%check
%if %{with check}
- if make check TESTSUITEFLAGS='%{_smp_mflags}' ||
- make check TESTSUITEFLAGS='--recheck'; then :;
+ if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;
else
cat tests/testsuite.log
exit 1