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-file_name \
113 tests/valgrind/test-flows \
114 tests/valgrind/test-hash \
115 tests/valgrind/test-hindex \
116 tests/valgrind/test-hmap \
117 tests/valgrind/test-json \
118 tests/valgrind/test-jsonrpc \
119 tests/valgrind/test-list \
120 tests/valgrind/test-lockfile \
121 tests/valgrind/test-multipath \
122 tests/valgrind/test-odp \
123 tests/valgrind/test-ovsdb \
124 tests/valgrind/test-packets \
125 tests/valgrind/test-random \
126 tests/valgrind/test-reconnect \
127 tests/valgrind/test-sha1 \
128 tests/valgrind/test-stp \
129 tests/valgrind/test-type-props \
130 tests/valgrind/test-unix-socket \
131 tests/valgrind/test-uuid \
132 tests/valgrind/test-vconn
134 $(valgrind_wrappers): tests/valgrind-wrapper.in
135 @test -d tests/valgrind || mkdir tests/valgrind
136 sed -e 's,[@]wrap_program[@],$@,' \
137 $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp
140 CLEANFILES += $(valgrind_wrappers)
141 EXTRA_DIST += tests/valgrind-wrapper.in
143 VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \
144 --suppressions=$(abs_top_srcdir)/tests/glibc.supp \
145 --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20
146 EXTRA_DIST += tests/glibc.supp tests/openssl.supp
147 check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \
148 $(valgrind_wrappers) $(check_DATA)
149 $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
151 @echo '----------------------------------------------------------------------'
152 @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
153 @echo '----------------------------------------------------------------------'
158 srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-oftest
159 EXTRA_DIST += tests/run-oftest
163 srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-ryu
164 EXTRA_DIST += tests/run-ryu
167 test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
169 AUTOTEST = $(AUTOM4TE) --language=autotest
170 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
171 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
174 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
175 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
177 echo '# Signature of the current package.' && \
178 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
179 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
180 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
181 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
182 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
183 } >'$(srcdir)/package.m4'
185 noinst_PROGRAMS += tests/test-controller
186 MAN_ROOTS += tests/test-controller.8.in
187 DISTCLEANFILES += tests/test-controller.8
188 noinst_man_MANS += tests/test-controller.8
189 tests_test_controller_SOURCES = tests/test-controller.c
190 tests_test_controller_LDADD = lib/libopenvswitch.la
192 noinst_PROGRAMS += tests/test-ovsdb
193 tests_test_ovsdb_SOURCES = \
197 EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl
198 tests_test_ovsdb_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la
200 # idltest schema and IDL
201 OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
202 IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
203 EXTRA_DIST += $(IDLTEST_IDL_FILES)
204 tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
205 $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp
208 tests/idltest.c: tests/idltest.h
210 noinst_PROGRAMS += tests/ovstest
211 tests_ovstest_SOURCES = \
214 tests/test-aes128.c \
215 tests/test-atomic.c \
216 tests/test-bundle.c \
217 tests/test-byte-order.c \
218 tests/test-classifier.c \
221 tests/test-file_name.c \
225 tests/test-hindex.c \
228 tests/test-jsonrpc.c \
230 tests/test-lockfile.c \
231 tests/test-multipath.c \
232 tests/test-netflow.c \
234 tests/test-packets.c \
235 tests/test-random.c \
236 tests/test-reconnect.c \
245 tests_ovstest_SOURCES += \
246 tests/test-unix-socket.c
249 tests_ovstest_LDADD = lib/libopenvswitch.la
250 dist_check_SCRIPTS = tests/flowgen.pl
252 noinst_PROGRAMS += tests/test-strtok_r
253 tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
255 noinst_PROGRAMS += tests/test-type-props
256 tests_test_type_props_SOURCES = tests/test-type-props.c
261 tests/test-daemon.py \
263 tests/test-jsonrpc.py \
264 tests/test-ovsdb.py \
265 tests/test-reconnect.py \
266 tests/MockXenAPI.py \
267 tests/test-unix-socket.py \
268 tests/test-unixctl.py \
270 EXTRA_DIST += $(CHECK_PYFILES)
271 PYCOV_CLEAN_FILES += $(CHECK_PYFILES:.py=.py,cover) .coverage
275 tests/testpki-cacert.pem \
276 tests/testpki-cert.pem \
277 tests/testpki-privkey.pem \
278 tests/testpki-req.pem \
279 tests/testpki-cert2.pem \
280 tests/testpki-privkey2.pem \
281 tests/testpki-req2.pem
282 check_DATA += $(TESTPKI_FILES)
283 CLEANFILES += $(TESTPKI_FILES)
285 tests/testpki-cacert.pem: tests/pki/stamp; cp tests/pki/switchca/cacert.pem $@
286 tests/testpki-cert.pem: tests/pki/stamp; cp tests/pki/test-cert.pem $@
287 tests/testpki-req.pem: tests/pki/stamp; cp tests/pki/test-req.pem $@
288 tests/testpki-privkey.pem: tests/pki/stamp; cp tests/pki/test-privkey.pem $@
289 tests/testpki-cert2.pem: tests/pki/stamp; cp tests/pki/test2-cert.pem $@
290 tests/testpki-req2.pem: tests/pki/stamp; cp tests/pki/test2-req.pem $@
291 tests/testpki-privkey2.pem: tests/pki/stamp; cp tests/pki/test2-privkey.pem $@
293 OVS_PKI = $(SHELL) $(srcdir)/utilities/ovs-pki.in --dir=tests/pki --log=tests/ovs-pki.log
295 rm -f tests/pki/stamp
298 $(OVS_PKI) req+sign tests/pki/test
299 $(OVS_PKI) req+sign tests/pki/test2
301 CLEANFILES += tests/ovs-pki.log
303 CLEAN_LOCAL += clean-pki
305 rm -f tests/pki/stamp