X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fautomake.mk;h=20f9e827f7137094f67811573147e49e47015ab7;hb=6ec5f0c5f0e0b8e5827364a3f1b8b46da8b650ad;hp=b133467c9613ab4b34d813e373d686ebfde71795;hpb=bde9f75de100e3801735bf69f605320f4db65cba;p=openvswitch diff --git a/tests/automake.mk b/tests/automake.mk index b133467c..20f9e827 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -14,7 +14,9 @@ TESTSUITE_AT = \ tests/check-structs.at \ tests/daemon.at \ tests/daemon-py.at \ + tests/ofp-actions.at \ tests/ofp-print.at \ + tests/ofp-errors.at \ tests/ovs-ofctl.at \ tests/odp.at \ tests/multipath.at \ @@ -24,6 +26,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,63 +69,20 @@ AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests check-local: tests/atconfig tests/atlocal $(TESTSUITE) $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS) -# lcov support - -lcov_wrappers = \ - tests/lcov/ovs-appctl \ - tests/lcov/ovs-ofctl \ - tests/lcov/ovs-vsctl \ - tests/lcov/ovs-vswitchd \ - tests/lcov/ovsdb-client \ - tests/lcov/ovsdb-server \ - tests/lcov/ovsdb-tool \ - tests/lcov/test-aes128 \ - tests/lcov/test-bundle \ - tests/lcov/test-byte-order \ - tests/lcov/test-classifier \ - tests/lcov/test-csum \ - tests/lcov/test-file_name \ - tests/lcov/test-flows \ - tests/lcov/test-hash \ - tests/lcov/test-heap \ - tests/lcov/test-hmap \ - tests/lcov/test-json \ - tests/lcov/test-jsonrpc \ - tests/lcov/test-list \ - tests/lcov/test-lockfile \ - tests/lcov/test-multipath \ - tests/lcov/test-odp \ - tests/lcov/test-ovsdb \ - tests/lcov/test-packets \ - tests/lcov/test-random \ - tests/lcov/test-reconnect \ - tests/lcov/test-sha1 \ - tests/lcov/test-stp \ - tests/lcov/test-timeval \ - tests/lcov/test-type-props \ - tests/lcov/test-unix-socket \ - tests/lcov/test-uuid \ - tests/lcov/test-vconn - -$(lcov_wrappers): tests/lcov-wrapper.in - @test -d tests/lcov || mkdir tests/lcov - sed -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),' \ - -e 's,[@]wrap_program[@],$@,' \ - $(top_srcdir)/tests/lcov-wrapper.in > $@.tmp - chmod +x $@.tmp - mv $@.tmp $@ -CLEANFILES += $(lcov_wrappers) -EXTRA_DIST += tests/lcov-wrapper.in - -LCOV = lcov -b $(abs_top_builddir) -d $(abs_top_builddir) -q -check-lcov: all tests/atconfig tests/atlocal $(TESTSUITE) $(lcov_wrappers) - rm -fr tests/coverage.html tests/coverage.info - $(LCOV) -c -i -o - > tests/coverage.info - $(SHELL) '$(TESTSUITE)' -C tests CHECK_LCOV=true DISABLE_LCOV=false AUTOTEST_PATH='tests/lcov:$(AUTOTEST_PATH)' $(TESTSUITEFLAGS); \ - rc=$$?; \ - echo "Producing coverage.html..."; \ - cd tests && genhtml -q -o coverage.html coverage.info; \ - exit $$rc +# 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 + PYTHONDONTWRITEBYTECODE=yes 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 # valgrind support @@ -172,9 +132,11 @@ CLEANFILES += $(valgrind_wrappers) EXTRA_DIST += tests/valgrind-wrapper.in VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \ + --suppressions=$(abs_top_srcdir)/tests/glibc.supp \ --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20 -EXTRA_DIST += tests/openssl.supp -check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) $(valgrind_wrappers) +EXTRA_DIST += tests/glibc.supp tests/openssl.supp +check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \ + $(valgrind_wrappers) $(check_DATA) $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) @echo @echo '----------------------------------------------------------------------' @@ -337,14 +299,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 = \