6 $(srcdir)/tests/testsuite
9 tests/ovsdb-macros.at \
12 tests/check-structs.at \
31 tests/ovsdb-types.at \
33 tests/ovsdb-column.at \
34 tests/ovsdb-table.at \
36 tests/ovsdb-schema.at \
37 tests/ovsdb-condition.at \
38 tests/ovsdb-mutation.at \
39 tests/ovsdb-query.at \
40 tests/ovsdb-transaction.at \
41 tests/ovsdb-execution.at \
42 tests/ovsdb-trigger.at \
44 tests/ovsdb-server.at \
45 tests/ovsdb-monitor.at \
47 tests/ovsdb-idl-py.at \
49 tests/interface-reconfigure.at
50 TESTSUITE = $(srcdir)/tests/testsuite
51 DISTCLEANFILES += tests/atconfig tests/atlocal
53 AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests
55 check-local: tests/atconfig tests/atlocal $(TESTSUITE)
56 $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
61 tests/lcov/ovs-appctl \
62 tests/lcov/ovs-vsctl \
63 tests/lcov/ovsdb-client \
64 tests/lcov/ovsdb-server \
65 tests/lcov/ovsdb-tool \
66 tests/lcov/test-aes128 \
67 tests/lcov/test-byte-order \
68 tests/lcov/test-classifier \
69 tests/lcov/test-csum \
70 tests/lcov/test-dhcp-client \
71 tests/lcov/test-file_name \
72 tests/lcov/test-flows \
73 tests/lcov/test-hash \
74 tests/lcov/test-hmap \
75 tests/lcov/test-json \
76 tests/lcov/test-jsonrpc \
77 tests/lcov/test-list \
78 tests/lcov/test-lockfile \
79 tests/lcov/test-multipath \
80 tests/lcov/test-ovsdb \
81 tests/lcov/test-random \
82 tests/lcov/test-reconnect \
83 tests/lcov/test-sha1 \
84 tests/lcov/test-timeval \
85 tests/lcov/test-type-props \
86 tests/lcov/test-unix-socket \
87 tests/lcov/test-uuid \
90 $(lcov_wrappers): tests/lcov-wrapper.in
91 @test -d tests/lcov || mkdir tests/lcov
92 sed -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),' \
93 -e 's,[@]wrap_program[@],$@,' \
94 $(top_srcdir)/tests/lcov-wrapper.in > $@.tmp
97 CLEANFILES += $(lcov_wrappers)
98 EXTRA_DIST += tests/lcov-wrapper.in
100 LCOV = lcov -b $(abs_top_builddir) -d $(abs_top_builddir) -q
101 check-lcov: all tests/atconfig tests/atlocal $(TESTSUITE) $(lcov_wrappers)
102 rm -fr tests/coverage.html tests/coverage.info
103 $(LCOV) -c -i -o - > tests/coverage.info
104 $(SHELL) '$(TESTSUITE)' -C tests CHECK_LCOV=true DISABLE_LCOV=false AUTOTEST_PATH='tests/lcov:$(AUTOTEST_PATH)' $(TESTSUITEFLAGS); \
106 echo "Producing coverage.html..."; \
107 cd tests && genhtml -q -o coverage.html coverage.info; \
112 valgrind_wrappers = \
113 tests/valgrind/ovs-appctl \
114 tests/valgrind/ovs-vsctl \
115 tests/valgrind/ovsdb-client \
116 tests/valgrind/ovsdb-server \
117 tests/valgrind/ovsdb-tool \
118 tests/valgrind/test-aes128 \
119 tests/valgrind/test-byte-order \
120 tests/valgrind/test-classifier \
121 tests/valgrind/test-csum \
122 tests/valgrind/test-dhcp-client \
123 tests/valgrind/test-file_name \
124 tests/valgrind/test-flows \
125 tests/valgrind/test-hash \
126 tests/valgrind/test-hmap \
127 tests/valgrind/test-json \
128 tests/valgrind/test-jsonrpc \
129 tests/valgrind/test-list \
130 tests/valgrind/test-lockfile \
131 tests/valgrind/test-multipath \
132 tests/valgrind/test-ovsdb \
133 tests/valgrind/test-random \
134 tests/valgrind/test-reconnect \
135 tests/valgrind/test-sha1 \
136 tests/valgrind/test-timeval \
137 tests/valgrind/test-type-props \
138 tests/valgrind/test-unix-socket \
139 tests/valgrind/test-uuid \
140 tests/valgrind/test-vconn
142 $(valgrind_wrappers): tests/valgrind-wrapper.in
143 @test -d tests/valgrind || mkdir tests/valgrind
144 sed -e 's,[@]wrap_program[@],$@,' \
145 $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp
148 CLEANFILES += $(valgrind_wrappers)
149 EXTRA_DIST += tests/valgrind-wrapper.in
151 VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \
152 --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20
153 EXTRA_DIST += tests/openssl.supp
154 check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) $(valgrind_wrappers)
155 $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
157 @echo '----------------------------------------------------------------------'
158 @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
159 @echo '----------------------------------------------------------------------'
162 test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
165 AUTOTEST = $(AUTOM4TE) --language=autotest
166 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
167 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
170 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
171 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
173 echo '# Signature of the current package.' && \
174 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
175 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
176 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
177 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
178 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
179 } >'$(srcdir)/package.m4'
181 noinst_PROGRAMS += tests/test-aes128
182 tests_test_aes128_SOURCES = tests/test-aes128.c
183 tests_test_aes128_LDADD = lib/libopenvswitch.a
185 noinst_PROGRAMS += tests/test-classifier
186 tests_test_classifier_SOURCES = tests/test-classifier.c
187 tests_test_classifier_LDADD = lib/libopenvswitch.a
189 noinst_PROGRAMS += tests/test-csum
190 tests_test_csum_SOURCES = tests/test-csum.c
191 tests_test_csum_LDADD = lib/libopenvswitch.a
193 noinst_PROGRAMS += tests/test-file_name
194 tests_test_file_name_SOURCES = tests/test-file_name.c
195 tests_test_file_name_LDADD = lib/libopenvswitch.a
197 noinst_PROGRAMS += tests/test-flows
198 tests_test_flows_SOURCES = tests/test-flows.c
199 tests_test_flows_LDADD = lib/libopenvswitch.a
200 dist_check_SCRIPTS = tests/flowgen.pl
202 noinst_PROGRAMS += tests/test-hash
203 tests_test_hash_SOURCES = tests/test-hash.c
204 tests_test_hash_LDADD = lib/libopenvswitch.a
206 noinst_PROGRAMS += tests/test-hmap
207 tests_test_hmap_SOURCES = tests/test-hmap.c
208 tests_test_hmap_LDADD = lib/libopenvswitch.a
210 noinst_PROGRAMS += tests/test-json
211 tests_test_json_SOURCES = tests/test-json.c
212 tests_test_json_LDADD = lib/libopenvswitch.a
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
222 noinst_PROGRAMS += tests/test-lockfile
223 tests_test_lockfile_SOURCES = tests/test-lockfile.c
224 tests_test_lockfile_LDADD = lib/libopenvswitch.a
226 noinst_PROGRAMS += tests/test-multipath
227 tests_test_multipath_SOURCES = tests/test-multipath.c
228 tests_test_multipath_LDADD = lib/libopenvswitch.a
230 noinst_PROGRAMS += tests/test-random
231 tests_test_random_SOURCES = tests/test-random.c
232 tests_test_random_LDADD = lib/libopenvswitch.a
234 noinst_PROGRAMS += tests/test-unix-socket
235 tests_test_unix_socket_SOURCES = tests/test-unix-socket.c
236 tests_test_unix_socket_LDADD = lib/libopenvswitch.a
238 noinst_PROGRAMS += tests/test-ovsdb
239 tests_test_ovsdb_SOURCES = \
243 EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl
244 tests_test_ovsdb_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS)
246 # idltest schema and IDL
247 OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
248 IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
249 EXTRA_DIST += $(IDLTEST_IDL_FILES)
250 tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
251 $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp
254 tests/idltest.c: tests/idltest.h
256 noinst_PROGRAMS += tests/test-reconnect
257 tests_test_reconnect_SOURCES = tests/test-reconnect.c
258 tests_test_reconnect_LDADD = lib/libopenvswitch.a
260 noinst_PROGRAMS += tests/test-sha1
261 tests_test_sha1_SOURCES = tests/test-sha1.c
262 tests_test_sha1_LDADD = lib/libopenvswitch.a
264 noinst_PROGRAMS += tests/test-timeval
265 tests_test_timeval_SOURCES = tests/test-timeval.c
266 tests_test_timeval_LDADD = lib/libopenvswitch.a
268 noinst_PROGRAMS += tests/test-strtok_r
269 tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
271 noinst_PROGRAMS += tests/test-type-props
272 tests_test_type_props_SOURCES = tests/test-type-props.c
274 noinst_PROGRAMS += tests/test-dhcp-client
275 tests_test_dhcp_client_SOURCES = tests/test-dhcp-client.c
276 tests_test_dhcp_client_LDADD = lib/libopenvswitch.a
278 noinst_PROGRAMS += tests/test-uuid
279 tests_test_uuid_SOURCES = tests/test-uuid.c
280 tests_test_uuid_LDADD = lib/libopenvswitch.a
282 noinst_PROGRAMS += tests/test-vconn
283 tests_test_vconn_SOURCES = tests/test-vconn.c
284 tests_test_vconn_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
286 noinst_PROGRAMS += tests/test-byte-order
287 tests_test_byte_order_SOURCES = tests/test-byte-order.c
288 tests_test_byte_order_LDADD = lib/libopenvswitch.a
292 tests/test-daemon.py \
294 tests/test-jsonrpc.py \
295 tests/test-ovsdb.py \
296 tests/test-reconnect.py
300 tests/testpki-cacert.pem \
301 tests/testpki-cert.pem \
302 tests/testpki-privkey.pem \
303 tests/testpki-req.pem \
304 tests/testpki-cert2.pem \
305 tests/testpki-privkey2.pem \
306 tests/testpki-req2.pem
307 check_DATA += $(TESTPKI_FILES)
308 CLEANFILES += $(TESTPKI_FILES)
310 tests/testpki-cacert.pem: tests/pki/stamp; cp tests/pki/switchca/cacert.pem $@
311 tests/testpki-cert.pem: tests/pki/stamp; cp tests/pki/test-cert.pem $@
312 tests/testpki-req.pem: tests/pki/stamp; cp tests/pki/test-req.pem $@
313 tests/testpki-privkey.pem: tests/pki/stamp; cp tests/pki/test-privkey.pem $@
314 tests/testpki-cert2.pem: tests/pki/stamp; cp tests/pki/test2-cert.pem $@
315 tests/testpki-req2.pem: tests/pki/stamp; cp tests/pki/test2-req.pem $@
316 tests/testpki-privkey2.pem: tests/pki/stamp; cp tests/pki/test2-privkey.pem $@
318 OVS_PKI = $(SHELL) $(srcdir)/utilities/ovs-pki.in --dir=tests/pki --log=tests/ovs-pki.log
320 rm -f tests/pki/stamp
323 $(OVS_PKI) req+sign tests/pki/test
324 $(OVS_PKI) req+sign tests/pki/test2
326 CLEANFILES += tests/ovs-pki.log
328 CLEAN_LOCAL += clean-pki
330 rm -f tests/pki/stamp