ovs-xapi-sync: Add unit test.
[sliver-openvswitch.git] / tests / automake.mk
index f9bd368..8d019e7 100644 (file)
@@ -8,11 +8,17 @@ TESTSUITE_AT = \
        tests/testsuite.at \
        tests/ovsdb-macros.at \
        tests/library.at \
+       tests/bundle.at \
        tests/classifier.at \
        tests/check-structs.at \
        tests/daemon.at \
        tests/daemon-py.at \
+       tests/ofp-print.at \
        tests/ovs-ofctl.at \
+       tests/odp.at \
+       tests/multipath.at \
+       tests/autopath.at \
+       tests/learn.at \
        tests/vconn.at \
        tests/file_name.at \
        tests/aes128.at \
@@ -23,6 +29,9 @@ TESTSUITE_AT = \
        tests/timeval.at \
        tests/lockfile.at \
        tests/reconnect.at \
+       tests/ofproto-dpif.at \
+       tests/ofproto-macros.at \
+       tests/ofproto.at \
        tests/ovsdb.at \
        tests/ovsdb-log.at \
        tests/ovsdb-types.at \
@@ -41,8 +50,9 @@ TESTSUITE_AT = \
        tests/ovsdb-server.at \
        tests/ovsdb-monitor.at \
        tests/ovsdb-idl.at \
-       tests/ovsdb-idl-py.at \
        tests/ovs-vsctl.at \
+       tests/ovs-monitor-ipsec.at \
+       tests/ovs-xapi-sync.at \
        tests/interface-reconfigure.at
 TESTSUITE = $(srcdir)/tests/testsuite
 DISTCLEANFILES += tests/atconfig tests/atlocal
@@ -61,10 +71,10 @@ lcov_wrappers = \
        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-dhcp-client \
        tests/lcov/test-file_name \
        tests/lcov/test-flows \
        tests/lcov/test-hash \
@@ -73,7 +83,10 @@ lcov_wrappers = \
        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 \
@@ -112,10 +125,10 @@ valgrind_wrappers = \
        tests/valgrind/ovsdb-server \
        tests/valgrind/ovsdb-tool \
        tests/valgrind/test-aes128 \
+       tests/valgrind/test-bundle \
        tests/valgrind/test-byte-order \
        tests/valgrind/test-classifier \
        tests/valgrind/test-csum \
-       tests/valgrind/test-dhcp-client \
        tests/valgrind/test-file_name \
        tests/valgrind/test-flows \
        tests/valgrind/test-hash \
@@ -124,7 +137,11 @@ valgrind_wrappers = \
        tests/valgrind/test-jsonrpc \
        tests/valgrind/test-list \
        tests/valgrind/test-lockfile \
+       tests/valgrind/test-multipath \
+       tests/valgrind/test-odp \
+       tests/valgrind/test-openflowd \
        tests/valgrind/test-ovsdb \
+       tests/valgrind/test-packets \
        tests/valgrind/test-random \
        tests/valgrind/test-reconnect \
        tests/valgrind/test-sha1 \
@@ -177,6 +194,10 @@ noinst_PROGRAMS += tests/test-aes128
 tests_test_aes128_SOURCES = tests/test-aes128.c
 tests_test_aes128_LDADD = lib/libopenvswitch.a
 
+noinst_PROGRAMS += tests/test-bundle
+tests_test_bundle_SOURCES = tests/test-bundle.c
+tests_test_bundle_LDADD = lib/libopenvswitch.a
+
 noinst_PROGRAMS += tests/test-classifier
 tests_test_classifier_SOURCES = tests/test-classifier.c
 tests_test_classifier_LDADD = lib/libopenvswitch.a
@@ -218,6 +239,26 @@ noinst_PROGRAMS += tests/test-lockfile
 tests_test_lockfile_SOURCES = tests/test-lockfile.c
 tests_test_lockfile_LDADD = lib/libopenvswitch.a
 
+noinst_PROGRAMS += tests/test-multipath
+tests_test_multipath_SOURCES = tests/test-multipath.c
+tests_test_multipath_LDADD = lib/libopenvswitch.a
+
+noinst_PROGRAMS += tests/test-openflowd
+EXTRA_DIST += tests/test-openflowd.8.in
+DISTCLEANFILES += tests/test-openflowd.8
+noinst_man_MANS += tests/ovs-openflowd.8
+tests_test_openflowd_SOURCES = tests/test-openflowd.c
+tests_test_openflowd_LDADD = \
+       ofproto/libofproto.a \
+       lib/libsflow.a \
+       lib/libopenvswitch.a \
+       $(SSL_LIBS)
+
+
+noinst_PROGRAMS += tests/test-packets
+tests_test_packets_SOURCES = tests/test-packets.c
+tests_test_packets_LDADD = lib/libopenvswitch.a
+
 noinst_PROGRAMS += tests/test-random
 tests_test_random_SOURCES = tests/test-random.c
 tests_test_random_LDADD = lib/libopenvswitch.a
