Makefiles: Add $(AM_V_GEN) annotations to clean up "make" output.
[cascardo/ovs.git] / tests / automake.mk
index fc584d6..1f13230 100644 (file)
@@ -37,7 +37,9 @@ TESTSUITE_AT = \
        tests/lockfile.at \
        tests/reconnect.at \
        tests/ovs-vswitchd.at \
+       tests/dpif-netdev.at \
        tests/ofproto-dpif.at \
+       tests/bridge.at \
        tests/vlan-splinters.at \
        tests/ofproto-macros.at \
        tests/ofproto.at \
@@ -63,6 +65,7 @@ TESTSUITE_AT = \
        tests/ovs-monitor-ipsec.at \
        tests/ovs-xapi-sync.at \
        tests/stp.at \
+       tests/rstp.at \
        tests/interface-reconfigure.at \
        tests/vlog.at \
        tests/vtep-ctl.at
@@ -105,11 +108,10 @@ valgrind_wrappers = \
        tests/valgrind/test-bundle \
        tests/valgrind/test-byte-order \
        tests/valgrind/test-classifier \
+       tests/valgrind/test-cmap \
        tests/valgrind/test-csum \
-       tests/valgrind/test-file_name \
        tests/valgrind/test-flows \
        tests/valgrind/test-hash \
-       tests/valgrind/test-heap \
        tests/valgrind/test-hindex \
        tests/valgrind/test-hmap \
        tests/valgrind/test-json \
@@ -122,6 +124,7 @@ valgrind_wrappers = \
        tests/valgrind/test-packets \
        tests/valgrind/test-random \
        tests/valgrind/test-reconnect \
+       tests/valgrind/test-rstp \
        tests/valgrind/test-sha1 \
        tests/valgrind/test-stp \
        tests/valgrind/test-type-props \
