]>
Commit | Line | Data |
---|---|---|
1b233b95 | 1 | EXTRA_DIST += \ |
69c2bdfe | 2 | $(COMMON_MACROS_AT) \ |
1b233b95 | 3 | $(TESTSUITE_AT) \ |
69c2bdfe | 4 | $(KMOD_TESTSUITE_AT) \ |
1b233b95 | 5 | $(TESTSUITE) \ |
69c2bdfe | 6 | $(KMOD_TESTSUITE) \ |
1b233b95 BP |
7 | tests/atlocal.in \ |
8 | $(srcdir)/package.m4 \ | |
ddd347c2 GS |
9 | $(srcdir)/tests/testsuite \ |
10 | $(srcdir)/tests/testsuite.patch | |
69c2bdfe AZ |
11 | |
12 | COMMON_MACROS_AT = \ | |
24c8ae53 | 13 | tests/ovsdb-macros.at \ |
02e6f2f7 | 14 | tests/ovs-macros.at \ |
69c2bdfe AZ |
15 | tests/ofproto-macros.at |
16 | ||
17 | TESTSUITE_AT = \ | |
18 | tests/testsuite.at \ | |
08d42548 | 19 | tests/completion.at \ |
1b233b95 | 20 | tests/library.at \ |
95974447 | 21 | tests/heap.at \ |
daff3353 | 22 | tests/bundle.at \ |
3223e977 | 23 | tests/classifier.at \ |
05b3c97b | 24 | tests/check-structs.at \ |
ff8decf1 | 25 | tests/daemon.at \ |
99155935 | 26 | tests/daemon-py.at \ |
f25d0cf3 | 27 | tests/ofp-actions.at \ |
fec00620 | 28 | tests/ofp-print.at \ |
681ea7a0 | 29 | tests/ofp-util.at \ |
2e0525bc | 30 | tests/ofp-errors.at \ |
0e581146 | 31 | tests/ovs-ofctl.at \ |
3bffc610 | 32 | tests/odp.at \ |
5af43325 | 33 | tests/mpls-xlate.at \ |
53ddd40a | 34 | tests/multipath.at \ |
015cf297 | 35 | tests/bfd.at \ |
03f209ba | 36 | tests/cfm.at \ |
742468d9 | 37 | tests/lacp.at \ |
acf72f13 | 38 | tests/lib.at \ |
75a75043 | 39 | tests/learn.at \ |
d27ce529 | 40 | tests/vconn.at \ |
e1aff6f9 | 41 | tests/file_name.at \ |
d918d9d1 | 42 | tests/aes128.at \ |
0a68ffd2 | 43 | tests/unixctl-py.at \ |
d918d9d1 | 44 | tests/uuid.at \ |
f38b84ea | 45 | tests/json.at \ |
f2129093 | 46 | tests/jsonrpc.at \ |
99155935 | 47 | tests/jsonrpc-py.at \ |
0f538378 | 48 | tests/tunnel.at \ |
a36de779 | 49 | tests/tunnel-push-pop.at \ |
ac718c9d | 50 | tests/lockfile.at \ |
3ed497fc | 51 | tests/reconnect.at \ |
b7898031 | 52 | tests/ovs-vswitchd.at \ |
9c4044a5 | 53 | tests/dpif-netdev.at \ |
5acf2e91 | 54 | tests/dpctl.at \ |
29901626 | 55 | tests/ofproto-dpif.at \ |
c40b890f | 56 | tests/bridge.at \ |
1c3e353d | 57 | tests/vlan-splinters.at \ |
a2cb9dfd | 58 | tests/ofproto.at \ |
f85f8ebb | 59 | tests/ovsdb.at \ |
41709ccc | 60 | tests/ovsdb-log.at \ |
f85f8ebb BP |
61 | tests/ovsdb-types.at \ |
62 | tests/ovsdb-data.at \ | |
63 | tests/ovsdb-column.at \ | |
64 | tests/ovsdb-table.at \ | |
65 | tests/ovsdb-row.at \ | |
0d0f05b9 | 66 | tests/ovsdb-schema.at \ |
f85f8ebb | 67 | tests/ovsdb-condition.at \ |
e9f8f936 | 68 | tests/ovsdb-mutation.at \ |
f85f8ebb BP |
69 | tests/ovsdb-query.at \ |
70 | tests/ovsdb-transaction.at \ | |
71 | tests/ovsdb-execution.at \ | |
72 | tests/ovsdb-trigger.at \ | |
1e19e50e | 73 | tests/ovsdb-tool.at \ |
21ff1aee | 74 | tests/ovsdb-server.at \ |
a8425c53 | 75 | tests/ovsdb-monitor.at \ |
c3bb4bd7 | 76 | tests/ovsdb-idl.at \ |
48d014bf | 77 | tests/ovs-vsctl.at \ |
b54bdbe9 | 78 | tests/ovs-monitor-ipsec.at \ |
1b0fdca5 | 79 | tests/ovs-xapi-sync.at \ |
829a7d02 | 80 | tests/stp.at \ |
9efd308e | 81 | tests/rstp.at \ |
8ed182d8 | 82 | tests/interface-reconfigure.at \ |
ffc759c6 | 83 | tests/vlog.at \ |
99eef98b | 84 | tests/vtep-ctl.at \ |
10b1662b BP |
85 | tests/auto-attach.at \ |
86 | tests/ovn.at | |
69c2bdfe AZ |
87 | |
88 | KMOD_TESTSUITE_AT = \ | |
89 | tests/kmod-testsuite.at \ | |
90 | tests/kmod-macros.at \ | |
91 | tests/kmod-traffic.at | |
92 | ||
1b233b95 | 93 | TESTSUITE = $(srcdir)/tests/testsuite |
ddd347c2 | 94 | TESTSUITE_PATCH = $(srcdir)/tests/testsuite.patch |
69c2bdfe | 95 | KMOD_TESTSUITE = $(srcdir)/tests/kmod-testsuite |
7fe079c2 | 96 | DISTCLEANFILES += tests/atconfig tests/atlocal |
1b233b95 | 97 | |
3e2e7588 | 98 | AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep:tests:$(PTHREAD_WIN32_DIR_DLL) |
7c126fbb | 99 | |
1b233b95 | 100 | check-local: tests/atconfig tests/atlocal $(TESTSUITE) |
7c126fbb BP |
101 | $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS) |
102 | \f | |
79982e90 EJ |
103 | # Python Coverage support. |
104 | # Requires coverage.py http://nedbatchelder.com/code/coverage/. | |
105 | ||
106 | COVERAGE = coverage | |
107 | COVERAGE_FILE='$(abs_srcdir)/.coverage' | |
108 | check-pycov: all tests/atconfig tests/atlocal $(TESTSUITE) clean-pycov | |
853d1083 | 109 | PYTHONDONTWRITEBYTECODE=yes COVERAGE_FILE=$(COVERAGE_FILE) PYTHON='$(COVERAGE) run -p' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS) |
79982e90 EJ |
110 | @cd $(srcdir) && $(COVERAGE) combine && COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) annotate |
111 | @echo | |
112 | @echo '----------------------------------------------------------------------' | |
113 | @echo 'Annotated coverage source has the ",cover" extension.' | |
114 | @echo '----------------------------------------------------------------------' | |
115 | @echo | |
116 | @COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) report | |
117 | \f | |
b6fa4447 BP |
118 | # valgrind support |
119 | ||
120 | valgrind_wrappers = \ | |
121 | tests/valgrind/ovs-appctl \ | |
9f19a2a3 | 122 | tests/valgrind/ovs-ofctl \ |
3932d8db | 123 | tests/valgrind/ovstest \ |
b6fa4447 | 124 | tests/valgrind/ovs-vsctl \ |
b0f7b9b5 | 125 | tests/valgrind/ovs-vswitchd \ |
b6fa4447 BP |
126 | tests/valgrind/ovsdb-client \ |
127 | tests/valgrind/ovsdb-server \ | |
128 | tests/valgrind/ovsdb-tool \ | |
129 | tests/valgrind/test-aes128 \ | |
31a3fc6e | 130 | tests/valgrind/test-atomic \ |
daff3353 | 131 | tests/valgrind/test-bundle \ |
10a24935 | 132 | tests/valgrind/test-byte-order \ |
b6fa4447 | 133 | tests/valgrind/test-classifier \ |
0e666160 | 134 | tests/valgrind/test-cmap \ |
b6fa4447 | 135 | tests/valgrind/test-csum \ |
b6fa4447 BP |
136 | tests/valgrind/test-flows \ |
137 | tests/valgrind/test-hash \ | |
822b7f52 | 138 | tests/valgrind/test-hindex \ |
b6fa4447 BP |
139 | tests/valgrind/test-hmap \ |
140 | tests/valgrind/test-json \ | |
141 | tests/valgrind/test-jsonrpc \ | |
142 | tests/valgrind/test-list \ | |
143 | tests/valgrind/test-lockfile \ | |
53ddd40a | 144 | tests/valgrind/test-multipath \ |
3bffc610 | 145 | tests/valgrind/test-odp \ |
38876d31 | 146 | tests/valgrind/test-ofpbuf \ |
b6fa4447 | 147 | tests/valgrind/test-ovsdb \ |
f696f12f | 148 | tests/valgrind/test-packets \ |
78f3f316 | 149 | tests/valgrind/test-random \ |
b6fa4447 | 150 | tests/valgrind/test-reconnect \ |
9efd308e | 151 | tests/valgrind/test-rstp \ |
b6fa4447 | 152 | tests/valgrind/test-sha1 \ |
829a7d02 | 153 | tests/valgrind/test-stp \ |
b6fa4447 | 154 | tests/valgrind/test-type-props \ |
6e170b4c | 155 | tests/valgrind/test-unix-socket \ |
b6fa4447 | 156 | tests/valgrind/test-uuid \ |
10a24935 | 157 | tests/valgrind/test-vconn |
b6fa4447 BP |
158 | |
159 | $(valgrind_wrappers): tests/valgrind-wrapper.in | |
160 | @test -d tests/valgrind || mkdir tests/valgrind | |
ef44aa50 BP |
161 | $(AM_V_GEN) sed -e 's,[@]wrap_program[@],$@,' \ |
162 | $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp && \ | |
163 | chmod +x $@.tmp && \ | |
b6fa4447 BP |
164 | mv $@.tmp $@ |
165 | CLEANFILES += $(valgrind_wrappers) | |
166 | EXTRA_DIST += tests/valgrind-wrapper.in | |
167 | ||
168 | VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \ | |
75b87ae5 | 169 | --suppressions=$(abs_top_srcdir)/tests/glibc.supp \ |
b6fa4447 | 170 | --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20 |
75b87ae5 | 171 | EXTRA_DIST += tests/glibc.supp tests/openssl.supp |
16496eea BP |
172 | check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \ |
173 | $(valgrind_wrappers) $(check_DATA) | |
b6fa4447 BP |
174 | $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) |
175 | @echo | |
176 | @echo '----------------------------------------------------------------------' | |
177 | @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*' | |
178 | @echo '----------------------------------------------------------------------' | |
179 | \f | |
81a114e5 BP |
180 | # OFTest support. |
181 | ||
182 | check-oftest: all | |
ef44aa50 | 183 | $(AM_V_at)srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-oftest |
81a114e5 | 184 | EXTRA_DIST += tests/run-oftest |
e3c7ed29 BP |
185 | |
186 | # Ryu support. | |
187 | check-ryu: all | |
ef44aa50 | 188 | $(AM_V_at)srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-ryu |
e3c7ed29 | 189 | EXTRA_DIST += tests/run-ryu |
81a114e5 | 190 | \f |
69c2bdfe AZ |
191 | # Run kmod tests. Assume kernel modules has been installed or linked into the kernel |
192 | check-kernel: all tests/atconfig tests/atlocal $(KMOD_TESTSUITE) | |
193 | $(SHELL) '$(KMOD_TESTSUITE)' -C tests AUTOTEST_PATH='$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) | |
194 | ||
195 | # Testing the out of tree Kernel module | |
196 | check-kmod: all tests/atconfig tests/atlocal $(KMOD_TESTSUITE) | |
197 | $(MAKE) modules_install | |
95bad473 | 198 | modprobe -r openvswitch |
69c2bdfe AZ |
199 | $(MAKE) check-kernel |
200 | ||
1b233b95 BP |
201 | clean-local: |
202 | test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean | |
203 | ||
1b233b95 | 204 | AUTOTEST = $(AUTOM4TE) --language=autotest |
83e09b5d GS |
205 | |
206 | if WIN32 | |
ddd347c2 | 207 | $(TESTSUITE): package.m4 $(TESTSUITE_AT) $(COMMON_MACROS_AT) $(TESTSUITE_PATCH) |
dcd03218 FL |
208 | $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o testsuite.tmp $@.at |
209 | patch -p0 testsuite.tmp $(TESTSUITE_PATCH) | |
210 | $(AM_V_at)mv testsuite.tmp $@ | |
83e09b5d GS |
211 | else |
212 | $(TESTSUITE): package.m4 $(TESTSUITE_AT) $(COMMON_MACROS_AT) | |
213 | $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at | |
214 | $(AM_V_at)mv $@.tmp $@ | |
215 | endif | |
69c2bdfe AZ |
216 | |
217 | $(KMOD_TESTSUITE): package.m4 $(KMOD_TESTSUITE_AT) $(COMMON_MACROS_AT) | |
ef44aa50 BP |
218 | $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at |
219 | $(AM_V_at)mv $@.tmp $@ | |
1b233b95 BP |
220 | |
221 | # The `:;' works around a Bash 3.2 bug when the output is not writeable. | |
222 | $(srcdir)/package.m4: $(top_srcdir)/configure.ac | |
ef44aa50 | 223 | $(AM_V_GEN):;{ \ |
1b233b95 | 224 | echo '# Signature of the current package.' && \ |
f99cd6ee BP |
225 | echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \ |
226 | echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \ | |
227 | echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \ | |
228 | echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \ | |
229 | echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \ | |
1b233b95 BP |
230 | } >'$(srcdir)/package.m4' |
231 | ||
f85f8ebb | 232 | noinst_PROGRAMS += tests/test-ovsdb |
00732bf5 BP |
233 | tests_test_ovsdb_SOURCES = \ |
234 | tests/test-ovsdb.c \ | |
235 | tests/idltest.c \ | |
236 | tests/idltest.h | |
7360012b | 237 | EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl |
96d87817 | 238 | tests_test_ovsdb_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la |
00732bf5 | 239 | |
acf72f13 TG |
240 | noinst_PROGRAMS += tests/test-lib |
241 | tests_test_lib_SOURCES = \ | |
242 | tests/test-lib.c | |
243 | tests_test_lib_LDADD = lib/libopenvswitch.la | |
244 | ||
00732bf5 | 245 | # idltest schema and IDL |
2c84fdf2 | 246 | OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl |
00732bf5 | 247 | IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann |
d18e52e3 | 248 | EXTRA_DIST += $(IDLTEST_IDL_FILES) tests/idltest2.ovsschema |
51d41d39 | 249 | CLEANFILES += tests/idltest.c tests/idltest.h tests/idltest.ovsidl |
00732bf5 | 250 | tests/idltest.ovsidl: $(IDLTEST_IDL_FILES) |
ef44aa50 | 251 | $(AM_V_GEN)$(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp && \ |
00732bf5 BP |
252 | mv $@.tmp $@ |
253 | ||
b0fc010a | 254 | tests/idltest.c: tests/idltest.h |
f85f8ebb | 255 | |
95fb793a | 256 | if DPDK_NETDEV |
e96981de SF |
257 | noinst_PROGRAMS += tests/test-dpdkr |
258 | tests_test_dpdkr_SOURCES = \ | |
259 | tests/dpdk/ring_client.c | |
260 | tests_test_dpdkr_LDADD = lib/libopenvswitch.la $(LIBS) | |
95fb793a | 261 | endif |
262 | ||
3932d8db | 263 | noinst_PROGRAMS += tests/ovstest |
eadd1644 AZ |
264 | tests_ovstest_SOURCES = \ |
265 | tests/ovstest.c \ | |
266 | tests/ovstest.h \ | |
267 | tests/test-aes128.c \ | |
268 | tests/test-atomic.c \ | |
269 | tests/test-bundle.c \ | |
270 | tests/test-byte-order.c \ | |
271 | tests/test-classifier.c \ | |
0e666160 | 272 | tests/test-cmap.c \ |
eadd1644 | 273 | tests/test-csum.c \ |
eadd1644 AZ |
274 | tests/test-flows.c \ |
275 | tests/test-hash.c \ | |
276 | tests/test-heap.c \ | |
277 | tests/test-hindex.c \ | |
278 | tests/test-hmap.c \ | |
279 | tests/test-json.c \ | |
280 | tests/test-jsonrpc.c \ | |
281 | tests/test-list.c \ | |
282 | tests/test-lockfile.c \ | |
283 | tests/test-multipath.c \ | |
284 | tests/test-netflow.c \ | |
285 | tests/test-odp.c \ | |
38876d31 | 286 | tests/test-ofpbuf.c \ |
10b1662b | 287 | tests/test-ovn.c \ |
eadd1644 AZ |
288 | tests/test-packets.c \ |
289 | tests/test-random.c \ | |
290 | tests/test-reconnect.c \ | |
9efd308e | 291 | tests/test-rstp.c \ |
eadd1644 AZ |
292 | tests/test-sflow.c \ |
293 | tests/test-sha1.c \ | |
294 | tests/test-stp.c \ | |
eadd1644 AZ |
295 | tests/test-util.c \ |
296 | tests/test-uuid.c \ | |
f831a472 | 297 | tests/test-bitmap.c \ |
99eef98b DF |
298 | tests/test-vconn.c \ |
299 | tests/test-aa.c | |
7882cfb1 GS |
300 | |
301 | if !WIN32 | |
302 | tests_ovstest_SOURCES += \ | |
303 | tests/test-unix-socket.c | |
304 | endif | |
305 | ||
10b1662b | 306 | tests_ovstest_LDADD = lib/libopenvswitch.la ovn/lib/libovn.la |
eadd1644 | 307 | dist_check_SCRIPTS = tests/flowgen.pl |
d138cd2c | 308 | |
78f172aa BP |
309 | noinst_PROGRAMS += tests/test-strtok_r |
310 | tests_test_strtok_r_SOURCES = tests/test-strtok_r.c | |
311 | ||
064af421 BP |
312 | noinst_PROGRAMS += tests/test-type-props |
313 | tests_test_type_props_SOURCES = tests/test-type-props.c | |
314 | ||
99155935 | 315 | # Python tests. |
79982e90 | 316 | CHECK_PYFILES = \ |
0a68ffd2 | 317 | tests/appctl.py \ |
99155935 BP |
318 | tests/test-daemon.py \ |
319 | tests/test-json.py \ | |
320 | tests/test-jsonrpc.py \ | |
321 | tests/test-ovsdb.py \ | |
1b0fdca5 | 322 | tests/test-reconnect.py \ |
8ed182d8 | 323 | tests/MockXenAPI.py \ |
cd57233c | 324 | tests/test-unix-socket.py \ |
0a68ffd2 | 325 | tests/test-unixctl.py \ |
8ed182d8 | 326 | tests/test-vlog.py |
79982e90 EJ |
327 | EXTRA_DIST += $(CHECK_PYFILES) |
328 | PYCOV_CLEAN_FILES += $(CHECK_PYFILES:.py=.py,cover) .coverage | |
15b619e2 BP |
329 | |
330 | if HAVE_OPENSSL | |
331 | TESTPKI_FILES = \ | |
332 | tests/testpki-cacert.pem \ | |
333 | tests/testpki-cert.pem \ | |
334 | tests/testpki-privkey.pem \ | |
335 | tests/testpki-req.pem \ | |
336 | tests/testpki-cert2.pem \ | |
337 | tests/testpki-privkey2.pem \ | |
338 | tests/testpki-req2.pem | |
339 | check_DATA += $(TESTPKI_FILES) | |
340 | CLEANFILES += $(TESTPKI_FILES) | |
341 | ||
ef44aa50 BP |
342 | tests/testpki-cacert.pem: tests/pki/stamp |
343 | $(AM_V_GEN)cp tests/pki/switchca/cacert.pem $@ | |
344 | tests/testpki-cert.pem: tests/pki/stamp | |
345 | $(AM_V_GEN)cp tests/pki/test-cert.pem $@ | |
346 | tests/testpki-req.pem: tests/pki/stamp | |
347 | $(AM_V_GEN)cp tests/pki/test-req.pem $@ | |
348 | tests/testpki-privkey.pem: tests/pki/stamp | |
349 | $(AM_V_GEN)cp tests/pki/test-privkey.pem $@ | |
350 | tests/testpki-cert2.pem: tests/pki/stamp | |
351 | $(AM_V_GEN)cp tests/pki/test2-cert.pem $@ | |
352 | tests/testpki-req2.pem: tests/pki/stamp | |
353 | $(AM_V_GEN)cp tests/pki/test2-req.pem $@ | |
354 | tests/testpki-privkey2.pem: tests/pki/stamp | |
355 | $(AM_V_GEN)cp tests/pki/test2-privkey.pem $@ | |
15b619e2 BP |
356 | |
357 | OVS_PKI = $(SHELL) $(srcdir)/utilities/ovs-pki.in --dir=tests/pki --log=tests/ovs-pki.log | |
358 | tests/pki/stamp: | |
ef44aa50 BP |
359 | $(AM_V_at)rm -f tests/pki/stamp |
360 | $(AM_V_at)rm -rf tests/pki | |
361 | $(AM_V_GEN)$(OVS_PKI) init && \ | |
362 | $(OVS_PKI) req+sign tests/pki/test && \ | |
363 | $(OVS_PKI) req+sign tests/pki/test2 && \ | |
15b619e2 BP |
364 | : > tests/pki/stamp |
365 | CLEANFILES += tests/ovs-pki.log | |
366 | ||
367 | CLEAN_LOCAL += clean-pki | |
368 | clean-pki: | |
369 | rm -f tests/pki/stamp | |
370 | rm -rf tests/pki | |
371 | endif |