tests: Fix Y2011 bug in testsuite.
[sliver-openvswitch.git] / tests / automake.mk
index 0bac351..0098c20 100644 (file)
@@ -13,6 +13,7 @@ TESTSUITE_AT = \
        tests/daemon.at \
        tests/daemon-py.at \
        tests/ovs-ofctl.at \
+       tests/multipath.at \
        tests/vconn.at \
        tests/file_name.at \
        tests/aes128.at \
@@ -23,6 +24,7 @@ TESTSUITE_AT = \
        tests/timeval.at \
        tests/lockfile.at \
        tests/reconnect.at \
+       tests/ofproto.at \
        tests/ovsdb.at \
        tests/ovsdb-log.at \
        tests/ovsdb-types.at \
@@ -45,7 +47,7 @@ TESTSUITE_AT = \
        tests/ovs-vsctl.at \
        tests/interface-reconfigure.at
 TESTSUITE = $(srcdir)/tests/testsuite
-DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
+DISTCLEANFILES += tests/atconfig tests/atlocal
 
 AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests
 
@@ -73,7 +75,9 @@ lcov_wrappers = \
        tests/lcov/test-jsonrpc \
        tests/lcov/test-list \
        tests/lcov/test-lockfile \
+       tests/lcov/test-multipath \
        tests/lcov/test-ovsdb \
+       tests/lcov/test-random \
        tests/lcov/test-reconnect \
        tests/lcov/test-sha1 \
        tests/lcov/test-timeval \
@@ -123,7 +127,9 @@ valgrind_wrappers = \
        tests/valgrind/test-jsonrpc \
        tests/valgrind/test-list \
        tests/valgrind/test-lockfile \
+       tests/valgrind/test-multipath \
        tests/valgrind/test-ovsdb \
+       tests/valgrind/test-random \
        tests/valgrind/test-reconnect \
        tests/valgrind/test-sha1 \
        tests/valgrind/test-timeval \
@@ -216,6 +222,14 @@ 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-random
+tests_test_random_SOURCES = tests/test-random.c
+tests_test_random_LDADD = lib/libopenvswitch.a
+
 noinst_PROGRAMS += tests/test-unix-socket
 tests_test_unix_socket_SOURCES = tests/test-unix-socket.c
 tests_test_unix_socket_LDADD = lib/libopenvswitch.a
@@ -267,14 +281,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
@@ -287,3 +293,39 @@ EXTRA_DIST += \
        tests/test-jsonrpc.py \
        tests/test-ovsdb.py \
        tests/test-reconnect.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