@@ -131,9 +134,9 @@ valgrind_wrappers = \
 
 $(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
+       $(AM_V_GEN) 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
@@ -153,12 +156,12 @@ check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \
 # OFTest support.
 
 check-oftest: all
-       srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-oftest
+       $(AM_V_at)srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-oftest
 EXTRA_DIST += tests/run-oftest
 
 # Ryu support.
 check-ryu: all
-       srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-ryu
+       $(AM_V_at)srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-ryu
 EXTRA_DIST += tests/run-ryu
 \f
 clean-local:
@@ -166,12 +169,12 @@ clean-local:
 
 AUTOTEST = $(AUTOM4TE) --language=autotest
 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
-       $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
-       mv $@.tmp $@
+       $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
+       $(AM_V_at)mv $@.tmp $@
 
 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
-       :;{ \
+       $(AM_V_GEN):;{ \
          echo '# Signature of the current package.' && \
          echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])' && \
          echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])' && \
@@ -180,106 +183,6 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
          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
-
-noinst_PROGRAMS += tests/test-classifier
-tests_test_classifier_SOURCES = tests/test-classifier.c
-tests_test_classifier_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-controller
-MAN_ROOTS += tests/test-controller.8.in
-DISTCLEANFILES += tests/test-controller.8
-noinst_man_MANS += tests/test-controller.8
-tests_test_controller_SOURCES = tests/test-controller.c
-tests_test_controller_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-csum
-tests_test_csum_SOURCES = tests/test-csum.c
-tests_test_csum_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-file_name
-tests_test_file_name_SOURCES = tests/test-file_name.c
-tests_test_file_name_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-flows
-tests_test_flows_SOURCES = tests/test-flows.c
-tests_test_flows_LDADD = lib/libopenvswitch.la
-dist_check_SCRIPTS = tests/flowgen.pl
-
-noinst_PROGRAMS += tests/test-hash
-tests_test_hash_SOURCES = tests/test-hash.c
-tests_test_hash_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-heap
-tests_test_heap_SOURCES = tests/test-heap.c
-tests_test_heap_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-hindex
-tests_test_hindex_SOURCES = tests/test-hindex.c
-tests_test_hindex_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-hmap
-tests_test_hmap_SOURCES = tests/test-hmap.c
-tests_test_hmap_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-json
-tests_test_json_SOURCES = tests/test-json.c
-tests_test_json_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-jsonrpc
-tests_test_jsonrpc_SOURCES = tests/test-jsonrpc.c
-tests_test_jsonrpc_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-list
-tests_test_list_SOURCES = tests/test-list.c
-tests_test_list_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-lockfile
-tests_test_lockfile_SOURCES = tests/test-lockfile.c
-tests_test_lockfile_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-multipath
-tests_test_multipath_SOURCES = tests/test-multipath.c
-tests_test_multipath_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-packets
-tests_test_packets_SOURCES = tests/test-packets.c
-tests_test_packets_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-random
-tests_test_random_SOURCES = tests/test-random.c
-tests_test_random_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-stp
-tests_test_stp_SOURCES = tests/test-stp.c
-tests_test_stp_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-sflow
-tests_test_sflow_SOURCES = tests/test-sflow.c
-tests_test_sflow_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-netflow
-tests_test_netflow_SOURCES = tests/test-netflow.c
-tests_test_netflow_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-unix-socket
-tests_test_unix_socket_SOURCES = tests/test-unix-socket.c
-tests_test_unix_socket_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-odp
-tests_test_odp_SOURCES = tests/test-odp.c
-tests_test_odp_LDADD = lib/libopenvswitch.la
-
 noinst_PROGRAMS += tests/test-ovsdb
 tests_test_ovsdb_SOURCES = \
        tests/test-ovsdb.c \
@@ -293,23 +196,60 @@ 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
+       $(AM_V_GEN)$(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp && \
        mv $@.tmp $@
 
 tests/idltest.c: tests/idltest.h
 
-noinst_PROGRAMS += tests/ovstest
-tests_ovstest_SOURCES = tests/ovstest.c \
-        tests/ovstest.h
-tests_ovstest_LDADD = lib/libopenvswitch.la
+if DPDK_NETDEV
+noinst_PROGRAMS += tests/ovsclient
+tests_ovsclient_SOURCES = \
+       tests/ovs_client/ovs_client.c
+tests_ovsclient_LDADD = lib/libopenvswitch.la $(LIBS)
+endif
 
-noinst_PROGRAMS += tests/test-reconnect
-tests_test_reconnect_SOURCES = tests/test-reconnect.c
-tests_test_reconnect_LDADD = lib/libopenvswitch.la
+noinst_PROGRAMS += tests/ovstest
+tests_ovstest_SOURCES = \
+       tests/ovstest.c \
+       tests/ovstest.h \
+       tests/test-aes128.c \
+       tests/test-atomic.c \
+       tests/test-bundle.c \
+       tests/test-byte-order.c \
+       tests/test-classifier.c \
+       tests/test-cmap.c \
+       tests/test-csum.c \
+       tests/test-flows.c \
+       tests/test-hash.c \
+       tests/test-heap.c \
+       tests/test-hindex.c \
+       tests/test-hmap.c \
+       tests/test-json.c \
+       tests/test-jsonrpc.c \
+       tests/test-list.c \
+       tests/test-lockfile.c \
+       tests/test-multipath.c \
+       tests/test-netflow.c \
+       tests/test-odp.c \
+       tests/test-packets.c \
+       tests/test-random.c \
+       tests/test-reconnect.c \
+       tests/test-rstp.c \
+       tests/test-sflow.c \
+       tests/test-sha1.c \
+       tests/test-stp.c \
+       tests/test-util.c \
+       tests/test-uuid.c \
+       tests/test-bitmap.c \
+       tests/test-vconn.c
+
+if !WIN32
+tests_ovstest_SOURCES += \
+       tests/test-unix-socket.c
+endif
 
-noinst_PROGRAMS += tests/test-sha1
-tests_test_sha1_SOURCES = tests/test-sha1.c
-tests_test_sha1_LDADD = lib/libopenvswitch.la
+tests_ovstest_LDADD = lib/libopenvswitch.la
+dist_check_SCRIPTS = tests/flowgen.pl
 
 noinst_PROGRAMS += tests/test-strtok_r
 tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
@@ -317,22 +257,6 @@ 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-util
-tests_test_util_SOURCES = tests/test-util.c
-tests_test_util_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-uuid
-tests_test_uuid_SOURCES = tests/test-uuid.c
-tests_test_uuid_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-vconn
-tests_test_vconn_SOURCES = tests/test-vconn.c
-tests_test_vconn_LDADD = lib/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-byte-order
-tests_test_byte_order_SOURCES = tests/test-byte-order.c
-tests_test_byte_order_LDADD = lib/libopenvswitch.la
-
 # Python tests.
 CHECK_PYFILES = \
        tests/appctl.py \
@@ -360,21 +284,28 @@ TESTPKI_FILES = \
 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 $@
+tests/testpki-cacert.pem: tests/pki/stamp
+       $(AM_V_GEN)cp tests/pki/switchca/cacert.pem $@
+tests/testpki-cert.pem: tests/pki/stamp
+       $(AM_V_GEN)cp tests/pki/test-cert.pem $@
+tests/testpki-req.pem: tests/pki/stamp
+       $(AM_V_GEN)cp tests/pki/test-req.pem $@
+tests/testpki-privkey.pem: tests/pki/stamp
+       $(AM_V_GEN)cp tests/pki/test-privkey.pem $@
+tests/testpki-cert2.pem: tests/pki/stamp
+       $(AM_V_GEN)cp tests/pki/test2-cert.pem $@
+tests/testpki-req2.pem: tests/pki/stamp
+       $(AM_V_GEN)cp tests/pki/test2-req.pem $@
+tests/testpki-privkey2.pem: tests/pki/stamp
+       $(AM_V_GEN)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
+       $(AM_V_at)rm -f tests/pki/stamp
+       $(AM_V_at)rm -rf tests/pki
+       $(AM_V_GEN)$(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