]>
Commit | Line | Data |
---|---|---|
1b233b95 BP |
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 \ | |
24c8ae53 | 9 | tests/ovsdb-macros.at \ |
1b233b95 | 10 | tests/library.at \ |
05b3c97b | 11 | tests/check-structs.at \ |
ff8decf1 | 12 | tests/daemon.at \ |
d27ce529 | 13 | tests/vconn.at \ |
29d4af60 | 14 | tests/dir_name.at \ |
d918d9d1 BP |
15 | tests/aes128.at \ |
16 | tests/uuid.at \ | |
f38b84ea | 17 | tests/json.at \ |
f2129093 | 18 | tests/jsonrpc.at \ |
e7cfedd6 | 19 | tests/timeval.at \ |
ac718c9d | 20 | tests/lockfile.at \ |
3ed497fc | 21 | tests/reconnect.at \ |
f85f8ebb | 22 | tests/ovsdb.at \ |
41709ccc | 23 | tests/ovsdb-log.at \ |
f85f8ebb BP |
24 | tests/ovsdb-types.at \ |
25 | tests/ovsdb-data.at \ | |
26 | tests/ovsdb-column.at \ | |
27 | tests/ovsdb-table.at \ | |
28 | tests/ovsdb-row.at \ | |
29 | tests/ovsdb-condition.at \ | |
e9f8f936 | 30 | tests/ovsdb-mutation.at \ |
f85f8ebb BP |
31 | tests/ovsdb-query.at \ |
32 | tests/ovsdb-transaction.at \ | |
33 | tests/ovsdb-execution.at \ | |
34 | tests/ovsdb-trigger.at \ | |
21ff1aee BP |
35 | tests/ovsdb-file.at \ |
36 | tests/ovsdb-server.at \ | |
a8425c53 | 37 | tests/ovsdb-monitor.at \ |
c3bb4bd7 | 38 | tests/ovsdb-idl.at \ |
c2b07021 | 39 | tests/stp.at \ |
7c126fbb | 40 | tests/ovs-vsctl.at |
1b233b95 BP |
41 | TESTSUITE = $(srcdir)/tests/testsuite |
42 | DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE) | |
43 | ||
7c126fbb BP |
44 | AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests |
45 | ||
1b233b95 | 46 | check-local: tests/atconfig tests/atlocal $(TESTSUITE) |
7c126fbb BP |
47 | $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS) |
48 | \f | |
49 | # lcov support | |
50 | ||
51 | lcov_wrappers = \ | |
52 | tests/lcov/ovs-appctl \ | |
53 | tests/lcov/ovs-vsctl \ | |
54 | tests/lcov/ovsdb-client \ | |
55 | tests/lcov/ovsdb-server \ | |
56 | tests/lcov/ovsdb-tool \ | |
57 | tests/lcov/test-aes128 \ | |
58 | tests/lcov/test-classifier \ | |
59 | tests/lcov/test-csum \ | |
60 | tests/lcov/test-dhcp-client \ | |
61 | tests/lcov/test-dir_name \ | |
62 | tests/lcov/test-flows \ | |
63 | tests/lcov/test-hash \ | |
64 | tests/lcov/test-hmap \ | |
65 | tests/lcov/test-json \ | |
66 | tests/lcov/test-jsonrpc \ | |
67 | tests/lcov/test-list \ | |
68 | tests/lcov/test-lockfile \ | |
69 | tests/lcov/test-ovsdb \ | |
70 | tests/lcov/test-reconnect \ | |
71 | tests/lcov/test-sha1 \ | |
72 | tests/lcov/test-stp \ | |
73 | tests/lcov/test-timeval \ | |
74 | tests/lcov/test-type-props \ | |
75 | tests/lcov/test-uuid \ | |
76 | tests/lcov/test-vconn | |
77 | ||
78 | $(lcov_wrappers): tests/lcov-wrapper.in | |
79 | @test -d tests/lcov || mkdir tests/lcov | |
80 | sed -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),' \ | |
81 | -e 's,[@]wrap_program[@],$@,' \ | |
82 | $(top_srcdir)/tests/lcov-wrapper.in > $@.tmp | |
83 | chmod +x $@.tmp | |
84 | mv $@.tmp $@ | |
85 | CLEANFILES += $(lcov_wrappers) | |
86 | EXTRA_DIST += tests/lcov-wrapper.in | |
1b233b95 | 87 | |
7c126fbb BP |
88 | LCOV = lcov -b $(abs_top_builddir) -d $(abs_top_builddir) -q |
89 | check-lcov: all tests/atconfig tests/atlocal $(TESTSUITE) $(lcov_wrappers) | |
90 | rm -fr tests/coverage.html tests/coverage.info | |
91 | $(LCOV) -c -i -o - > tests/coverage.info | |
92 | $(SHELL) '$(TESTSUITE)' -C tests CHECK_LCOV=true AUTOTEST_PATH='tests/lcov:$(AUTOTEST_PATH)' $(TESTSUITEFLAGS); \ | |
93 | rc=$$?; \ | |
94 | echo "Producing coverage.html..."; \ | |
95 | cd tests && genhtml -q -o coverage.html coverage.info; \ | |
96 | exit $$rc | |
97 | \f | |
1b233b95 BP |
98 | clean-local: |
99 | test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean | |
100 | ||
101 | AUTOM4TE = autom4te | |
102 | AUTOTEST = $(AUTOM4TE) --language=autotest | |
103 | $(TESTSUITE): package.m4 $(TESTSUITE_AT) | |
104 | $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at | |
105 | mv $@.tmp $@ | |
106 | ||
107 | # The `:;' works around a Bash 3.2 bug when the output is not writeable. | |
108 | $(srcdir)/package.m4: $(top_srcdir)/configure.ac | |
109 | :;{ \ | |
110 | echo '# Signature of the current package.' && \ | |
f99cd6ee BP |
111 | echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \ |
112 | echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \ | |
113 | echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \ | |
114 | echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \ | |
115 | echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \ | |
1b233b95 BP |
116 | } >'$(srcdir)/package.m4' |
117 | ||
d918d9d1 BP |
118 | noinst_PROGRAMS += tests/test-aes128 |
119 | tests_test_aes128_SOURCES = tests/test-aes128.c | |
120 | tests_test_aes128_LDADD = lib/libopenvswitch.a | |
121 | ||
064af421 BP |
122 | noinst_PROGRAMS += tests/test-classifier |
123 | tests_test_classifier_SOURCES = tests/test-classifier.c | |
124 | tests_test_classifier_LDADD = lib/libopenvswitch.a | |
125 | ||
21effc03 BP |
126 | noinst_PROGRAMS += tests/test-csum |
127 | tests_test_csum_SOURCES = tests/test-csum.c | |
128 | tests_test_csum_LDADD = lib/libopenvswitch.a | |
129 | ||
29d4af60 BP |
130 | noinst_PROGRAMS += tests/test-dir_name |
131 | tests_test_dir_name_SOURCES = tests/test-dir_name.c | |
132 | tests_test_dir_name_LDADD = lib/libopenvswitch.a | |
133 | ||
064af421 BP |
134 | noinst_PROGRAMS += tests/test-flows |
135 | tests_test_flows_SOURCES = tests/test-flows.c | |
136 | tests_test_flows_LDADD = lib/libopenvswitch.a | |
1b233b95 | 137 | dist_check_SCRIPTS = tests/flowgen.pl |
064af421 | 138 | |
064af421 BP |
139 | noinst_PROGRAMS += tests/test-hash |
140 | tests_test_hash_SOURCES = tests/test-hash.c | |
141 | tests_test_hash_LDADD = lib/libopenvswitch.a | |
142 | ||
064af421 BP |
143 | noinst_PROGRAMS += tests/test-hmap |
144 | tests_test_hmap_SOURCES = tests/test-hmap.c | |
145 | tests_test_hmap_LDADD = lib/libopenvswitch.a | |
146 | ||
f38b84ea BP |
147 | noinst_PROGRAMS += tests/test-json |
148 | tests_test_json_SOURCES = tests/test-json.c | |
149 | tests_test_json_LDADD = lib/libopenvswitch.a | |
150 | ||
f2129093 BP |
151 | noinst_PROGRAMS += tests/test-jsonrpc |
152 | tests_test_jsonrpc_SOURCES = tests/test-jsonrpc.c | |
9467fe62 | 153 | tests_test_jsonrpc_LDADD = lib/libopenvswitch.a $(SSL_LIBS) |
f2129093 | 154 | |
064af421 BP |
155 | noinst_PROGRAMS += tests/test-list |
156 | tests_test_list_SOURCES = tests/test-list.c | |
157 | tests_test_list_LDADD = lib/libopenvswitch.a | |
158 | ||
ac718c9d BP |
159 | noinst_PROGRAMS += tests/test-lockfile |
160 | tests_test_lockfile_SOURCES = tests/test-lockfile.c | |
161 | tests_test_lockfile_LDADD = lib/libopenvswitch.a | |
162 | ||
f85f8ebb | 163 | noinst_PROGRAMS += tests/test-ovsdb |
00732bf5 BP |
164 | tests_test_ovsdb_SOURCES = \ |
165 | tests/test-ovsdb.c \ | |
166 | tests/idltest.c \ | |
167 | tests/idltest.h | |
168 | EXTRA_DIST += tests/uuidfilt.pl | |
55709289 | 169 | tests_test_ovsdb_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS) |
00732bf5 BP |
170 | |
171 | # idltest schema and IDL | |
172 | OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl | |
173 | IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann | |
174 | EXTRA_DIST += $(IDLTEST_IDL_FILES) | |
175 | tests/idltest.ovsidl: $(IDLTEST_IDL_FILES) | |
176 | $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp | |
177 | mv $@.tmp $@ | |
178 | ||
b0fc010a | 179 | tests/idltest.c: tests/idltest.h |
f85f8ebb | 180 | |
3ed497fc BP |
181 | noinst_PROGRAMS += tests/test-reconnect |
182 | tests_test_reconnect_SOURCES = tests/test-reconnect.c | |
183 | tests_test_reconnect_LDADD = lib/libopenvswitch.a | |
184 | ||
d138cd2c BP |
185 | noinst_PROGRAMS += tests/test-sha1 |
186 | tests_test_sha1_SOURCES = tests/test-sha1.c | |
187 | tests_test_sha1_LDADD = lib/libopenvswitch.a | |
188 | ||
e7cfedd6 BP |
189 | noinst_PROGRAMS += tests/test-timeval |
190 | tests_test_timeval_SOURCES = tests/test-timeval.c | |
191 | tests_test_timeval_LDADD = lib/libopenvswitch.a | |
192 | ||
064af421 BP |
193 | noinst_PROGRAMS += tests/test-type-props |
194 | tests_test_type_props_SOURCES = tests/test-type-props.c | |
195 | ||
196 | noinst_PROGRAMS += tests/test-dhcp-client | |
197 | tests_test_dhcp_client_SOURCES = tests/test-dhcp-client.c | |
250382a8 | 198 | tests_test_dhcp_client_LDADD = lib/libopenvswitch.a |
064af421 | 199 | |
064af421 | 200 | noinst_PROGRAMS += tests/test-stp |
064af421 BP |
201 | tests_test_stp_SOURCES = tests/test-stp.c |
202 | tests_test_stp_LDADD = lib/libopenvswitch.a | |
1b233b95 | 203 | |
d918d9d1 BP |
204 | noinst_PROGRAMS += tests/test-uuid |
205 | tests_test_uuid_SOURCES = tests/test-uuid.c | |
206 | tests_test_uuid_LDADD = lib/libopenvswitch.a | |
207 | ||
48d973e3 BP |
208 | noinst_PROGRAMS += tests/test-vconn |
209 | tests_test_vconn_SOURCES = tests/test-vconn.c | |
210 | tests_test_vconn_LDADD = lib/libopenvswitch.a $(SSL_LIBS) | |
4c4d10b1 BP |
211 | EXTRA_DIST += \ |
212 | tests/testpki-cacert.pem \ | |
213 | tests/testpki-cert.pem \ | |
80d326ad | 214 | tests/testpki-cert2.pem \ |
4c4d10b1 | 215 | tests/testpki-privkey.pem \ |
80d326ad BP |
216 | tests/testpki-privkey2.pem \ |
217 | tests/testpki-req.pem \ | |
218 | tests/testpki-req2.pem |