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