6 $(srcdir)/tests/testsuite
9 tests/ovsdb-macros.at \
14 tests/check-structs.at \
17 tests/ofp-actions.at \
38 tests/ovs-vswitchd.at \
39 tests/ofproto-dpif.at \
40 tests/ofproto-macros.at \
44 tests/ovsdb-types.at \
46 tests/ovsdb-column.at \
47 tests/ovsdb-table.at \
49 tests/ovsdb-schema.at \
50 tests/ovsdb-condition.at \
51 tests/ovsdb-mutation.at \
52 tests/ovsdb-query.at \
53 tests/ovsdb-transaction.at \
54 tests/ovsdb-execution.at \
55 tests/ovsdb-trigger.at \
57 tests/ovsdb-server.at \
58 tests/ovsdb-monitor.at \
61 tests/ovs-monitor-ipsec.at \
62 tests/ovs-xapi-sync.at \
64 tests/interface-reconfigure.at \
66 TESTSUITE = $(srcdir)/tests/testsuite
67 DISTCLEANFILES += tests/atconfig tests/atlocal
69 AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests
71 check-local: tests/atconfig tests/atlocal $(TESTSUITE)
72 $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
74 # Python Coverage support.
75 # Requires coverage.py http://nedbatchelder.com/code/coverage/.
78 COVERAGE_FILE='$(abs_srcdir)/.coverage'
79 check-pycov: all tests/atconfig tests/atlocal $(TESTSUITE) clean-pycov
80 PYTHONDONTWRITEBYTECODE=yes COVERAGE_FILE=$(COVERAGE_FILE) PYTHON='$(COVERAGE) run -p' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
81 @cd $(srcdir) && $(COVERAGE) combine && COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) annotate
83 @echo '----------------------------------------------------------------------'
84 @echo 'Annotated coverage source has the ",cover" extension.'
85 @echo '----------------------------------------------------------------------'
87 @COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) report
92 tests/valgrind/ovs-appctl \
93 tests/valgrind/ovs-ofctl \
94 tests/valgrind/ovs-vsctl \
95 tests/valgrind/ovs-vswitchd \
96 tests/valgrind/ovsdb-client \
97 tests/valgrind/ovsdb-server \
98 tests/valgrind/ovsdb-tool \
99 tests/valgrind/test-aes128 \
100 tests/valgrind/test-bundle \
101 tests/valgrind/test-byte-order \
102 tests/valgrind/test-classifier \
103 tests/valgrind/test-csum \
104 tests/valgrind/test-file_name \
105 tests/valgrind/test-flows \
106 tests/valgrind/test-hash \
107 tests/valgrind/test-heap \
108 tests/valgrind/test-hmap \
109 tests/valgrind/test-json \
110 tests/valgrind/test-jsonrpc \
111 tests/valgrind/test-list \
112 tests/valgrind/test-lockfile \
113 tests/valgrind/test-multipath \
114 tests/valgrind/test-odp \
115 tests/valgrind/test-ovsdb \
116 tests/valgrind/test-packets \
117 tests/valgrind/test-random \
118 tests/valgrind/test-reconnect \
119 tests/valgrind/test-sha1 \
120 tests/valgrind/test-stp \
121 tests/valgrind/test-timeval \
122 tests/valgrind/test-type-props \
123 tests/valgrind/test-unix-socket \
124 tests/valgrind/test-uuid \
125 tests/valgrind/test-vconn
127 $(valgrind_wrappers): tests/valgrind-wrapper.in
128 @test -d tests/valgrind || mkdir tests/valgrind
129 sed -e 's,[@]wrap_program[@],$@,' \
130 $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp
133 CLEANFILES += $(valgrind_wrappers)
134 EXTRA_DIST += tests/valgrind-wrapper.in
136 VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \
137 --suppressions=$(abs_top_srcdir)/tests/glibc.supp \
138 --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20
139 EXTRA_DIST += tests/glibc.supp tests/openssl.supp
140 check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \
141 $(valgrind_wrappers) $(check_DATA)
142 $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
144 @echo '----------------------------------------------------------------------'
145 @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
146 @echo '----------------------------------------------------------------------'
151 srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-oftest
152 EXTRA_DIST += tests/run-oftest
155 test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
157 AUTOTEST = $(AUTOM4TE) --language=autotest
158 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
159 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
162 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
163 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
165 echo '# Signature of the current package.' && \
166 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
167 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
168 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
169 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
170 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
171 } >'$(srcdir)/package.m4'
173 noinst_PROGRAMS += tests/test-aes128
174 tests_test_aes128_SOURCES = tests/test-aes128.c
175 tests_test_aes128_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
177 noinst_PROGRAMS += tests/test-bundle
178 tests_test_bundle_SOURCES = tests/test-bundle.c
179 tests_test_bundle_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
181 noinst_PROGRAMS += tests/test-classifier
182 tests_test_classifier_SOURCES = tests/test-classifier.c
183 tests_test_classifier_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
185 noinst_PROGRAMS += tests/test-csum
186 tests_test_csum_SOURCES = tests/test-csum.c
187 tests_test_csum_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
189 noinst_PROGRAMS += tests/test-file_name
190 tests_test_file_name_SOURCES = tests/test-file_name.c
191 tests_test_file_name_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
193 noinst_PROGRAMS += tests/test-flows
194 tests_test_flows_SOURCES = tests/test-flows.c
195 tests_test_flows_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
196 dist_check_SCRIPTS = tests/flowgen.pl
198 noinst_PROGRAMS += tests/test-hash
199 tests_test_hash_SOURCES = tests/test-hash.c
200 tests_test_hash_LDADD = lib/libopenvswitch.a
202 noinst_PROGRAMS += tests/test-heap
203 tests_test_heap_SOURCES = tests/test-heap.c
204 tests_test_heap_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
206 noinst_PROGRAMS += tests/test-hmap
207 tests_test_hmap_SOURCES = tests/test-hmap.c
208 tests_test_hmap_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
210 noinst_PROGRAMS += tests/test-json
211 tests_test_json_SOURCES = tests/test-json.c
212 tests_test_json_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
214 noinst_PROGRAMS += tests/test-jsonrpc
215 tests_test_jsonrpc_SOURCES = tests/test-jsonrpc.c
216 tests_test_jsonrpc_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
218 noinst_PROGRAMS += tests/test-list
219 tests_test_list_SOURCES = tests/test-list.c
220 tests_test_list_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
222 noinst_PROGRAMS += tests/test-lockfile
223 tests_test_lockfile_SOURCES = tests/test-lockfile.c
224 tests_test_lockfile_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
226 noinst_PROGRAMS += tests/test-multipath
227 tests_test_multipath_SOURCES = tests/test-multipath.c
228 tests_test_multipath_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
230 noinst_PROGRAMS += tests/test-packets
231 tests_test_packets_SOURCES = tests/test-packets.c
232 tests_test_packets_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
234 noinst_PROGRAMS += tests/test-random
235 tests_test_random_SOURCES = tests/test-random.c
236 tests_test_random_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
238 noinst_PROGRAMS += tests/test-stp
239 tests_test_stp_SOURCES = tests/test-stp.c
240 tests_test_stp_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
242 noinst_PROGRAMS += tests/test-sflow
243 tests_test_sflow_SOURCES = tests/test-sflow.c
244 tests_test_sflow_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
246 noinst_PROGRAMS += tests/test-netflow
247 tests_test_netflow_SOURCES = tests/test-netflow.c
248 tests_test_netflow_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
250 noinst_PROGRAMS += tests/test-unix-socket
251 tests_test_unix_socket_SOURCES = tests/test-unix-socket.c
252 tests_test_unix_socket_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
254 noinst_PROGRAMS += tests/test-odp
255 tests_test_odp_SOURCES = tests/test-odp.c
256 tests_test_odp_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
258 noinst_PROGRAMS += tests/test-ovsdb
259 tests_test_ovsdb_SOURCES = \
263 EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl
264 tests_test_ovsdb_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS)
266 # idltest schema and IDL
267 OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
268 IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
269 EXTRA_DIST += $(IDLTEST_IDL_FILES)
270 tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
271 $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp
274 tests/idltest.c: tests/idltest.h
276 noinst_PROGRAMS += tests/test-reconnect
277 tests_test_reconnect_SOURCES = tests/test-reconnect.c
278 tests_test_reconnect_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
280 noinst_PROGRAMS += tests/test-sha1
281 tests_test_sha1_SOURCES = tests/test-sha1.c
282 tests_test_sha1_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
284 noinst_PROGRAMS += tests/test-timeval
285 tests_test_timeval_SOURCES = tests/test-timeval.c
286 tests_test_timeval_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
288 noinst_PROGRAMS += tests/test-strtok_r
289 tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
291 noinst_PROGRAMS += tests/test-type-props
292 tests_test_type_props_SOURCES = tests/test-type-props.c
294 noinst_PROGRAMS += tests/test-util
295 tests_test_util_SOURCES = tests/test-util.c
296 tests_test_util_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
298 noinst_PROGRAMS += tests/test-uuid
299 tests_test_uuid_SOURCES = tests/test-uuid.c
300 tests_test_uuid_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
302 noinst_PROGRAMS += tests/test-vconn
303 tests_test_vconn_SOURCES = tests/test-vconn.c
304 tests_test_vconn_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
306 noinst_PROGRAMS += tests/test-byte-order
307 tests_test_byte_order_SOURCES = tests/test-byte-order.c
308 tests_test_byte_order_LDADD = lib/libopenvswitch.a
313 tests/test-daemon.py \
315 tests/test-jsonrpc.py \
316 tests/test-ovsdb.py \
317 tests/test-reconnect.py \
318 tests/MockXenAPI.py \
319 tests/test-unix-socket.py \
320 tests/test-unixctl.py \
322 EXTRA_DIST += $(CHECK_PYFILES)
323 PYCOV_CLEAN_FILES += $(CHECK_PYFILES:.py=.py,cover) .coverage
327 tests/testpki-cacert.pem \
328 tests/testpki-cert.pem \
329 tests/testpki-privkey.pem \
330 tests/testpki-req.pem \
331 tests/testpki-cert2.pem \
332 tests/testpki-privkey2.pem \
333 tests/testpki-req2.pem
334 check_DATA += $(TESTPKI_FILES)
335 CLEANFILES += $(TESTPKI_FILES)
337 tests/testpki-cacert.pem: tests/pki/stamp; cp tests/pki/switchca/cacert.pem $@
338 tests/testpki-cert.pem: tests/pki/stamp; cp tests/pki/test-cert.pem $@
339 tests/testpki-req.pem: tests/pki/stamp; cp tests/pki/test-req.pem $@
340 tests/testpki-privkey.pem: tests/pki/stamp; cp tests/pki/test-privkey.pem $@
341 tests/testpki-cert2.pem: tests/pki/stamp; cp tests/pki/test2-cert.pem $@
342 tests/testpki-req2.pem: tests/pki/stamp; cp tests/pki/test2-req.pem $@
343 tests/testpki-privkey2.pem: tests/pki/stamp; cp tests/pki/test2-privkey.pem $@
345 OVS_PKI = $(SHELL) $(srcdir)/utilities/ovs-pki.in --dir=tests/pki --log=tests/ovs-pki.log
347 rm -f tests/pki/stamp
350 $(OVS_PKI) req+sign tests/pki/test
351 $(OVS_PKI) req+sign tests/pki/test2
353 CLEANFILES += tests/ovs-pki.log
355 CLEAN_LOCAL += clean-pki
357 rm -f tests/pki/stamp