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