New utility ovs-vsctl.
[sliver-openvswitch.git] / tests / automake.mk
1 EXTRA_DIST += \
2         $(TESTSUITE_AT) \
3         $(TESTSUITE) \
4         tests/atlocal.in \
5         $(srcdir)/package.m4 \
6         $(srcdir)/tests/testsuite
7 TESTSUITE_AT = \
8         tests/testsuite.at \
9         tests/lcov-pre.at \
10         tests/library.at \
11         tests/stp.at \
12         tests/ovs-vsctl.at \
13         tests/lcov-post.at
14 TESTSUITE = $(srcdir)/tests/testsuite
15 DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
16
17 check-local: tests/atconfig tests/atlocal $(TESTSUITE)
18         $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH='utilities:vswitchd:tests' $(TESTSUITEFLAGS)
19
20 clean-local:
21         test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
22
23 AUTOM4TE = autom4te
24 AUTOTEST = $(AUTOM4TE) --language=autotest
25 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
26         $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
27         mv $@.tmp $@
28
29 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
30 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
31         :;{ \
32           echo '# Signature of the current package.' && \
33           echo 'm4_define([AT_PACKAGE_NAME],      [@PACKAGE_NAME@])' && \
34           echo 'm4_define([AT_PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])' && \
35           echo 'm4_define([AT_PACKAGE_VERSION],   [@PACKAGE_VERSION@])' && \
36           echo 'm4_define([AT_PACKAGE_STRING],    [@PACKAGE_STRING@])' && \
37           echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
38         } >'$(srcdir)/package.m4'
39
40 noinst_PROGRAMS += tests/test-classifier
41 tests_test_classifier_SOURCES = tests/test-classifier.c
42 tests_test_classifier_LDADD = lib/libopenvswitch.a
43
44 noinst_PROGRAMS += tests/test-csum
45 tests_test_csum_SOURCES = tests/test-csum.c
46 tests_test_csum_LDADD = lib/libopenvswitch.a
47
48 noinst_PROGRAMS += tests/test-flows
49 tests_test_flows_SOURCES = tests/test-flows.c
50 tests_test_flows_LDADD = lib/libopenvswitch.a
51 dist_check_SCRIPTS = tests/flowgen.pl
52
53 noinst_PROGRAMS += tests/test-hash
54 tests_test_hash_SOURCES = tests/test-hash.c
55 tests_test_hash_LDADD = lib/libopenvswitch.a
56
57 noinst_PROGRAMS += tests/test-hmap
58 tests_test_hmap_SOURCES = tests/test-hmap.c
59 tests_test_hmap_LDADD = lib/libopenvswitch.a
60
61 noinst_PROGRAMS += tests/test-list
62 tests_test_list_SOURCES = tests/test-list.c
63 tests_test_list_LDADD = lib/libopenvswitch.a
64
65 noinst_PROGRAMS += tests/test-sha1
66 tests_test_sha1_SOURCES = tests/test-sha1.c
67 tests_test_sha1_LDADD = lib/libopenvswitch.a
68
69 noinst_PROGRAMS += tests/test-type-props
70 tests_test_type_props_SOURCES = tests/test-type-props.c
71
72 noinst_PROGRAMS += tests/test-dhcp-client
73 tests_test_dhcp_client_SOURCES = tests/test-dhcp-client.c
74 tests_test_dhcp_client_LDADD = lib/libopenvswitch.a $(FAULT_LIBS)
75
76 noinst_PROGRAMS += tests/test-stp
77 tests_test_stp_SOURCES = tests/test-stp.c
78 tests_test_stp_LDADD = lib/libopenvswitch.a
79
80 noinst_PROGRAMS += tests/test-vconn
81 tests_test_vconn_SOURCES = tests/test-vconn.c
82 tests_test_vconn_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
83