2009-07-27 16:40:11 -07:00
|
|
|
|
EXTRA_DIST += \
|
|
|
|
|
|
$(TESTSUITE_AT) \
|
|
|
|
|
|
$(TESTSUITE) \
|
|
|
|
|
|
tests/atlocal.in \
|
|
|
|
|
|
$(srcdir)/package.m4 \
|
|
|
|
|
|
$(srcdir)/tests/testsuite
|
|
|
|
|
|
TESTSUITE_AT = \
|
|
|
|
|
|
tests/testsuite.at \
|
2010-01-15 12:12:36 -08:00
|
|
|
|
tests/ovsdb-macros.at \
|
2009-07-27 16:40:11 -07:00
|
|
|
|
tests/library.at \
|
2010-05-26 12:48:32 -07:00
|
|
|
|
tests/classifier.at \
|
2010-01-25 10:49:31 -08:00
|
|
|
|
tests/check-structs.at \
|
2010-01-15 12:13:46 -08:00
|
|
|
|
tests/daemon.at \
|
2010-08-25 10:26:40 -07:00
|
|
|
|
tests/daemon-py.at \
|
2010-10-01 13:08:14 -07:00
|
|
|
|
tests/ovs-ofctl.at \
|
2010-01-08 09:41:29 -08:00
|
|
|
|
tests/vconn.at \
|
2009-10-19 14:04:14 -07:00
|
|
|
|
tests/dir_name.at \
|
2009-09-24 15:02:36 -07:00
|
|
|
|
tests/aes128.at \
|
|
|
|
|
|
tests/uuid.at \
|
2009-11-04 14:55:53 -08:00
|
|
|
|
tests/json.at \
|
2009-10-26 15:04:05 -07:00
|
|
|
|
tests/jsonrpc.at \
|
2010-08-25 10:26:40 -07:00
|
|
|
|
tests/jsonrpc-py.at \
|
2009-10-14 13:14:43 -07:00
|
|
|
|
tests/timeval.at \
|
2009-10-14 16:52:04 -07:00
|
|
|
|
tests/lockfile.at \
|
2009-11-10 15:30:49 -08:00
|
|
|
|
tests/reconnect.at \
|
2009-11-04 15:11:44 -08:00
|
|
|
|
tests/ovsdb.at \
|
2009-11-13 13:23:35 -08:00
|
|
|
|
tests/ovsdb-log.at \
|
2009-11-04 15:11:44 -08:00
|
|
|
|
tests/ovsdb-types.at \
|
|
|
|
|
|
tests/ovsdb-data.at \
|
|
|
|
|
|
tests/ovsdb-column.at \
|
|
|
|
|
|
tests/ovsdb-table.at \
|
|
|
|
|
|
tests/ovsdb-row.at \
|
2010-02-08 14:09:41 -08:00
|
|
|
|
tests/ovsdb-schema.at \
|
2009-11-04 15:11:44 -08:00
|
|
|
|
tests/ovsdb-condition.at \
|
2009-12-16 10:49:31 -08:00
|
|
|
|
tests/ovsdb-mutation.at \
|
2009-11-04 15:11:44 -08:00
|
|
|
|
tests/ovsdb-query.at \
|
|
|
|
|
|
tests/ovsdb-transaction.at \
|
|
|
|
|
|
tests/ovsdb-execution.at \
|
|
|
|
|
|
tests/ovsdb-trigger.at \
|
2010-02-12 11:26:54 -08:00
|
|
|
|
tests/ovsdb-tool.at \
|
2009-11-16 15:13:00 -08:00
|
|
|
|
tests/ovsdb-server.at \
|
2009-11-16 10:38:14 -08:00
|
|
|
|
tests/ovsdb-monitor.at \
|
2009-12-02 11:26:15 -08:00
|
|
|
|
tests/ovsdb-idl.at \
|
2010-08-25 10:26:40 -07:00
|
|
|
|
tests/ovsdb-idl-py.at \
|
2010-02-22 16:28:30 -08:00
|
|
|
|
tests/ovs-vsctl.at \
|
|
|
|
|
|
tests/interface-reconfigure.at
|
2009-07-27 16:40:11 -07:00
|
|
|
|
TESTSUITE = $(srcdir)/tests/testsuite
|
|
|
|
|
|
DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
|
|
|
|
|
|
|
2010-02-01 14:04:25 -08:00
|
|
|
|
AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests
|
|
|
|
|
|
|
2009-07-27 16:40:11 -07:00
|
|
|
|
check-local: tests/atconfig tests/atlocal $(TESTSUITE)
|
2010-02-01 14:04:25 -08:00
|
|
|
|
$(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
# lcov support
|
|
|
|
|
|
|
|
|
|
|
|
lcov_wrappers = \
|
|
|
|
|
|
tests/lcov/ovs-appctl \
|
|
|
|
|
|
tests/lcov/ovs-vsctl \
|
|
|
|
|
|
tests/lcov/ovsdb-client \
|
|
|
|
|
|
tests/lcov/ovsdb-server \
|
|
|
|
|
|
tests/lcov/ovsdb-tool \
|
|
|
|
|
|
tests/lcov/test-aes128 \
|
|
|
|
|
|
tests/lcov/test-classifier \
|
|
|
|
|
|
tests/lcov/test-csum \
|
|
|
|
|
|
tests/lcov/test-dhcp-client \
|
|
|
|
|
|
tests/lcov/test-dir_name \
|
|
|
|
|
|
tests/lcov/test-flows \
|
|
|
|
|
|
tests/lcov/test-hash \
|
|
|
|
|
|
tests/lcov/test-hmap \
|
|
|
|
|
|
tests/lcov/test-json \
|
|
|
|
|
|
tests/lcov/test-jsonrpc \
|
|
|
|
|
|
tests/lcov/test-list \
|
|
|
|
|
|
tests/lcov/test-lockfile \
|
|
|
|
|
|
tests/lcov/test-ovsdb \
|
|
|
|
|
|
tests/lcov/test-reconnect \
|
|
|
|
|
|
tests/lcov/test-sha1 \
|
|
|
|
|
|
tests/lcov/test-timeval \
|
|
|
|
|
|
tests/lcov/test-type-props \
|
|
|
|
|
|
tests/lcov/test-uuid \
|
2010-05-11 16:44:03 -07:00
|
|
|
|
tests/lcov/test-vconn \
|
|
|
|
|
|
tests/lcov/test-xtoxll
|
2010-02-01 14:04:25 -08:00
|
|
|
|
|
|
|
|
|
|
$(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
|
2009-07-27 16:40:11 -07:00
|
|
|
|
|
2010-02-01 14:04:25 -08:00
|
|
|
|
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
|
2010-07-15 10:50:33 -07:00
|
|
|
|
$(SHELL) '$(TESTSUITE)' -C tests CHECK_LCOV=true DISABLE_LCOV=false AUTOTEST_PATH='tests/lcov:$(AUTOTEST_PATH)' $(TESTSUITEFLAGS); \
|
2010-02-01 14:04:25 -08:00
|
|
|
|
rc=$$?; \
|
|
|
|
|
|
echo "Producing coverage.html..."; \
|
|
|
|
|
|
cd tests && genhtml -q -o coverage.html coverage.info; \
|
|
|
|
|
|
exit $$rc
|
|
|
|
|
|
|
2010-02-01 14:26:07 -08:00
|
|
|
|
# valgrind support
|
|
|
|
|
|
|
|
|
|
|
|
valgrind_wrappers = \
|
|
|
|
|
|
tests/valgrind/ovs-appctl \
|
|
|
|
|
|
tests/valgrind/ovs-vsctl \
|
|
|
|
|
|
tests/valgrind/ovsdb-client \
|
|
|
|
|
|
tests/valgrind/ovsdb-server \
|
|
|
|
|
|
tests/valgrind/ovsdb-tool \
|
|
|
|
|
|
tests/valgrind/test-aes128 \
|
|
|
|
|
|
tests/valgrind/test-classifier \
|
|
|
|
|
|
tests/valgrind/test-csum \
|
|
|
|
|
|
tests/valgrind/test-dhcp-client \
|
|
|
|
|
|
tests/valgrind/test-dir_name \
|
|
|
|
|
|
tests/valgrind/test-flows \
|
|
|
|
|
|
tests/valgrind/test-hash \
|
|
|
|
|
|
tests/valgrind/test-hmap \
|
|
|
|
|
|
tests/valgrind/test-json \
|
|
|
|
|
|
tests/valgrind/test-jsonrpc \
|
|
|
|
|
|
tests/valgrind/test-list \
|
|
|
|
|
|
tests/valgrind/test-lockfile \
|
|
|
|
|
|
tests/valgrind/test-ovsdb \
|
|
|
|
|
|
tests/valgrind/test-reconnect \
|
|
|
|
|
|
tests/valgrind/test-sha1 \
|
|
|
|
|
|
tests/valgrind/test-timeval \
|
|
|
|
|
|
tests/valgrind/test-type-props \
|
|
|
|
|
|
tests/valgrind/test-uuid \
|
2010-05-11 16:44:03 -07:00
|
|
|
|
tests/valgrind/test-vconn \
|
|
|
|
|
|
tests/valgrind/test-xtoxll
|
2010-02-01 14:26:07 -08:00
|
|
|
|
|
|
|
|
|
|
$(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/openssl.supp --num-callers=20
|
|
|
|
|
|
EXTRA_DIST += tests/openssl.supp
|
|
|
|
|
|
check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) $(valgrind_wrappers)
|
|
|
|
|
|
$(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 '----------------------------------------------------------------------'
|
|
|
|
|
|
|
2009-07-27 16:40:11 -07:00
|
|
|
|
clean-local:
|
|
|
|
|
|
test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
|
|
|
|
|
|
|
|
|
|
|
|
AUTOM4TE = autom4te
|
|
|
|
|
|
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.' && \
|
2010-01-14 11:32:00 -08:00
|
|
|
|
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)])'; \
|
2009-07-27 16:40:11 -07:00
|
|
|
|
} >'$(srcdir)/package.m4'
|
|
|
|
|
|
|
2009-09-24 15:02:36 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-aes128
|
|
|
|
|
|
tests_test_aes128_SOURCES = tests/test-aes128.c
|
|
|
|
|
|
tests_test_aes128_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-07-08 13:19:16 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-classifier
|
|
|
|
|
|
tests_test_classifier_SOURCES = tests/test-classifier.c
|
|
|
|
|
|
tests_test_classifier_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-06-09 17:10:18 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-csum
|
|
|
|
|
|
tests_test_csum_SOURCES = tests/test-csum.c
|
|
|
|
|
|
tests_test_csum_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-10-19 14:04:14 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-dir_name
|
|
|
|
|
|
tests_test_dir_name_SOURCES = tests/test-dir_name.c
|
|
|
|
|
|
tests_test_dir_name_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-07-08 13:19:16 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-flows
|
|
|
|
|
|
tests_test_flows_SOURCES = tests/test-flows.c
|
|
|
|
|
|
tests_test_flows_LDADD = lib/libopenvswitch.a
|
2009-07-27 16:40:11 -07:00
|
|
|
|
dist_check_SCRIPTS = tests/flowgen.pl
|
2009-07-08 13:19:16 -07:00
|
|
|
|
|
|
|
|
|
|
noinst_PROGRAMS += tests/test-hash
|
|
|
|
|
|
tests_test_hash_SOURCES = tests/test-hash.c
|
|
|
|
|
|
tests_test_hash_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
|
|
|
|
|
noinst_PROGRAMS += tests/test-hmap
|
|
|
|
|
|
tests_test_hmap_SOURCES = tests/test-hmap.c
|
|
|
|
|
|
tests_test_hmap_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-11-04 14:55:53 -08:00
|
|
|
|
noinst_PROGRAMS += tests/test-json
|
|
|
|
|
|
tests_test_json_SOURCES = tests/test-json.c
|
|
|
|
|
|
tests_test_json_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-10-26 15:04:05 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-jsonrpc
|
|
|
|
|
|
tests_test_jsonrpc_SOURCES = tests/test-jsonrpc.c
|
2009-12-21 13:13:48 -08:00
|
|
|
|
tests_test_jsonrpc_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
|
2009-10-26 15:04:05 -07:00
|
|
|
|
|
2009-07-08 13:19:16 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-list
|
|
|
|
|
|
tests_test_list_SOURCES = tests/test-list.c
|
|
|
|
|
|
tests_test_list_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-10-14 16:52:04 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-lockfile
|
|
|
|
|
|
tests_test_lockfile_SOURCES = tests/test-lockfile.c
|
|
|
|
|
|
tests_test_lockfile_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-11-04 15:11:44 -08:00
|
|
|
|
noinst_PROGRAMS += tests/test-ovsdb
|
2010-01-07 15:52:58 -08:00
|
|
|
|
tests_test_ovsdb_SOURCES = \
|
|
|
|
|
|
tests/test-ovsdb.c \
|
|
|
|
|
|
tests/idltest.c \
|
|
|
|
|
|
tests/idltest.h
|
2010-03-15 15:41:54 -07:00
|
|
|
|
EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl
|
2010-02-23 15:48:28 -08:00
|
|
|
|
tests_test_ovsdb_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS)
|
2010-01-07 15:52:58 -08:00
|
|
|
|
|
|
|
|
|
|
# idltest schema and IDL
|
|
|
|
|
|
OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
|
|
|
|
|
|
IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
|
|
|
|
|
|
EXTRA_DIST += $(IDLTEST_IDL_FILES)
|
|
|
|
|
|
tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
|
|
|
|
|
|
$(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp
|
|
|
|
|
|
mv $@.tmp $@
|
|
|
|
|
|
|
2009-12-07 17:00:14 -08:00
|
|
|
|
tests/idltest.c: tests/idltest.h
|
2009-11-04 15:11:44 -08:00
|
|
|
|
|
2009-11-10 15:30:49 -08:00
|
|
|
|
noinst_PROGRAMS += tests/test-reconnect
|
|
|
|
|
|
tests_test_reconnect_SOURCES = tests/test-reconnect.c
|
|
|
|
|
|
tests_test_reconnect_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-06-10 16:45:28 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-sha1
|
|
|
|
|
|
tests_test_sha1_SOURCES = tests/test-sha1.c
|
|
|
|
|
|
tests_test_sha1_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-10-14 13:14:43 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-timeval
|
|
|
|
|
|
tests_test_timeval_SOURCES = tests/test-timeval.c
|
|
|
|
|
|
tests_test_timeval_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2010-01-06 10:00:56 -08:00
|
|
|
|
noinst_PROGRAMS += tests/test-strtok_r
|
|
|
|
|
|
tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
|
|
|
|
|
|
|
2009-07-08 13:19:16 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-type-props
|
|
|
|
|
|
tests_test_type_props_SOURCES = tests/test-type-props.c
|
|
|
|
|
|
|
|
|
|
|
|
noinst_PROGRAMS += tests/test-dhcp-client
|
|
|
|
|
|
tests_test_dhcp_client_SOURCES = tests/test-dhcp-client.c
|
2009-12-21 16:38:58 -08:00
|
|
|
|
tests_test_dhcp_client_LDADD = lib/libopenvswitch.a
|
2009-07-08 13:19:16 -07:00
|
|
|
|
|
2009-09-24 15:02:36 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-uuid
|
|
|
|
|
|
tests_test_uuid_SOURCES = tests/test-uuid.c
|
|
|
|
|
|
tests_test_uuid_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2009-06-12 17:10:09 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-vconn
|
|
|
|
|
|
tests_test_vconn_SOURCES = tests/test-vconn.c
|
|
|
|
|
|
tests_test_vconn_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
|
2010-01-07 16:11:28 -08:00
|
|
|
|
EXTRA_DIST += \
|
|
|
|
|
|
tests/testpki-cacert.pem \
|
|
|
|
|
|
tests/testpki-cert.pem \
|
2010-01-11 13:07:11 -08:00
|
|
|
|
tests/testpki-cert2.pem \
|
2010-01-07 16:11:28 -08:00
|
|
|
|
tests/testpki-privkey.pem \
|
2010-01-11 13:07:11 -08:00
|
|
|
|
tests/testpki-privkey2.pem \
|
|
|
|
|
|
tests/testpki-req.pem \
|
|
|
|
|
|
tests/testpki-req2.pem
|
2010-08-25 10:26:40 -07:00
|
|
|
|
|
2010-05-11 16:44:03 -07:00
|
|
|
|
noinst_PROGRAMS += tests/test-xtoxll
|
|
|
|
|
|
tests_test_xtoxll_SOURCES = tests/test-xtoxll.c
|
|
|
|
|
|
tests_test_xtoxll_LDADD = lib/libopenvswitch.a
|
|
|
|
|
|
|
2010-08-25 10:26:40 -07:00
|
|
|
|
# Python tests.
|
|
|
|
|
|
EXTRA_DIST += \
|
|
|
|
|
|
tests/test-daemon.py \
|
|
|
|
|
|
tests/test-json.py \
|
|
|
|
|
|
tests/test-jsonrpc.py \
|
|
|
|
|
|
tests/test-ovsdb.py \
|
|
|
|
|
|
tests/test-reconnect.py
|