ovs-xapi-sync: Cache nicira-bridge-id in ovs-xapi-sync.
[openvswitch] / tests / automake.mk
index b133467c9613ab4b34d813e373d686ebfde71795..77281579fa3f59a5c41fd6f6a71d7a60b4aea54d 100644 (file)
@@ -24,6 +24,7 @@ TESTSUITE_AT = \
        tests/vconn.at \
        tests/file_name.at \
        tests/aes128.at \
+       tests/unixctl-py.at \
        tests/uuid.at \
        tests/json.at \
        tests/jsonrpc.at \
@@ -66,6 +67,21 @@ AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests
 check-local: tests/atconfig tests/atlocal $(TESTSUITE)
        $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
 \f
+# Python Coverage support.
+# Requires coverage.py http://nedbatchelder.com/code/coverage/.
+
+COVERAGE = coverage
+COVERAGE_FILE='$(abs_srcdir)/.coverage'
+check-pycov: all tests/atconfig tests/atlocal $(TESTSUITE) clean-pycov
+       COVERAGE_FILE=$(COVERAGE_FILE) PYTHON='$(COVERAGE) run -p' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
+       @cd $(srcdir) && $(COVERAGE) combine && COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) annotate
+       @echo
+       @echo '----------------------------------------------------------------------'
+       @echo 'Annotated coverage source has the ",cover" extension.'
+       @echo '----------------------------------------------------------------------'
+       @echo
+       @COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) report
+\f
 # lcov support
 
 lcov_wrappers = \
@@ -337,14 +353,18 @@ tests_test_byte_order_LDADD = lib/libopenvswitch.a
 EXTRA_DIST += tests/choose-port.pl
 
 # Python tests.
-EXTRA_DIST += \
+CHECK_PYFILES = \
+       tests/appctl.py \
        tests/test-daemon.py \
        tests/test-json.py \
        tests/test-jsonrpc.py \
        tests/test-ovsdb.py \
        tests/test-reconnect.py \
        tests/MockXenAPI.py \
+       tests/test-unixctl.py \
        tests/test-vlog.py
+EXTRA_DIST += $(CHECK_PYFILES)
+PYCOV_CLEAN_FILES += $(CHECK_PYFILES:.py=.py,cover) .coverage
 
 if HAVE_OPENSSL
 TESTPKI_FILES = \