]>
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 \ |
daff3353 | 11 | tests/bundle.at \ |
3223e977 | 12 | tests/classifier.at \ |
05b3c97b | 13 | tests/check-structs.at \ |
ff8decf1 | 14 | tests/daemon.at \ |
99155935 | 15 | tests/daemon-py.at \ |
fec00620 | 16 | tests/ofp-print.at \ |
0e581146 | 17 | tests/ovs-ofctl.at \ |
53ddd40a | 18 | tests/multipath.at \ |
f8064ac9 | 19 | tests/autopath.at \ |
d27ce529 | 20 | tests/vconn.at \ |
e1aff6f9 | 21 | tests/file_name.at \ |
d918d9d1 BP |
22 | tests/aes128.at \ |
23 | tests/uuid.at \ | |
f38b84ea | 24 | tests/json.at \ |
f2129093 | 25 | tests/jsonrpc.at \ |
99155935 | 26 | tests/jsonrpc-py.at \ |
e7cfedd6 | 27 | tests/timeval.at \ |
ac718c9d | 28 | tests/lockfile.at \ |
3ed497fc | 29 | tests/reconnect.at \ |
0fbc9f11 | 30 | tests/ofproto-macros.at \ |
a2cb9dfd | 31 | tests/ofproto.at \ |
f85f8ebb | 32 | tests/ovsdb.at \ |
41709ccc | 33 | tests/ovsdb-log.at \ |
f85f8ebb BP |
34 | tests/ovsdb-types.at \ |
35 | tests/ovsdb-data.at \ | |
36 | tests/ovsdb-column.at \ | |
37 | tests/ovsdb-table.at \ | |
38 | tests/ovsdb-row.at \ | |
0d0f05b9 | 39 | tests/ovsdb-schema.at \ |
f85f8ebb | 40 | tests/ovsdb-condition.at \ |
e9f8f936 | 41 | tests/ovsdb-mutation.at \ |
f85f8ebb BP |
42 | tests/ovsdb-query.at \ |
43 | tests/ovsdb-transaction.at \ | |
44 | tests/ovsdb-execution.at \ | |
45 | tests/ovsdb-trigger.at \ | |
1e19e50e | 46 | tests/ovsdb-tool.at \ |
21ff1aee | 47 | tests/ovsdb-server.at \ |
a8425c53 | 48 | tests/ovsdb-monitor.at \ |
c3bb4bd7 | 49 | tests/ovsdb-idl.at \ |
99155935 | 50 | tests/ovsdb-idl-py.at \ |
48d014bf BP |
51 | tests/ovs-vsctl.at \ |
52 | tests/interface-reconfigure.at | |
1b233b95 | 53 | TESTSUITE = $(srcdir)/tests/testsuite |
7fe079c2 | 54 | DISTCLEANFILES += tests/atconfig tests/atlocal |
1b233b95 | 55 | |
7c126fbb BP |
56 | AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests |
57 | ||
1b233b95 | 58 | check-local: tests/atconfig tests/atlocal $(TESTSUITE) |
7c126fbb BP |
59 | $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS) |
60 | \f | |
61 | # lcov support | |
62 | ||
63 | lcov_wrappers = \ | |
64 | tests/lcov/ovs-appctl \ | |
65 | tests/lcov/ovs-vsctl \ | |
66 | tests/lcov/ovsdb-client \ | |
67 | tests/lcov/ovsdb-server \ | |
68 | tests/lcov/ovsdb-tool \ | |
69 | tests/lcov/test-aes128 \ | |
daff3353 | 70 | tests/lcov/test-bundle \ |
10a24935 | 71 | tests/lcov/test-byte-order \ |
7c126fbb BP |
72 | tests/lcov/test-classifier \ |
73 | tests/lcov/test-csum \ | |
e1aff6f9 | 74 | tests/lcov/test-file_name \ |
7c126fbb BP |
75 | tests/lcov/test-flows \ |
76 | tests/lcov/test-hash \ | |
77 | tests/lcov/test-hmap \ | |
78 | tests/lcov/test-json \ | |
79 | tests/lcov/test-jsonrpc \ | |
80 | tests/lcov/test-list \ | |
81 | tests/lcov/test-lockfile \ | |
53ddd40a | 82 | tests/lcov/test-multipath \ |
7c126fbb | 83 | tests/lcov/test-ovsdb \ |
f696f12f | 84 | tests/lcov/test-packets \ |
78f3f316 | 85 | tests/lcov/test-random \ |
7c126fbb BP |
86 | tests/lcov/test-reconnect \ |
87 | tests/lcov/test-sha1 \ | |
7c126fbb BP |
88 | tests/lcov/test-timeval \ |
89 | tests/lcov/test-type-props \ | |
6e170b4c | 90 | tests/lcov/test-unix-socket \ |
7c126fbb | 91 | tests/lcov/test-uuid \ |
10a24935 | 92 | tests/lcov/test-vconn |
7c126fbb BP |
93 | |
94 | $(lcov_wrappers): tests/lcov-wrapper.in | |
95 | @test -d tests/lcov || mkdir tests/lcov | |
96 | sed -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),' \ | |
97 | -e 's,[@]wrap_program[@],$@,' \ | |
98 | $(top_srcdir)/tests/lcov-wrapper.in > $@.tmp | |
99 | chmod +x $@.tmp | |
100 | mv $@.tmp $@ | |
101 | CLEANFILES += $(lcov_wrappers) | |
102 | EXTRA_DIST += tests/lcov-wrapper.in | |
1b233b95 | 103 | |
7c126fbb BP |
104 | LCOV = lcov -b $(abs_top_builddir) -d $(abs_top_builddir) -q |
105 | check-lcov: all tests/atconfig tests/atlocal $(TESTSUITE) $(lcov_wrappers) | |
106 | rm -fr tests/coverage.html tests/coverage.info | |
107 | $(LCOV) -c -i -o - > tests/coverage.info | |
7454ec7a | 108 | $(SHELL) '$(TESTSUITE)' -C tests CHECK_LCOV=true DISABLE_LCOV=false AUTOTEST_PATH='tests/lcov:$(AUTOTEST_PATH)' $(TESTSUITEFLAGS); \ |
7c126fbb BP |
109 | rc=$$?; \ |
110 | echo "Producing coverage.html..."; \ | |
111 | cd tests && genhtml -q -o coverage.html coverage.info; \ | |
112 | exit $$rc | |
113 | \f | |
b6fa4447 BP |
114 | # valgrind support |
115 | ||
116 | valgrind_wrappers = \ | |
117 | tests/valgrind/ovs-appctl \ | |
118 | tests/valgrind/ovs-vsctl \ | |
119 | tests/valgrind/ovsdb-client \ | |
120 | tests/valgrind/ovsdb-server \ | |
121 | tests/valgrind/ovsdb-tool \ | |
122 | tests/valgrind/test-aes128 \ | |
daff3353 | 123 | tests/valgrind/test-bundle \ |
10a24935 | 124 | tests/valgrind/test-byte-order \ |
b6fa4447 BP |
125 | tests/valgrind/test-classifier \ |
126 | tests/valgrind/test-csum \ | |
e1aff6f9 | 127 | tests/valgrind/test-file_name \ |
b6fa4447 BP |
128 | tests/valgrind/test-flows \ |
129 | tests/valgrind/test-hash \ | |
130 | tests/valgrind/test-hmap \ | |
131 | tests/valgrind/test-json \ | |
132 | tests/valgrind/test-jsonrpc \ | |
133 | tests/valgrind/test-list \ | |
134 | tests/valgrind/test-lockfile \ | |
53ddd40a | 135 | tests/valgrind/test-multipath \ |
045b2e5c | 136 | tests/valgrind/test-openflowd \ |
b6fa4447 | 137 | tests/valgrind/test-ovsdb \ |
f696f12f | 138 | tests/valgrind/test-packets \ |
78f3f316 | 139 | tests/valgrind/test-random \ |
b6fa4447 BP |
140 | tests/valgrind/test-reconnect \ |
141 | tests/valgrind/test-sha1 \ | |
b6fa4447 BP |
142 | tests/valgrind/test-timeval \ |
143 | tests/valgrind/test-type-props \ | |
6e170b4c | 144 | tests/valgrind/test-unix-socket \ |
b6fa4447 | 145 | tests/valgrind/test-uuid \ |
10a24935 | 146 | tests/valgrind/test-vconn |
b6fa4447 BP |
147 | |
148 | $(valgrind_wrappers): tests/valgrind-wrapper.in | |
149 | @test -d tests/valgrind || mkdir tests/valgrind | |
150 | sed -e 's,[@]wrap_program[@],$@,' \ | |
151 | $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp | |
152 | chmod +x $@.tmp | |
153 | mv $@.tmp $@ | |
154 | CLEANFILES += $(valgrind_wrappers) | |
155 | EXTRA_DIST += tests/valgrind-wrapper.in | |
156 | ||
157 | VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \ | |
158 | --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20 | |
159 | EXTRA_DIST += tests/openssl.supp | |
160 | check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) $(valgrind_wrappers) | |
161 | $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) | |
162 | @echo | |
163 | @echo '----------------------------------------------------------------------' | |
164 | @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*' | |
165 | @echo '----------------------------------------------------------------------' | |
166 | \f | |
1b233b95 BP |
167 | clean-local: |
168 | test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean | |
169 | ||
170 | AUTOM4TE = autom4te | |
171 | AUTOTEST = $(AUTOM4TE) --language=autotest | |
172 | $(TESTSUITE): package.m4 $(TESTSUITE_AT) | |
173 | $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at | |
174 | mv $@.tmp $@ | |
175 | ||
176 | # The `:;' works around a Bash 3.2 bug when the output is not writeable. | |
177 | $(srcdir)/package.m4: $(top_srcdir)/configure.ac | |
178 | :;{ \ | |
179 | echo '# Signature of the current package.' && \ | |
f99cd6ee BP |
180 | echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \ |
181 | echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \ | |
182 | echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \ | |
183 | echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \ | |
184 | echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \ | |
1b233b95 BP |
185 | } >'$(srcdir)/package.m4' |
186 | ||
d918d9d1 BP |
187 | noinst_PROGRAMS += tests/test-aes128 |
188 | tests_test_aes128_SOURCES = tests/test-aes128.c | |
189 | tests_test_aes128_LDADD = lib/libopenvswitch.a | |
190 | ||
daff3353 EJ |
191 | noinst_PROGRAMS += tests/test-bundle |
192 | tests_test_bundle_SOURCES = tests/test-bundle.c | |
193 | tests_test_bundle_LDADD = lib/libopenvswitch.a | |
194 | ||
064af421 BP |
195 | noinst_PROGRAMS += tests/test-classifier |
196 | tests_test_classifier_SOURCES = tests/test-classifier.c | |
197 | tests_test_classifier_LDADD = lib/libopenvswitch.a | |
198 | ||
21effc03 BP |
199 | noinst_PROGRAMS += tests/test-csum |
200 | tests_test_csum_SOURCES = tests/test-csum.c | |
201 | tests_test_csum_LDADD = lib/libopenvswitch.a | |
202 | ||
e1aff6f9 BP |
203 | noinst_PROGRAMS += tests/test-file_name |
204 | tests_test_file_name_SOURCES = tests/test-file_name.c | |
205 | tests_test_file_name_LDADD = lib/libopenvswitch.a | |
29d4af60 | 206 | |
064af421 BP |
207 | noinst_PROGRAMS += tests/test-flows |
208 | tests_test_flows_SOURCES = tests/test-flows.c | |
209 | tests_test_flows_LDADD = lib/libopenvswitch.a | |
1b233b95 | 210 | dist_check_SCRIPTS = tests/flowgen.pl |
064af421 | 211 | |
064af421 BP |
212 | noinst_PROGRAMS += tests/test-hash |
213 | tests_test_hash_SOURCES = tests/test-hash.c | |
214 | tests_test_hash_LDADD = lib/libopenvswitch.a | |
215 | ||
064af421 BP |
216 | noinst_PROGRAMS += tests/test-hmap |
217 | tests_test_hmap_SOURCES = tests/test-hmap.c | |
218 | tests_test_hmap_LDADD = lib/libopenvswitch.a | |
219 | ||
f38b84ea BP |
220 | noinst_PROGRAMS += tests/test-json |
221 | tests_test_json_SOURCES = tests/test-json.c | |
222 | tests_test_json_LDADD = lib/libopenvswitch.a | |
223 | ||
f2129093 BP |
224 | noinst_PROGRAMS += tests/test-jsonrpc |
225 | tests_test_jsonrpc_SOURCES = tests/test-jsonrpc.c | |
9467fe62 | 226 | tests_test_jsonrpc_LDADD = lib/libopenvswitch.a $(SSL_LIBS) |
f2129093 | 227 | |
064af421 BP |
228 | noinst_PROGRAMS += tests/test-list |
229 | tests_test_list_SOURCES = tests/test-list.c | |
230 | tests_test_list_LDADD = lib/libopenvswitch.a | |
231 | ||
ac718c9d BP |
232 | noinst_PROGRAMS += tests/test-lockfile |
233 | tests_test_lockfile_SOURCES = tests/test-lockfile.c | |
234 | tests_test_lockfile_LDADD = lib/libopenvswitch.a | |
235 | ||
53ddd40a BP |
236 | noinst_PROGRAMS += tests/test-multipath |
237 | tests_test_multipath_SOURCES = tests/test-multipath.c | |
238 | tests_test_multipath_LDADD = lib/libopenvswitch.a | |
239 | ||
045b2e5c BP |
240 | noinst_PROGRAMS += tests/test-openflowd |
241 | EXTRA_DIST += tests/test-openflowd.8.in | |
242 | DISTCLEANFILES += tests/test-openflowd.8 | |
243 | noinst_man_MANS += tests/ovs-openflowd.8 | |
244 | tests_test_openflowd_SOURCES = tests/test-openflowd.c | |
245 | tests_test_openflowd_LDADD = \ | |
246 | ofproto/libofproto.a \ | |
247 | lib/libsflow.a \ | |
248 | lib/libopenvswitch.a \ | |
249 | $(SSL_LIBS) | |
250 | ||
251 | ||
f696f12f JP |
252 | noinst_PROGRAMS += tests/test-packets |
253 | tests_test_packets_SOURCES = tests/test-packets.c | |
254 | tests_test_packets_LDADD = lib/libopenvswitch.a | |
255 | ||
78f3f316 BP |
256 | noinst_PROGRAMS += tests/test-random |
257 | tests_test_random_SOURCES = tests/test-random.c | |
258 | tests_test_random_LDADD = lib/libopenvswitch.a | |
259 | ||
6e170b4c BP |
260 | noinst_PROGRAMS += tests/test-unix-socket |
261 | tests_test_unix_socket_SOURCES = tests/test-unix-socket.c | |
262 | tests_test_unix_socket_LDADD = lib/libopenvswitch.a | |
263 | ||
f85f8ebb | 264 | noinst_PROGRAMS += tests/test-ovsdb |
00732bf5 BP |
265 | tests_test_ovsdb_SOURCES = \ |
266 | tests/test-ovsdb.c \ | |
267 | tests/idltest.c \ | |
268 | tests/idltest.h | |
7360012b | 269 | EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl |
a26cc67c | 270 | tests_test_ovsdb_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS) |
00732bf5 BP |
271 | |
272 | # idltest schema and IDL | |
273 | OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl | |
274 | IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann | |
275 | EXTRA_DIST += $(IDLTEST_IDL_FILES) | |
276 | tests/idltest.ovsidl: $(IDLTEST_IDL_FILES) | |
277 | $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp | |
278 | mv $@.tmp $@ | |
279 | ||
b0fc010a | 280 | tests/idltest.c: tests/idltest.h |
f85f8ebb | 281 | |
3ed497fc BP |
282 | noinst_PROGRAMS += tests/test-reconnect |
283 | tests_test_reconnect_SOURCES = tests/test-reconnect.c | |
284 | tests_test_reconnect_LDADD = lib/libopenvswitch.a | |
285 | ||
d138cd2c BP |
286 | noinst_PROGRAMS += tests/test-sha1 |
287 | tests_test_sha1_SOURCES = tests/test-sha1.c | |
288 | tests_test_sha1_LDADD = lib/libopenvswitch.a | |
289 | ||
e7cfedd6 BP |
290 | noinst_PROGRAMS += tests/test-timeval |
291 | tests_test_timeval_SOURCES = tests/test-timeval.c | |
292 | tests_test_timeval_LDADD = lib/libopenvswitch.a | |
293 | ||
78f172aa BP |
294 | noinst_PROGRAMS += tests/test-strtok_r |
295 | tests_test_strtok_r_SOURCES = tests/test-strtok_r.c | |
296 | ||
064af421 BP |
297 | noinst_PROGRAMS += tests/test-type-props |
298 | tests_test_type_props_SOURCES = tests/test-type-props.c | |
299 | ||
d918d9d1 BP |
300 | noinst_PROGRAMS += tests/test-uuid |
301 | tests_test_uuid_SOURCES = tests/test-uuid.c | |
302 | tests_test_uuid_LDADD = lib/libopenvswitch.a | |
303 | ||
48d973e3 BP |
304 | noinst_PROGRAMS += tests/test-vconn |
305 | tests_test_vconn_SOURCES = tests/test-vconn.c | |
306 | tests_test_vconn_LDADD = lib/libopenvswitch.a $(SSL_LIBS) | |
99155935 | 307 | |
10a24935 BP |
308 | noinst_PROGRAMS += tests/test-byte-order |
309 | tests_test_byte_order_SOURCES = tests/test-byte-order.c | |
310 | tests_test_byte_order_LDADD = lib/libopenvswitch.a | |
965f03d8 | 311 | |
99155935 BP |
312 | # Python tests. |
313 | EXTRA_DIST += \ | |
314 | tests/test-daemon.py \ | |
315 | tests/test-json.py \ | |
316 | tests/test-jsonrpc.py \ | |
317 | tests/test-ovsdb.py \ | |
318 | tests/test-reconnect.py | |
15b619e2 BP |
319 | |
320 | if HAVE_OPENSSL | |
321 | TESTPKI_FILES = \ | |
322 | tests/testpki-cacert.pem \ | |
323 | tests/testpki-cert.pem \ | |
324 | tests/testpki-privkey.pem \ | |
325 | tests/testpki-req.pem \ | |
326 | tests/testpki-cert2.pem \ | |
327 | tests/testpki-privkey2.pem \ | |
328 | tests/testpki-req2.pem | |
329 | check_DATA += $(TESTPKI_FILES) | |
330 | CLEANFILES += $(TESTPKI_FILES) | |
331 | ||
332 | tests/testpki-cacert.pem: tests/pki/stamp; cp tests/pki/switchca/cacert.pem $@ | |
333 | tests/testpki-cert.pem: tests/pki/stamp; cp tests/pki/test-cert.pem $@ | |
334 | tests/testpki-req.pem: tests/pki/stamp; cp tests/pki/test-req.pem $@ | |
335 | tests/testpki-privkey.pem: tests/pki/stamp; cp tests/pki/test-privkey.pem $@ | |
336 | tests/testpki-cert2.pem: tests/pki/stamp; cp tests/pki/test2-cert.pem $@ | |
337 | tests/testpki-req2.pem: tests/pki/stamp; cp tests/pki/test2-req.pem $@ | |
338 | tests/testpki-privkey2.pem: tests/pki/stamp; cp tests/pki/test2-privkey.pem $@ | |
339 | ||
340 | OVS_PKI = $(SHELL) $(srcdir)/utilities/ovs-pki.in --dir=tests/pki --log=tests/ovs-pki.log | |
341 | tests/pki/stamp: | |
342 | rm -f tests/pki/stamp | |
343 | rm -rf tests/pki | |
344 | $(OVS_PKI) init | |
345 | $(OVS_PKI) req+sign tests/pki/test | |
346 | $(OVS_PKI) req+sign tests/pki/test2 | |
347 | : > tests/pki/stamp | |
348 | CLEANFILES += tests/ovs-pki.log | |
349 | ||
350 | CLEAN_LOCAL += clean-pki | |
351 | clean-pki: | |
352 | rm -f tests/pki/stamp | |
353 | rm -rf tests/pki | |
354 | endif |