@@ -226,6 +267,10 @@ noinst_PROGRAMS += tests/test-unix-socket
 tests_test_unix_socket_SOURCES = tests/test-unix-socket.c
 tests_test_unix_socket_LDADD = lib/libopenvswitch.a
 
+noinst_PROGRAMS += tests/test-odp
+tests_test_odp_SOURCES = tests/test-odp.c
+tests_test_odp_LDADD = lib/libopenvswitch.a
+
 noinst_PROGRAMS += tests/test-ovsdb
 tests_test_ovsdb_SOURCES = \
        tests/test-ovsdb.c \
@@ -235,15 +280,22 @@ EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl
 tests_test_ovsdb_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS)
 
 # idltest schema and IDL
-OVSIDL_BUILT +=        tests/idltest.c tests/idltest.h tests/idltest.ovsidl
+OVSIDL_BUILT += \
+       tests/idltest.c \
+       tests/idltest.h \
+       tests/idltest.ovsidl \
+       tests/idltest.py
 IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
 EXTRA_DIST += $(IDLTEST_IDL_FILES)
+CLEANFILES += tests/idltest.pyc tests/idltest.pyo
 tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
        $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp
        mv $@.tmp $@
 
 tests/idltest.c: tests/idltest.h
 
+noinst_SCRIPTS += tests/idltest.py
+
 noinst_PROGRAMS += tests/test-reconnect
 tests_test_reconnect_SOURCES = tests/test-reconnect.c
 tests_test_reconnect_LDADD = lib/libopenvswitch.a
@@ -262,9 +314,9 @@ tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
 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
-tests_test_dhcp_client_LDADD = lib/libopenvswitch.a
+noinst_PROGRAMS += tests/test-util
+tests_test_util_SOURCES = tests/test-util.c
+tests_test_util_LDADD = lib/libopenvswitch.a
 
 noinst_PROGRAMS += tests/test-uuid
 tests_test_uuid_SOURCES = tests/test-uuid.c
@@ -273,14 +325,6 @@ tests_test_uuid_LDADD = lib/libopenvswitch.a
 noinst_PROGRAMS += tests/test-vconn
 tests_test_vconn_SOURCES = tests/test-vconn.c
 tests_test_vconn_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
-EXTRA_DIST += \
-       tests/testpki-cacert.pem \
-       tests/testpki-cert.pem \
-       tests/testpki-cert2.pem \
-       tests/testpki-privkey.pem \
-       tests/testpki-privkey2.pem \
-       tests/testpki-req.pem \
-       tests/testpki-req2.pem
 
 noinst_PROGRAMS += tests/test-byte-order
 tests_test_byte_order_SOURCES = tests/test-byte-order.c
@@ -292,4 +336,41 @@ EXTRA_DIST += \
        tests/test-json.py \
        tests/test-jsonrpc.py \
        tests/test-ovsdb.py \
-       tests/test-reconnect.py
+       tests/test-reconnect.py \
+       tests/MockXenAPI.py
+
+if HAVE_OPENSSL
+TESTPKI_FILES = \
+       tests/testpki-cacert.pem \
+       tests/testpki-cert.pem \
+       tests/testpki-privkey.pem \
+       tests/testpki-req.pem \
+       tests/testpki-cert2.pem \
+       tests/testpki-privkey2.pem \
+       tests/testpki-req2.pem
+check_DATA += $(TESTPKI_FILES)
+CLEANFILES += $(TESTPKI_FILES)
+
+tests/testpki-cacert.pem: tests/pki/stamp; cp tests/pki/switchca/cacert.pem $@
+tests/testpki-cert.pem: tests/pki/stamp; cp tests/pki/test-cert.pem $@
+tests/testpki-req.pem: tests/pki/stamp; cp tests/pki/test-req.pem $@
+tests/testpki-privkey.pem: tests/pki/stamp; cp tests/pki/test-privkey.pem $@
+tests/testpki-cert2.pem: tests/pki/stamp; cp tests/pki/test2-cert.pem $@
+tests/testpki-req2.pem: tests/pki/stamp; cp tests/pki/test2-req.pem $@
+tests/testpki-privkey2.pem: tests/pki/stamp; cp tests/pki/test2-privkey.pem $@
+
+OVS_PKI = $(SHELL) $(srcdir)/utilities/ovs-pki.in --dir=tests/pki --log=tests/ovs-pki.log
+tests/pki/stamp:
+       rm -f tests/pki/stamp
+       rm -rf tests/pki
+       $(OVS_PKI) init
+       $(OVS_PKI) req+sign tests/pki/test
+       $(OVS_PKI) req+sign tests/pki/test2
+       : > tests/pki/stamp
+CLEANFILES += tests/ovs-pki.log
+
+CLEAN_LOCAL += clean-pki
+clean-pki:
+       rm -f tests/pki/stamp
+       rm -rf tests/pki
+endif