+EXTRA_DIST += \
+ $(TESTSUITE_AT) \
+ $(TESTSUITE) \
+ tests/atlocal.in \
+ $(srcdir)/package.m4 \
+ $(srcdir)/tests/testsuite
+TESTSUITE_AT = \
+ tests/testsuite.at \
+ tests/ovsdb-macros.at \
+ tests/library.at \
+ tests/heap.at \
+ tests/bundle.at \
+ tests/classifier.at \
+ tests/check-structs.at \
+ tests/daemon.at \
+ tests/daemon-py.at \
+ tests/ofp-actions.at \
+ tests/ofp-print.at \
+ tests/ofp-util.at \
+ tests/ofp-errors.at \
+ tests/ovs-ofctl.at \
+ tests/odp.at \
+ tests/multipath.at \
+ tests/bfd.at \
+ tests/cfm.at \
+ tests/lacp.at \
+ tests/learn.at \
+ tests/vconn.at \
+ tests/file_name.at \
+ tests/aes128.at \
+ tests/unixctl-py.at \
+ tests/uuid.at \
+ tests/json.at \
+ tests/jsonrpc.at \
+ tests/jsonrpc-py.at \
+ tests/tunnel.at \
+ tests/lockfile.at \
+ tests/reconnect.at \
+ tests/ovs-vswitchd.at \
+ tests/ofproto-dpif.at \
+ tests/vlan-splinters.at \
+ tests/ofproto-macros.at \
+ tests/ofproto.at \
+ tests/ovsdb.at \
+ tests/ovsdb-log.at \
+ tests/ovsdb-types.at \
+ tests/ovsdb-data.at \
+ tests/ovsdb-column.at \
+ tests/ovsdb-table.at \
+ tests/ovsdb-row.at \
+ tests/ovsdb-schema.at \
+ tests/ovsdb-condition.at \
+ tests/ovsdb-mutation.at \
+ tests/ovsdb-query.at \
+ tests/ovsdb-transaction.at \
+ tests/ovsdb-execution.at \
+ tests/ovsdb-trigger.at \
+ tests/ovsdb-tool.at \
+ tests/ovsdb-server.at \
+ tests/ovsdb-monitor.at \
+ tests/ovsdb-idl.at \
+ tests/ovs-vsctl.at \
+ tests/ovs-monitor-ipsec.at \
+ tests/ovs-xapi-sync.at \
+ tests/stp.at \
+ tests/interface-reconfigure.at \
+ tests/vlog.at \
+ tests/vtep-ctl.at
+TESTSUITE = $(srcdir)/tests/testsuite
+DISTCLEANFILES += tests/atconfig tests/atlocal
+
+AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep: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
+ 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
+\f
+# valgrind support
+
+valgrind_wrappers = \
+ tests/valgrind/ovs-appctl \
+ tests/valgrind/ovs-ofctl \
+ tests/valgrind/ovstest \
+ tests/valgrind/ovs-vsctl \
+ tests/valgrind/ovs-vswitchd \
+ tests/valgrind/ovsdb-client \
+ tests/valgrind/ovsdb-server \
+ tests/valgrind/ovsdb-tool \
+ tests/valgrind/test-aes128 \
+ tests/valgrind/test-atomic \
+ tests/valgrind/test-bundle \
+ tests/valgrind/test-byte-order \
+ tests/valgrind/test-classifier \
+ tests/valgrind/test-csum \
+ tests/valgrind/test-file_name \
+ tests/valgrind/test-flows \
+ tests/valgrind/test-hash \
+ tests/valgrind/test-hindex \
+ tests/valgrind/test-hmap \
+ tests/valgrind/test-json \
+ tests/valgrind/test-jsonrpc \
+ tests/valgrind/test-list \
+ tests/valgrind/test-lockfile \
+ tests/valgrind/test-multipath \
+ tests/valgrind/test-odp \
+ tests/valgrind/test-ovsdb \
+ tests/valgrind/test-packets \
+ tests/valgrind/test-random \
+ tests/valgrind/test-reconnect \
+ tests/valgrind/test-sha1 \
+ tests/valgrind/test-stp \
+ tests/valgrind/test-type-props \
+ tests/valgrind/test-unix-socket \
+ tests/valgrind/test-uuid \
+ tests/valgrind/test-vconn
+
+$(valgrind_wrappers): tests/valgrind-wrapper.in
+ @test -d tests/valgrind || mkdir tests/valgrind
+ sed -e 's,[@]wrap_program[@],$@,' \
+ $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp
+ chmod +x $@.tmp
+ mv $@.tmp $@
+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/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 '----------------------------------------------------------------------'
+ @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
+ @echo '----------------------------------------------------------------------'
+\f
+# OFTest support.
+
+check-oftest: all
+ srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-oftest
+EXTRA_DIST += tests/run-oftest
+
+# Ryu support.
+check-ryu: all
+ srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-ryu
+EXTRA_DIST += tests/run-ryu
+\f
+clean-local:
+ test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
+
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): package.m4 $(TESTSUITE_AT)
+ $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
+ mv $@.tmp $@
+
+# The `:;' works around a Bash 3.2 bug when the output is not writeable.
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac
+ :;{ \
+ echo '# Signature of the current package.' && \
+ echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
+ echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
+ echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
+ echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
+ } >'$(srcdir)/package.m4'
+
+noinst_PROGRAMS += tests/test-aes128
+tests_test_aes128_SOURCES = tests/test-aes128.c
+tests_test_aes128_LDADD = lib/libopenvswitch.la
+
+noinst_PROGRAMS += tests/test-atomic
+tests_test_atomic_SOURCES = tests/test-atomic.c
+tests_test_atomic_LDADD = lib/libopenvswitch.la
+
+noinst_PROGRAMS += tests/test-bundle
+tests_test_bundle_SOURCES = tests/test-bundle.c
+tests_test_bundle_LDADD = lib/libopenvswitch.la
+