]>
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 \ | |
119db2cb | 91 | tests/traffic-common-macros.at \ |
4f76f530 | 92 | tests/traffic.at |
69c2bdfe | 93 | |
1b233b95 | 94 | TESTSUITE = $(srcdir)/tests/testsuite |
ddd347c2 | 95 | TESTSUITE_PATCH = $(srcdir)/tests/testsuite.patch |
69c2bdfe | 96 | KMOD_TESTSUITE = $(srcdir)/tests/kmod-testsuite |
7fe079c2 | 97 | DISTCLEANFILES += tests/atconfig tests/atlocal |
1b233b95 | 98 | |
3e2e7588 | 99 | AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep:tests:$(PTHREAD_WIN32_DIR_DLL) |
7c126fbb | 100 | |
1b233b95 | 101 | check-local: tests/atconfig tests/atlocal $(TESTSUITE) |
7c126fbb BP |
102 | $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS) |
103 | \f | |
79982e90 EJ |
104 | # Python Coverage support. |
105 | # Requires coverage.py http://nedbatchelder.com/code/coverage/. | |
106 | ||
107 | COVERAGE = coverage | |
108 | COVERAGE_FILE='$(abs_srcdir)/.coverage' | |
109 | check-pycov: all tests/atconfig tests/atlocal $(TESTSUITE) clean-pycov | |
853d1083 | 110 | PYTHONDONTWRITEBYTECODE=yes COVERAGE_FILE=$(COVERAGE_FILE) PYTHON='$(COVERAGE) run -p' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS) |
79982e90 EJ |
111 | @cd $(srcdir) && $(COVERAGE) combine && COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) annotate |
112 | @echo | |
113 | @echo '----------------------------------------------------------------------' | |
114 | @echo 'Annotated coverage source has the ",cover" extension.' | |
115 | @echo '----------------------------------------------------------------------' | |
116 | @echo | |
117 | @COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) report | |
118 | \f | |
b6fa4447 BP |
119 | # valgrind support |
120 | ||
121 | valgrind_wrappers = \ | |
122 | tests/valgrind/ovs-appctl \ | |
9f19a2a3 | 123 | tests/valgrind/ovs-ofctl \ |
3932d8db | 124 | tests/valgrind/ovstest \ |
b6fa4447 | 125 | tests/valgrind/ovs-vsctl \ |
b0f7b9b5 | 126 | tests/valgrind/ovs-vswitchd \ |
b6fa4447 BP |
127 | tests/valgrind/ovsdb-client \ |
128 | tests/valgrind/ovsdb-server \ | |
129 | tests/valgrind/ovsdb-tool \ | |
130 | tests/valgrind/test-aes128 \ | |
31a3fc6e | 131 | tests/valgrind/test-atomic \ |
daff3353 | 132 | tests/valgrind/test-bundle \ |
10a24935 | 133 | tests/valgrind/test-byte-order \ |
b6fa4447 | 134 | tests/valgrind/test-classifier \ |
0e666160 | 135 | tests/valgrind/test-cmap \ |
b6fa4447 | 136 | tests/valgrind/test-csum \ |
b6fa4447 BP |
137 | tests/valgrind/test-flows \ |
138 | tests/valgrind/test-hash \ | |
822b7f52 | 139 | tests/valgrind/test-hindex \ |
b6fa4447 BP |
140 | tests/valgrind/test-hmap \ |
141 | tests/valgrind/test-json \ | |
142 | tests/valgrind/test-jsonrpc \ | |
143 | tests/valgrind/test-list \ | |
144 | tests/valgrind/test-lockfile \ | |
53ddd40a | 145 | tests/valgrind/test-multipath \ |
3bffc610 | 146 | tests/valgrind/test-odp \ |
38876d31 | 147 | tests/valgrind/test-ofpbuf \ |
b6fa4447 | 148 | tests/valgrind/test-ovsdb \ |
f696f12f | 149 | tests/valgrind/test-packets \ |
78f3f316 | 150 | tests/valgrind/test-random \ |
b6fa4447 | 151 | tests/valgrind/test-reconnect \ |
9efd308e | 152 | tests/valgrind/test-rstp \ |
b6fa4447 | 153 | tests/valgrind/test-sha1 \ |
829a7d02 | 154 | tests/valgrind/test-stp \ |
b6fa4447 | 155 | tests/valgrind/test-type-props \ |
6e170b4c | 156 | tests/valgrind/test-unix-socket \ |
b6fa4447 | 157 | tests/valgrind/test-uuid \ |
10a24935 | 158 | tests/valgrind/test-vconn |
b6fa4447 BP |
159 | |
160 | $(valgrind_wrappers): tests/valgrind-wrapper.in | |
161 | @test -d tests/valgrind || mkdir tests/valgrind | |
ef44aa50 BP |
162 | $(AM_V_GEN) sed -e 's,[@]wrap_program[@],$@,' \ |
163 | $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp && \ | |
164 | chmod +x $@.tmp && \ | |
b6fa4447 BP |
165 | mv $@.tmp $@ |
166 | CLEANFILES += $(valgrind_wrappers) | |
167 | EXTRA_DIST += tests/valgrind-wrapper.in | |
168 | ||
169 | VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \ | |
75b87ae5 | 170 | --suppressions=$(abs_top_srcdir)/tests/glibc.supp \ |
b6fa4447 | 171 | --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20 |
75b87ae5 | 172 | EXTRA_DIST += tests/glibc.supp tests/openssl.supp |
16496eea BP |
173 | check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \ |
174 | $(valgrind_wrappers) $(check_DATA) | |
b6fa4447 BP |
175 | $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) |
176 | @echo | |
177 | @echo '----------------------------------------------------------------------' | |
178 | @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*' | |
179 | @echo '----------------------------------------------------------------------' | |
180 | \f | |
81a114e5 BP |
181 | # OFTest support. |
182 | ||
183 | check-oftest: all | |
ef44aa50 | 184 | $(AM_V_at)srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-oftest |
81a114e5 | 185 | EXTRA_DIST += tests/run-oftest |
e3c7ed29 BP |
186 | |
187 | # Ryu support. | |
188 | check-ryu: all | |
ef44aa50 | 189 | $(AM_V_at)srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-ryu |
e3c7ed29 | 190 | EXTRA_DIST += tests/run-ryu |
81a114e5 | 191 | \f |
69c2bdfe AZ |
192 | # Run kmod tests. Assume kernel modules has been installed or linked into the kernel |
193 | check-kernel: all tests/atconfig tests/atlocal $(KMOD_TESTSUITE) | |
194 | $(SHELL) '$(KMOD_TESTSUITE)' -C tests AUTOTEST_PATH='$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) | |
195 | ||
196 | # Testing the out of tree Kernel module | |
197 | check-kmod: all tests/atconfig tests/atlocal $(KMOD_TESTSUITE) | |
198 | $(MAKE) modules_install | |
95bad473 | 199 | modprobe -r openvswitch |
69c2bdfe AZ |
200 | $(MAKE) check-kernel |
201 | ||
1b233b95 BP |
202 | clean-local: |
203 | test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean | |
204 | ||
1b233b95 | 205 | AUTOTEST = $(AUTOM4TE) --language=autotest |
83e09b5d GS |
206 | |
207 | if WIN32 | |
ddd347c2 | 208 | $(TESTSUITE): package.m4 $(TESTSUITE_AT) $(COMMON_MACROS_AT) $(TESTSUITE_PATCH) |
dcd03218 FL |
209 | $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o testsuite.tmp $@.at |
210 | patch -p0 testsuite.tmp $(TESTSUITE_PATCH) | |
211 | $(AM_V_at)mv testsuite.tmp $@ | |
83e09b5d GS |
212 | else |
213 | $(TESTSUITE): package.m4 $(TESTSUITE_AT) $(COMMON_MACROS_AT) | |
214 | $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at | |
215 | $(AM_V_at)mv $@.tmp $@ | |
216 | endif | |
69c2bdfe AZ |
217 | |
218 | $(KMOD_TESTSUITE): package.m4 $(KMOD_TESTSUITE_AT) $(COMMON_MACROS_AT) | |
ef44aa50 BP |
219 | $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at |
220 | $(AM_V_at)mv $@.tmp $@ | |
1b233b95 BP |
221 | |
222 | # The `:;' works around a Bash 3.2 bug when the output is not writeable. | |
223 | $(srcdir)/package.m4: $(top_srcdir)/configure.ac | |
ef44aa50 | 224 | $(AM_V_GEN):;{ \ |
1b233b95 | 225 | echo '# Signature of the current package.' && \ |
f99cd6ee BP |
226 | echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \ |
227 | echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \ | |
228 | echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \ | |
229 | echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \ | |
230 | echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \ | |
1b233b95 BP |
231 | } >'$(srcdir)/package.m4' |
232 | ||
f85f8ebb | 233 | noinst_PROGRAMS += tests/test-ovsdb |
90ffd534 BP |
234 | tests_test_ovsdb_SOURCES = tests/test-ovsdb.c |
235 | nodist_tests_test_ovsdb_SOURCES = tests/idltest.c tests/idltest.h | |
7360012b | 236 | EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl |
96d87817 | 237 | tests_test_ovsdb_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la |
00732bf5 | 238 | |
acf72f13 TG |
239 | noinst_PROGRAMS += tests/test-lib |
240 | tests_test_lib_SOURCES = \ | |
241 | tests/test-lib.c | |
242 | tests_test_lib_LDADD = lib/libopenvswitch.la | |
243 | ||
00732bf5 | 244 | # idltest schema and IDL |
2c84fdf2 | 245 | OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl |
00732bf5 | 246 | IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann |
d18e52e3 | 247 | EXTRA_DIST += $(IDLTEST_IDL_FILES) tests/idltest2.ovsschema |
00732bf5 | 248 | tests/idltest.ovsidl: $(IDLTEST_IDL_FILES) |
ef44aa50 | 249 | $(AM_V_GEN)$(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp && \ |
00732bf5 BP |
250 | mv $@.tmp $@ |
251 | ||
b0fc010a | 252 | tests/idltest.c: tests/idltest.h |
f85f8ebb | 253 | |
95fb793a | 254 | if DPDK_NETDEV |
e96981de SF |
255 | noinst_PROGRAMS += tests/test-dpdkr |
256 | tests_test_dpdkr_SOURCES = \ | |
257 | tests/dpdk/ring_client.c | |
258 | tests_test_dpdkr_LDADD = lib/libopenvswitch.la $(LIBS) | |
95fb793a | 259 | endif |
260 | ||
3932d8db | 261 | noinst_PROGRAMS += tests/ovstest |
eadd1644 AZ |
262 | tests_ovstest_SOURCES = \ |
263 | tests/ovstest.c \ | |
264 | tests/ovstest.h \ | |
265 | tests/test-aes128.c \ | |
266 | tests/test-atomic.c \ | |
267 | tests/test-bundle.c \ | |
268 | tests/test-byte-order.c \ | |
269 | tests/test-classifier.c \ | |
0e666160 | 270 | tests/test-cmap.c \ |
eadd1644 | 271 | tests/test-csum.c \ |
eadd1644 AZ |
272 | tests/test-flows.c \ |
273 | tests/test-hash.c \ | |
274 | tests/test-heap.c \ | |
275 | tests/test-hindex.c \ | |
276 | tests/test-hmap.c \ | |
277 | tests/test-json.c \ | |
278 | tests/test-jsonrpc.c \ | |
279 | tests/test-list.c \ | |
280 | tests/test-lockfile.c \ | |
281 | tests/test-multipath.c \ | |
282 | tests/test-netflow.c \ | |
283 | tests/test-odp.c \ | |
38876d31 | 284 | tests/test-ofpbuf.c \ |
10b1662b | 285 | tests/test-ovn.c \ |
eadd1644 AZ |
286 | tests/test-packets.c \ |
287 | tests/test-random.c \ | |
288 | tests/test-reconnect.c \ | |
9efd308e | 289 | tests/test-rstp.c \ |
eadd1644 AZ |
290 | tests/test-sflow.c \ |
291 | tests/test-sha1.c \ | |
292 | tests/test-stp.c \ | |
eadd1644 AZ |
293 | tests/test-util.c \ |
294 | tests/test-uuid.c \ | |
f831a472 | 295 | tests/test-bitmap.c \ |
99eef98b DF |
296 | tests/test-vconn.c \ |
297 | tests/test-aa.c | |
7882cfb1 GS |
298 | |
299 | if !WIN32 | |
300 | tests_ovstest_SOURCES += \ | |
301 | tests/test-unix-socket.c | |
302 | endif | |
303 | ||
10b1662b | 304 | tests_ovstest_LDADD = lib/libopenvswitch.la ovn/lib/libovn.la |
eadd1644 | 305 | dist_check_SCRIPTS = tests/flowgen.pl |
d138cd2c | 306 | |
78f172aa BP |
307 | noinst_PROGRAMS += tests/test-strtok_r |
308 | tests_test_strtok_r_SOURCES = tests/test-strtok_r.c | |
309 | ||
064af421 BP |
310 | noinst_PROGRAMS += tests/test-type-props |
311 | tests_test_type_props_SOURCES = tests/test-type-props.c | |
312 | ||
99155935 | 313 | # Python tests. |
79982e90 | 314 | CHECK_PYFILES = \ |
0a68ffd2 | 315 | tests/appctl.py \ |
99155935 BP |
316 | tests/test-daemon.py \ |
317 | tests/test-json.py \ | |
318 | tests/test-jsonrpc.py \ | |
319 | tests/test-ovsdb.py \ | |
1b0fdca5 | 320 | tests/test-reconnect.py \ |
8ed182d8 | 321 | tests/MockXenAPI.py \ |
cd57233c | 322 | tests/test-unix-socket.py \ |
0a68ffd2 | 323 | tests/test-unixctl.py \ |
8ed182d8 | 324 | tests/test-vlog.py |
79982e90 EJ |
325 | EXTRA_DIST += $(CHECK_PYFILES) |
326 | PYCOV_CLEAN_FILES += $(CHECK_PYFILES:.py=.py,cover) .coverage | |
15b619e2 BP |
327 | |
328 | if HAVE_OPENSSL | |
329 | TESTPKI_FILES = \ | |
330 | tests/testpki-cacert.pem \ | |
331 | tests/testpki-cert.pem \ | |
332 | tests/testpki-privkey.pem \ | |
333 | tests/testpki-req.pem \ | |
334 | tests/testpki-cert2.pem \ | |
335 | tests/testpki-privkey2.pem \ | |
336 | tests/testpki-req2.pem | |
337 | check_DATA += $(TESTPKI_FILES) | |
338 | CLEANFILES += $(TESTPKI_FILES) | |
339 | ||
ef44aa50 BP |
340 | tests/testpki-cacert.pem: tests/pki/stamp |
341 | $(AM_V_GEN)cp tests/pki/switchca/cacert.pem $@ | |
342 | tests/testpki-cert.pem: tests/pki/stamp | |
343 | $(AM_V_GEN)cp tests/pki/test-cert.pem $@ | |
344 | tests/testpki-req.pem: tests/pki/stamp | |
345 | $(AM_V_GEN)cp tests/pki/test-req.pem $@ | |
346 | tests/testpki-privkey.pem: tests/pki/stamp | |
347 | $(AM_V_GEN)cp tests/pki/test-privkey.pem $@ | |
348 | tests/testpki-cert2.pem: tests/pki/stamp | |
349 | $(AM_V_GEN)cp tests/pki/test2-cert.pem $@ | |
350 | tests/testpki-req2.pem: tests/pki/stamp | |
351 | $(AM_V_GEN)cp tests/pki/test2-req.pem $@ | |
352 | tests/testpki-privkey2.pem: tests/pki/stamp | |
353 | $(AM_V_GEN)cp tests/pki/test2-privkey.pem $@ | |
15b619e2 BP |
354 | |
355 | OVS_PKI = $(SHELL) $(srcdir)/utilities/ovs-pki.in --dir=tests/pki --log=tests/ovs-pki.log | |
356 | tests/pki/stamp: | |
ef44aa50 BP |
357 | $(AM_V_at)rm -f tests/pki/stamp |
358 | $(AM_V_at)rm -rf tests/pki | |
359 | $(AM_V_GEN)$(OVS_PKI) init && \ | |
360 | $(OVS_PKI) req+sign tests/pki/test && \ | |
361 | $(OVS_PKI) req+sign tests/pki/test2 && \ | |
15b619e2 BP |
362 | : > tests/pki/stamp |
363 | CLEANFILES += tests/ovs-pki.log | |
364 | ||
365 | CLEAN_LOCAL += clean-pki | |
366 | clean-pki: | |
367 | rm -f tests/pki/stamp | |
368 | rm -rf tests/pki | |
369 | endif |