6 $(srcdir)/tests/testsuite
9 tests/ovsdb-macros.at \
14 tests/check-structs.at \
17 tests/ofp-actions.at \
39 tests/ovs-vswitchd.at \
40 tests/dpif-netdev.at \
41 tests/ofproto-dpif.at \
43 tests/vlan-splinters.at \
44 tests/ofproto-macros.at \
48 tests/ovsdb-types.at \
50 tests/ovsdb-column.at \
51 tests/ovsdb-table.at \
53 tests/ovsdb-schema.at \
54 tests/ovsdb-condition.at \
55 tests/ovsdb-mutation.at \
56 tests/ovsdb-query.at \
57 tests/ovsdb-transaction.at \
58 tests/ovsdb-execution.at \
59 tests/ovsdb-trigger.at \
61 tests/ovsdb-server.at \
62 tests/ovsdb-monitor.at \
65 tests/ovs-monitor-ipsec.at \
66 tests/ovs-xapi-sync.at \
68 tests/interface-reconfigure.at \
71 TESTSUITE = $(srcdir)/tests/testsuite
72 DISTCLEANFILES += tests/atconfig tests/atlocal
74 AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep:tests
76 check-local: tests/atconfig tests/atlocal $(TESTSUITE)
77 $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
79 # Python Coverage support.
80 # Requires coverage.py http://nedbatchelder.com/code/coverage/.
83 COVERAGE_FILE='$(abs_srcdir)/.coverage'
84 check-pycov: all tests/atconfig tests/atlocal $(TESTSUITE) clean-pycov
85 PYTHONDONTWRITEBYTECODE=yes COVERAGE_FILE=$(COVERAGE_FILE) PYTHON='$(COVERAGE) run -p' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
86 @cd $(srcdir) && $(COVERAGE) combine && COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) annotate
88 @echo '----------------------------------------------------------------------'
89 @echo 'Annotated coverage source has the ",cover" extension.'
90 @echo '----------------------------------------------------------------------'
92 @COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) report
97 tests/valgrind/ovs-appctl \
98 tests/valgrind/ovs-ofctl \
99 tests/valgrind/ovstest \
100 tests/valgrind/ovs-vsctl \
101 tests/valgrind/ovs-vswitchd \
102 tests/valgrind/ovsdb-client \
103 tests/valgrind/ovsdb-server \
104 tests/valgrind/ovsdb-tool \
105 tests/valgrind/test-aes128 \
106 tests/valgrind/test-atomic \
107 tests/valgrind/test-bundle \
108 tests/valgrind/test-byte-order \
109 tests/valgrind/test-classifier \
110 tests/valgrind/test-cmap \
111 tests/valgrind/test-csum \
112 tests/valgrind/test-flows \
113 tests/valgrind/test-hash \
114 tests/valgrind/test-hindex \
115 tests/valgrind/test-hmap \
116 tests/valgrind/test-json \
117 tests/valgrind/test-jsonrpc \
118 tests/valgrind/test-list \
119 tests/valgrind/test-lockfile \
120 tests/valgrind/test-multipath \
121 tests/valgrind/test-odp \
122 tests/valgrind/test-ovsdb \
123 tests/valgrind/test-packets \
124 tests/valgrind/test-random \
125 tests/valgrind/test-reconnect \
126 tests/valgrind/test-sha1 \
127 tests/valgrind/test-stp \
128 tests/valgrind/test-type-props \
129 tests/valgrind/test-unix-socket \
130 tests/valgrind/test-uuid \
131 tests/valgrind/test-vconn
133 $(valgrind_wrappers): tests/valgrind-wrapper.in
134 @test -d tests/valgrind || mkdir tests/valgrind
135 sed -e 's,[@]wrap_program[@],$@,' \
136 $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp
139 CLEANFILES += $(valgrind_wrappers)
140 EXTRA_DIST += tests/valgrind-wrapper.in
142 VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \
143 --suppressions=$(abs_top_srcdir)/tests/glibc.supp \
144 --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20
145 EXTRA_DIST += tests/glibc.supp tests/openssl.supp
146 check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \
147 $(valgrind_wrappers) $(check_DATA)
148 $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
150 @echo '----------------------------------------------------------------------'
151 @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
152 @echo '----------------------------------------------------------------------'
157 srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-oftest
158 EXTRA_DIST += tests/run-oftest
162 srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-ryu
163 EXTRA_DIST += tests/run-ryu
166 test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
168 AUTOTEST = $(AUTOM4TE) --language=autotest
169 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
170 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
173 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
174 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
176 echo '# Signature of the current package.' && \
177 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
178 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
179 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
180 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
181 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
182 } >'$(srcdir)/package.m4'
184 noinst_PROGRAMS += tests/test-ovsdb
185 tests_test_ovsdb_SOURCES = \
189 EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl
190 tests_test_ovsdb_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la
192 # idltest schema and IDL
193 OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
194 IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
195 EXTRA_DIST += $(IDLTEST_IDL_FILES)
196 tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
197 $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp
200 tests/idltest.c: tests/idltest.h
203 noinst_PROGRAMS += tests/ovsclient
204 tests_ovsclient_SOURCES = \
205 tests/ovs_client/ovs_client.c
206 tests_ovsclient_LDADD = lib/libopenvswitch.la $(LIBS)
209 noinst_PROGRAMS += tests/ovstest
210 tests_ovstest_SOURCES = \
213 tests/test-aes128.c \
214 tests/test-atomic.c \
215 tests/test-bundle.c \
216 tests/test-byte-order.c \
217 tests/test-classifier.c \
223 tests/test-hindex.c \
226 tests/test-jsonrpc.c \
228 tests/test-lockfile.c \
229 tests/test-multipath.c \
230 tests/test-netflow.c \
232 tests/test-packets.c \
233 tests/test-random.c \
234 tests/test-reconnect.c \
240 tests/test-bitmap.c \
244 tests_ovstest_SOURCES += \
245 tests/test-unix-socket.c
248 tests_ovstest_LDADD = lib/libopenvswitch.la
249 dist_check_SCRIPTS = tests/flowgen.pl
251 noinst_PROGRAMS += tests/test-strtok_r
252 tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
254 noinst_PROGRAMS += tests/test-type-props
255 tests_test_type_props_SOURCES = tests/test-type-props.c
260 tests/test-daemon.py \
262 tests/test-jsonrpc.py \
263 tests/test-ovsdb.py \
264 tests/test-reconnect.py \
265 tests/MockXenAPI.py \
266 tests/test-unix-socket.py \
267 tests/test-unixctl.py \
269 EXTRA_DIST += $(CHECK_PYFILES)
270 PYCOV_CLEAN_FILES += $(CHECK_PYFILES:.py=.py,cover) .coverage
274 tests/testpki-cacert.pem \
275 tests/testpki-cert.pem \
276 tests/testpki-privkey.pem \
277 tests/testpki-req.pem \
278 tests/testpki-cert2.pem \
279 tests/testpki-privkey2.pem \
280 tests/testpki-req2.pem
281 check_DATA += $(TESTPKI_FILES)
282 CLEANFILES += $(TESTPKI_FILES)
284 tests/testpki-cacert.pem: tests/pki/stamp; cp tests/pki/switchca/cacert.pem $@
285 tests/testpki-cert.pem: tests/pki/stamp; cp tests/pki/test-cert.pem $@
286 tests/testpki-req.pem: tests/pki/stamp; cp tests/pki/test-req.pem $@
287 tests/testpki-privkey.pem: tests/pki/stamp; cp tests/pki/test-privkey.pem $@
288 tests/testpki-cert2.pem: tests/pki/stamp; cp tests/pki/test2-cert.pem $@
289 tests/testpki-req2.pem: tests/pki/stamp; cp tests/pki/test2-req.pem $@
290 tests/testpki-privkey2.pem: tests/pki/stamp; cp tests/pki/test2-privkey.pem $@
292 OVS_PKI = $(SHELL) $(srcdir)/utilities/ovs-pki.in --dir=tests/pki --log=tests/ovs-pki.log
294 rm -f tests/pki/stamp
297 $(OVS_PKI) req+sign tests/pki/test
298 $(OVS_PKI) req+sign tests/pki/test2
300 CLEANFILES += tests/ovs-pki.log
302 CLEAN_LOCAL += clean-pki
304 rm -f tests/pki/stamp