6 $(srcdir)/tests/testsuite
9 tests/ovsdb-macros.at \
13 tests/check-structs.at \
30 tests/ofproto-macros.at \
34 tests/ovsdb-types.at \
36 tests/ovsdb-column.at \
37 tests/ovsdb-table.at \
39 tests/ovsdb-schema.at \
40 tests/ovsdb-condition.at \
41 tests/ovsdb-mutation.at \
42 tests/ovsdb-query.at \
43 tests/ovsdb-transaction.at \
44 tests/ovsdb-execution.at \
45 tests/ovsdb-trigger.at \
47 tests/ovsdb-server.at \
48 tests/ovsdb-monitor.at \
50 tests/ovsdb-idl-py.at \
52 tests/interface-reconfigure.at
53 TESTSUITE = $(srcdir)/tests/testsuite
54 DISTCLEANFILES += tests/atconfig tests/atlocal
56 AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests
58 check-local: tests/atconfig tests/atlocal $(TESTSUITE)
59 $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
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 \
70 tests/lcov/test-bundle \
71 tests/lcov/test-byte-order \
72 tests/lcov/test-classifier \
73 tests/lcov/test-csum \
74 tests/lcov/test-file_name \
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 \
82 tests/lcov/test-multipath \
83 tests/lcov/test-ovsdb \
84 tests/lcov/test-packets \
85 tests/lcov/test-random \
86 tests/lcov/test-reconnect \
87 tests/lcov/test-sha1 \
88 tests/lcov/test-timeval \
89 tests/lcov/test-type-props \
90 tests/lcov/test-unix-socket \
91 tests/lcov/test-uuid \
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
101 CLEANFILES += $(lcov_wrappers)
102 EXTRA_DIST += tests/lcov-wrapper.in
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
108 $(SHELL) '$(TESTSUITE)' -C tests CHECK_LCOV=true DISABLE_LCOV=false AUTOTEST_PATH='tests/lcov:$(AUTOTEST_PATH)' $(TESTSUITEFLAGS); \
110 echo "Producing coverage.html..."; \
111 cd tests && genhtml -q -o coverage.html coverage.info; \
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 \
123 tests/valgrind/test-bundle \
124 tests/valgrind/test-byte-order \
125 tests/valgrind/test-classifier \
126 tests/valgrind/test-csum \
127 tests/valgrind/test-file_name \
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 \
135 tests/valgrind/test-multipath \
136 tests/valgrind/test-openflowd \
137 tests/valgrind/test-ovsdb \
138 tests/valgrind/test-packets \
139 tests/valgrind/test-random \
140 tests/valgrind/test-reconnect \
141 tests/valgrind/test-sha1 \
142 tests/valgrind/test-timeval \
143 tests/valgrind/test-type-props \
144 tests/valgrind/test-unix-socket \
145 tests/valgrind/test-uuid \
146 tests/valgrind/test-vconn
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
154 CLEANFILES += $(valgrind_wrappers)
155 EXTRA_DIST += tests/valgrind-wrapper.in
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)
163 @echo '----------------------------------------------------------------------'
164 @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
165 @echo '----------------------------------------------------------------------'
168 test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
171 AUTOTEST = $(AUTOM4TE) --language=autotest
172 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
173 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
176 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
177 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
179 echo '# Signature of the current package.' && \
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)])'; \
185 } >'$(srcdir)/package.m4'
187 noinst_PROGRAMS += tests/test-aes128
188 tests_test_aes128_SOURCES = tests/test-aes128.c
189 tests_test_aes128_LDADD = lib/libopenvswitch.a
191 noinst_PROGRAMS += tests/test-bundle
192 tests_test_bundle_SOURCES = tests/test-bundle.c
193 tests_test_bundle_LDADD = lib/libopenvswitch.a
195 noinst_PROGRAMS += tests/test-classifier
196 tests_test_classifier_SOURCES = tests/test-classifier.c
197 tests_test_classifier_LDADD = lib/libopenvswitch.a
199 noinst_PROGRAMS += tests/test-csum
200 tests_test_csum_SOURCES = tests/test-csum.c
201 tests_test_csum_LDADD = lib/libopenvswitch.a
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
207 noinst_PROGRAMS += tests/test-flows
208 tests_test_flows_SOURCES = tests/test-flows.c
209 tests_test_flows_LDADD = lib/libopenvswitch.a
210 dist_check_SCRIPTS = tests/flowgen.pl
212 noinst_PROGRAMS += tests/test-hash
213 tests_test_hash_SOURCES = tests/test-hash.c
214 tests_test_hash_LDADD = lib/libopenvswitch.a
216 noinst_PROGRAMS += tests/test-hmap
217 tests_test_hmap_SOURCES = tests/test-hmap.c
218 tests_test_hmap_LDADD = lib/libopenvswitch.a
220 noinst_PROGRAMS += tests/test-json
221 tests_test_json_SOURCES = tests/test-json.c
222 tests_test_json_LDADD = lib/libopenvswitch.a
224 noinst_PROGRAMS += tests/test-jsonrpc
225 tests_test_jsonrpc_SOURCES = tests/test-jsonrpc.c
226 tests_test_jsonrpc_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
228 noinst_PROGRAMS += tests/test-list
229 tests_test_list_SOURCES = tests/test-list.c
230 tests_test_list_LDADD = lib/libopenvswitch.a
232 noinst_PROGRAMS += tests/test-lockfile
233 tests_test_lockfile_SOURCES = tests/test-lockfile.c
234 tests_test_lockfile_LDADD = lib/libopenvswitch.a
236 noinst_PROGRAMS += tests/test-multipath
237 tests_test_multipath_SOURCES = tests/test-multipath.c
238 tests_test_multipath_LDADD = lib/libopenvswitch.a
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 \
248 lib/libopenvswitch.a \
252 noinst_PROGRAMS += tests/test-packets
253 tests_test_packets_SOURCES = tests/test-packets.c
254 tests_test_packets_LDADD = lib/libopenvswitch.a
256 noinst_PROGRAMS += tests/test-random
257 tests_test_random_SOURCES = tests/test-random.c
258 tests_test_random_LDADD = lib/libopenvswitch.a
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
264 noinst_PROGRAMS += tests/test-ovsdb
265 tests_test_ovsdb_SOURCES = \
269 EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl
270 tests_test_ovsdb_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS)
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
280 tests/idltest.c: tests/idltest.h
282 noinst_PROGRAMS += tests/test-reconnect
283 tests_test_reconnect_SOURCES = tests/test-reconnect.c
284 tests_test_reconnect_LDADD = lib/libopenvswitch.a
286 noinst_PROGRAMS += tests/test-sha1
287 tests_test_sha1_SOURCES = tests/test-sha1.c
288 tests_test_sha1_LDADD = lib/libopenvswitch.a
290 noinst_PROGRAMS += tests/test-timeval
291 tests_test_timeval_SOURCES = tests/test-timeval.c
292 tests_test_timeval_LDADD = lib/libopenvswitch.a
294 noinst_PROGRAMS += tests/test-strtok_r
295 tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
297 noinst_PROGRAMS += tests/test-type-props
298 tests_test_type_props_SOURCES = tests/test-type-props.c
300 noinst_PROGRAMS += tests/test-util
301 tests_test_util_SOURCES = tests/test-util.c
302 tests_test_util_LDADD = lib/libopenvswitch.a
304 noinst_PROGRAMS += tests/test-uuid
305 tests_test_uuid_SOURCES = tests/test-uuid.c
306 tests_test_uuid_LDADD = lib/libopenvswitch.a
308 noinst_PROGRAMS += tests/test-vconn
309 tests_test_vconn_SOURCES = tests/test-vconn.c
310 tests_test_vconn_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
312 noinst_PROGRAMS += tests/test-byte-order
313 tests_test_byte_order_SOURCES = tests/test-byte-order.c
314 tests_test_byte_order_LDADD = lib/libopenvswitch.a
318 tests/test-daemon.py \
320 tests/test-jsonrpc.py \
321 tests/test-ovsdb.py \
322 tests/test-reconnect.py
326 tests/testpki-cacert.pem \
327 tests/testpki-cert.pem \
328 tests/testpki-privkey.pem \
329 tests/testpki-req.pem \
330 tests/testpki-cert2.pem \
331 tests/testpki-privkey2.pem \
332 tests/testpki-req2.pem
333 check_DATA += $(TESTPKI_FILES)
334 CLEANFILES += $(TESTPKI_FILES)
336 tests/testpki-cacert.pem: tests/pki/stamp; cp tests/pki/switchca/cacert.pem $@
337 tests/testpki-cert.pem: tests/pki/stamp; cp tests/pki/test-cert.pem $@
338 tests/testpki-req.pem: tests/pki/stamp; cp tests/pki/test-req.pem $@
339 tests/testpki-privkey.pem: tests/pki/stamp; cp tests/pki/test-privkey.pem $@
340 tests/testpki-cert2.pem: tests/pki/stamp; cp tests/pki/test2-cert.pem $@
341 tests/testpki-req2.pem: tests/pki/stamp; cp tests/pki/test2-req.pem $@
342 tests/testpki-privkey2.pem: tests/pki/stamp; cp tests/pki/test2-privkey.pem $@
344 OVS_PKI = $(SHELL) $(srcdir)/utilities/ovs-pki.in --dir=tests/pki --log=tests/ovs-pki.log
346 rm -f tests/pki/stamp
349 $(OVS_PKI) req+sign tests/pki/test
350 $(OVS_PKI) req+sign tests/pki/test2
352 CLEANFILES += tests/ovs-pki.log
354 CLEAN_LOCAL += clean-pki
356 rm -f tests/pki/stamp