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/ofproto-dpif.at \
41 tests/vlan-splinters.at \
42 tests/ofproto-macros.at \
46 tests/ovsdb-types.at \
48 tests/ovsdb-column.at \
49 tests/ovsdb-table.at \
51 tests/ovsdb-schema.at \
52 tests/ovsdb-condition.at \
53 tests/ovsdb-mutation.at \
54 tests/ovsdb-query.at \
55 tests/ovsdb-transaction.at \
56 tests/ovsdb-execution.at \
57 tests/ovsdb-trigger.at \
59 tests/ovsdb-server.at \
60 tests/ovsdb-monitor.at \
63 tests/ovs-monitor-ipsec.at \
64 tests/ovs-xapi-sync.at \
66 tests/interface-reconfigure.at \
69 TESTSUITE = $(srcdir)/tests/testsuite
70 DISTCLEANFILES += tests/atconfig tests/atlocal
72 AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep:tests
74 check-local: tests/atconfig tests/atlocal $(TESTSUITE)
75 $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
77 # Python Coverage support.
78 # Requires coverage.py http://nedbatchelder.com/code/coverage/.
81 COVERAGE_FILE='$(abs_srcdir)/.coverage'
82 check-pycov: all tests/atconfig tests/atlocal $(TESTSUITE) clean-pycov
83 PYTHONDONTWRITEBYTECODE=yes COVERAGE_FILE=$(COVERAGE_FILE) PYTHON='$(COVERAGE) run -p' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
84 @cd $(srcdir) && $(COVERAGE) combine && COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) annotate
86 @echo '----------------------------------------------------------------------'
87 @echo 'Annotated coverage source has the ",cover" extension.'
88 @echo '----------------------------------------------------------------------'
90 @COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) report
95 tests/valgrind/ovs-appctl \
96 tests/valgrind/ovs-ofctl \
97 tests/valgrind/ovstest \
98 tests/valgrind/ovs-vsctl \
99 tests/valgrind/ovs-vswitchd \
100 tests/valgrind/ovsdb-client \
101 tests/valgrind/ovsdb-server \
102 tests/valgrind/ovsdb-tool \
103 tests/valgrind/test-aes128 \
104 tests/valgrind/test-atomic \
105 tests/valgrind/test-bundle \
106 tests/valgrind/test-byte-order \
107 tests/valgrind/test-classifier \
108 tests/valgrind/test-csum \
109 tests/valgrind/test-file_name \
110 tests/valgrind/test-flows \
111 tests/valgrind/test-hash \
112 tests/valgrind/test-hindex \
113 tests/valgrind/test-hmap \
114 tests/valgrind/test-json \
115 tests/valgrind/test-jsonrpc \
116 tests/valgrind/test-list \
117 tests/valgrind/test-lockfile \
118 tests/valgrind/test-multipath \
119 tests/valgrind/test-odp \
120 tests/valgrind/test-ovsdb \
121 tests/valgrind/test-packets \
122 tests/valgrind/test-random \
123 tests/valgrind/test-reconnect \
124 tests/valgrind/test-sha1 \
125 tests/valgrind/test-stp \
126 tests/valgrind/test-type-props \
127 tests/valgrind/test-unix-socket \
128 tests/valgrind/test-uuid \
129 tests/valgrind/test-vconn
131 $(valgrind_wrappers): tests/valgrind-wrapper.in
132 @test -d tests/valgrind || mkdir tests/valgrind
133 sed -e 's,[@]wrap_program[@],$@,' \
134 $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp
137 CLEANFILES += $(valgrind_wrappers)
138 EXTRA_DIST += tests/valgrind-wrapper.in
140 VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \
141 --suppressions=$(abs_top_srcdir)/tests/glibc.supp \
142 --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20
143 EXTRA_DIST += tests/glibc.supp tests/openssl.supp
144 check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \
145 $(valgrind_wrappers) $(check_DATA)
146 $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
148 @echo '----------------------------------------------------------------------'
149 @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
150 @echo '----------------------------------------------------------------------'
155 srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-oftest
156 EXTRA_DIST += tests/run-oftest
160 srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-ryu
161 EXTRA_DIST += tests/run-ryu
164 test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
166 AUTOTEST = $(AUTOM4TE) --language=autotest
167 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
168 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
171 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
172 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
174 echo '# Signature of the current package.' && \
175 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
176 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
177 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
178 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
179 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
180 } >'$(srcdir)/package.m4'
182 noinst_PROGRAMS += tests/test-controller
183 MAN_ROOTS += tests/test-controller.8.in
184 DISTCLEANFILES += tests/test-controller.8
185 noinst_man_MANS += tests/test-controller.8
186 tests_test_controller_SOURCES = tests/test-controller.c
187 tests_test_controller_LDADD = lib/libopenvswitch.la
189 noinst_PROGRAMS += tests/test-ovsdb
190 tests_test_ovsdb_SOURCES = \
194 EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl
195 tests_test_ovsdb_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la
197 # idltest schema and IDL
198 OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
199 IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
200 EXTRA_DIST += $(IDLTEST_IDL_FILES)
201 tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
202 $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp
205 tests/idltest.c: tests/idltest.h
207 noinst_PROGRAMS += tests/ovstest
208 tests_ovstest_SOURCES = \
211 tests/test-aes128.c \
212 tests/test-atomic.c \
213 tests/test-bundle.c \
214 tests/test-byte-order.c \
215 tests/test-classifier.c \
217 tests/test-file_name.c \
221 tests/test-hindex.c \
224 tests/test-jsonrpc.c \
226 tests/test-lockfile.c \
227 tests/test-multipath.c \
228 tests/test-netflow.c \
230 tests/test-packets.c \
231 tests/test-random.c \
232 tests/test-reconnect.c \
236 tests/test-unix-socket.c \
240 tests_ovstest_LDADD = lib/libopenvswitch.la
241 dist_check_SCRIPTS = tests/flowgen.pl
243 noinst_PROGRAMS += tests/test-strtok_r
244 tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
246 noinst_PROGRAMS += tests/test-type-props
247 tests_test_type_props_SOURCES = tests/test-type-props.c
252 tests/test-daemon.py \
254 tests/test-jsonrpc.py \
255 tests/test-ovsdb.py \
256 tests/test-reconnect.py \
257 tests/MockXenAPI.py \
258 tests/test-unix-socket.py \
259 tests/test-unixctl.py \
261 EXTRA_DIST += $(CHECK_PYFILES)
262 PYCOV_CLEAN_FILES += $(CHECK_PYFILES:.py=.py,cover) .coverage
266 tests/testpki-cacert.pem \
267 tests/testpki-cert.pem \
268 tests/testpki-privkey.pem \
269 tests/testpki-req.pem \
270 tests/testpki-cert2.pem \
271 tests/testpki-privkey2.pem \
272 tests/testpki-req2.pem
273 check_DATA += $(TESTPKI_FILES)
274 CLEANFILES += $(TESTPKI_FILES)
276 tests/testpki-cacert.pem: tests/pki/stamp; cp tests/pki/switchca/cacert.pem $@
277 tests/testpki-cert.pem: tests/pki/stamp; cp tests/pki/test-cert.pem $@
278 tests/testpki-req.pem: tests/pki/stamp; cp tests/pki/test-req.pem $@
279 tests/testpki-privkey.pem: tests/pki/stamp; cp tests/pki/test-privkey.pem $@
280 tests/testpki-cert2.pem: tests/pki/stamp; cp tests/pki/test2-cert.pem $@
281 tests/testpki-req2.pem: tests/pki/stamp; cp tests/pki/test2-req.pem $@
282 tests/testpki-privkey2.pem: tests/pki/stamp; cp tests/pki/test2-privkey.pem $@
284 OVS_PKI = $(SHELL) $(srcdir)/utilities/ovs-pki.in --dir=tests/pki --log=tests/ovs-pki.log
286 rm -f tests/pki/stamp
289 $(OVS_PKI) req+sign tests/pki/test
290 $(OVS_PKI) req+sign tests/pki/test2
292 CLEANFILES += tests/ovs-pki.log
294 CLEAN_LOCAL += clean-pki
296 rm -f tests/pki/stamp