4 $(SYSTEM_TESTSUITE_AT
) \
5 $(SYSTEM_KMOD_TESTSUITE_AT
) \
6 $(SYSTEM_USERSPACE_TESTSUITE_AT
) \
8 $(SYSTEM_KMOD_TESTSUITE
) \
9 $(SYSTEM_USERSPACE_TESTSUITE
) \
11 $(srcdir)/package.m4 \
12 $(srcdir)/tests
/testsuite \
13 $(srcdir)/tests
/testsuite.patch
16 tests
/ovsdb-macros.at \
18 tests
/ofproto-macros.at
27 tests
/check-structs.at \
30 tests
/ofp-actions.at \
52 tests
/tunnel-push-pop.at \
53 tests
/tunnel-push-pop-ipv6.at \
56 tests
/ovs-vswitchd.at \
57 tests
/dpif-netdev.at \
59 tests
/ofproto-dpif.at \
64 tests
/ovsdb-types.at \
66 tests
/ovsdb-column.at \
67 tests
/ovsdb-table.at \
69 tests
/ovsdb-schema.at \
70 tests
/ovsdb-condition.at \
71 tests
/ovsdb-mutation.at \
72 tests
/ovsdb-query.at \
73 tests
/ovsdb-transaction.at \
74 tests
/ovsdb-execution.at \
75 tests
/ovsdb-trigger.at \
77 tests
/ovsdb-server.at \
78 tests
/ovsdb-monitor.at \
81 tests
/ovs-monitor-ipsec.at \
82 tests
/ovs-xapi-sync.at \
85 tests
/interface-reconfigure.at \
88 tests
/auto-attach.at \
92 tests
/ovn-controller.at \
93 tests
/ovn-controller-vtep.at
95 SYSTEM_KMOD_TESTSUITE_AT
= \
96 tests
/system-common-macros.at \
97 tests
/system-kmod-testsuite.at \
98 tests
/system-kmod-macros.at
100 SYSTEM_USERSPACE_TESTSUITE_AT
= \
101 tests
/system-userspace-testsuite.at \
102 tests
/system-userspace-macros.at
104 SYSTEM_TESTSUITE_AT
= \
105 tests
/system-common-macros.at \
106 tests
/system-traffic.at
108 TESTSUITE
= $(srcdir)/tests
/testsuite
109 TESTSUITE_PATCH
= $(srcdir)/tests
/testsuite.patch
110 SYSTEM_KMOD_TESTSUITE
= $(srcdir)/tests
/system-kmod-testsuite
111 SYSTEM_USERSPACE_TESTSUITE
= $(srcdir)/tests
/system-userspace-testsuite
112 DISTCLEANFILES
+= tests
/atconfig tests
/atlocal
114 AUTOTEST_PATH
= utilities
:vswitchd
:ovsdb
:vtep
:tests
:$(PTHREAD_WIN32_DIR_DLL
):ovn
/controller-vtep
:ovn
/northd
:ovn
/utilities
:ovn
/controller
116 check-local
: tests
/atconfig tests
/atlocal
$(TESTSUITE
)
117 set
$(SHELL
) '$(TESTSUITE)' -C tests AUTOTEST_PATH
=$(AUTOTEST_PATH
) $(TESTSUITEFLAGS
); \
118 "$$@" ||
(test X
'$(RECHECK)' = Xyes
&& "$$@" --recheck
)
120 # Python Coverage support.
121 # Requires coverage.py http://nedbatchelder.com/code/coverage/.
124 COVERAGE_FILE
='$(abs_srcdir)/.coverage'
125 check-pycov
: all tests
/atconfig tests
/atlocal
$(TESTSUITE
) clean-pycov
126 PYTHONDONTWRITEBYTECODE
=yes COVERAGE_FILE
=$(COVERAGE_FILE
) PYTHON
='$(COVERAGE) run -p' $(SHELL
) '$(TESTSUITE)' -C tests AUTOTEST_PATH
=$(AUTOTEST_PATH
) $(TESTSUITEFLAGS
)
127 @cd
$(srcdir) && $(COVERAGE
) combine
&& COVERAGE_FILE
=$(COVERAGE_FILE
) $(COVERAGE
) annotate
129 @echo
'----------------------------------------------------------------------'
130 @echo
'Annotated coverage source has the ",cover" extension.'
131 @echo
'----------------------------------------------------------------------'
133 @COVERAGE_FILE
=$(COVERAGE_FILE
) $(COVERAGE
) report
136 # Requires build with --enable-coverage and lcov/genhtml in $PATH
137 CLEAN_LOCAL
+= clean-lcov
141 LCOV_OPTS
= -b
$(abs_top_builddir
) -d
$(abs_top_builddir
) -q
-c
--rc lcov_branch_coverage
=1
142 GENHTML_OPTS
= -q
--branch-coverage
--num-spaces
4
143 check-lcov
: all tests
/atconfig tests
/atlocal
$(TESTSUITE
) $(check_DATA
) clean-lcov
144 find .
-name
'*.gcda' | xargs
-n1
rm -f
145 -set
$(SHELL
) '$(TESTSUITE)' -C tests AUTOTEST_PATH
=$(AUTOTEST_PATH
) $(TESTSUITEFLAGS
); \
146 "$$@" ||
(test X
'$(RECHECK)' = Xyes
&& "$$@" --recheck
)
148 lcov
$(LCOV_OPTS
) -o tests
/lcov
/coverage.
info
149 genhtml
$(GENHTML_OPTS
) -o tests
/lcov tests
/lcov
/coverage.
info
150 @echo
"coverage report generated at tests/lcov/index.html"
154 valgrind_wrappers
= \
155 tests
/valgrind
/ovs-appctl \
156 tests
/valgrind
/ovs-ofctl \
157 tests
/valgrind
/ovstest \
158 tests
/valgrind
/ovs-vsctl \
159 tests
/valgrind
/ovs-vswitchd \
160 tests
/valgrind
/ovsdb-client \
161 tests
/valgrind
/ovsdb-server \
162 tests
/valgrind
/ovsdb-tool \
163 tests
/valgrind
/test-aes128 \
164 tests
/valgrind
/test-atomic \
165 tests
/valgrind
/test-bundle \
166 tests
/valgrind
/test-byte-order \
167 tests
/valgrind
/test-classifier \
168 tests
/valgrind
/test-cmap \
169 tests
/valgrind
/test-csum \
170 tests
/valgrind
/test-flows \
171 tests
/valgrind
/test-hash \
172 tests
/valgrind
/test-hindex \
173 tests
/valgrind
/test-hmap \
174 tests
/valgrind
/test-json \
175 tests
/valgrind
/test-jsonrpc \
176 tests
/valgrind
/test-list \
177 tests
/valgrind
/test-lockfile \
178 tests
/valgrind
/test-multipath \
179 tests
/valgrind
/test-odp \
180 tests
/valgrind
/test-ofpbuf \
181 tests
/valgrind
/test-ovsdb \
182 tests
/valgrind
/test-packets \
183 tests
/valgrind
/test-random \
184 tests
/valgrind
/test-reconnect \
185 tests
/valgrind
/test-rstp \
186 tests
/valgrind
/test-sha1 \
187 tests
/valgrind
/test-stp \
188 tests
/valgrind
/test-type-props \
189 tests
/valgrind
/test-unix-socket \
190 tests
/valgrind
/test-unixctl \
191 tests
/valgrind
/test-uuid \
192 tests
/valgrind
/test-vconn
194 $(valgrind_wrappers
): tests
/valgrind-wrapper.in
195 @
test -d tests
/valgrind || mkdir tests
/valgrind
196 $(AM_V_GEN
) sed
-e
's,[@]wrap_program[@],$@,' \
197 $(top_srcdir
)/tests
/valgrind-wrapper.in
> $@.tmp
&& \
200 CLEANFILES
+= $(valgrind_wrappers
)
201 EXTRA_DIST
+= tests
/valgrind-wrapper.in
203 VALGRIND
= valgrind
--log-file
=valgrind.
%p
--leak-check
=full \
204 --suppressions
=$(abs_top_srcdir
)/tests
/glibc.supp \
205 --suppressions
=$(abs_top_srcdir
)/tests
/openssl.supp
--num-callers
=20
206 EXTRA_DIST
+= tests
/glibc.supp tests
/openssl.supp
207 check-valgrind
: all tests
/atconfig tests
/atlocal
$(TESTSUITE
) \
208 $(valgrind_wrappers
) $(check_DATA
)
209 $(SHELL
) '$(TESTSUITE)' -C tests CHECK_VALGRIND
=true VALGRIND
='$(VALGRIND)' AUTOTEST_PATH
='tests/valgrind:$(AUTOTEST_PATH)' -d
$(TESTSUITEFLAGS
)
211 @echo
'----------------------------------------------------------------------'
212 @echo
'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
213 @echo
'----------------------------------------------------------------------'
218 $(AM_V_at
)srcdir='$(srcdir)' $(SHELL
) $(srcdir)/tests
/run-oftest
219 EXTRA_DIST
+= tests
/run-oftest
223 $(AM_V_at
)srcdir='$(srcdir)' $(SHELL
) $(srcdir)/tests
/run-ryu
224 EXTRA_DIST
+= tests
/run-ryu
226 # Run kmod tests. Assume kernel modules has been installed or linked into the kernel
227 check-kernel
: all tests
/atconfig tests
/atlocal
$(SYSTEM_KMOD_TESTSUITE
)
228 $(SHELL
) '$(SYSTEM_KMOD_TESTSUITE)' -C tests AUTOTEST_PATH
='$(AUTOTEST_PATH)' -d
$(TESTSUITEFLAGS
) -j1
230 # Testing the out of tree Kernel module
231 check-kmod
: all tests
/atconfig tests
/atlocal
$(SYSTEM_KMOD_TESTSUITE
)
232 $(MAKE
) modules_install
233 modprobe
-r
-a vport-geneve vport-gre vport-lisp vport-stt vport-vxlan openvswitch
236 check-system-userspace
: all tests
/atconfig tests
/atlocal
$(SYSTEM_USERSPACE_TESTSUITE
)
237 $(SHELL
) '$(SYSTEM_USERSPACE_TESTSUITE)' -C tests AUTOTEST_PATH
='$(AUTOTEST_PATH)' $(TESTSUITEFLAGS
) -j1
240 test ! -f
'$(TESTSUITE)' ||
$(SHELL
) '$(TESTSUITE)' -C tests
--clean
242 AUTOTEST
= $(AUTOM4TE
) --language
=autotest
245 $(TESTSUITE
): package.m4
$(TESTSUITE_AT
) $(COMMON_MACROS_AT
) $(TESTSUITE_PATCH
)
246 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o testsuite.tmp
$@.at
247 patch
-p0 testsuite.tmp
$(TESTSUITE_PATCH
)
248 $(AM_V_at
)mv testsuite.tmp
$@
250 $(TESTSUITE
): package.m4
$(TESTSUITE_AT
) $(COMMON_MACROS_AT
)
251 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
252 $(AM_V_at
)mv
$@.tmp
$@
255 $(SYSTEM_KMOD_TESTSUITE
): package.m4
$(SYSTEM_TESTSUITE_AT
) $(SYSTEM_KMOD_TESTSUITE_AT
) $(COMMON_MACROS_AT
)
256 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
257 $(AM_V_at
)mv
$@.tmp
$@
259 $(SYSTEM_USERSPACE_TESTSUITE
): package.m4
$(SYSTEM_TESTSUITE_AT
) $(SYSTEM_USERSPACE_TESTSUITE_AT
) $(COMMON_MACROS_AT
)
260 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
261 $(AM_V_at
)mv
$@.tmp
$@
263 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
264 $(srcdir)/package.m4
: $(top_srcdir
)/configure.ac
266 echo
'# Signature of the current package.' && \
267 echo
'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
268 echo
'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
269 echo
'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
270 echo
'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
271 echo
'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
272 } >'$(srcdir)/package.m4'
274 noinst_PROGRAMS
+= tests
/test-ovsdb
275 tests_test_ovsdb_SOURCES
= tests
/test-ovsdb.c
276 nodist_tests_test_ovsdb_SOURCES
= tests
/idltest.c tests
/idltest.h
277 EXTRA_DIST
+= tests
/uuidfilt.pl tests
/ovsdb-monitor-sort.pl
278 tests_test_ovsdb_LDADD
= ovsdb
/libovsdb.la lib
/libopenvswitch.la
280 noinst_PROGRAMS
+= tests
/test-lib
281 tests_test_lib_SOURCES
= \
283 tests_test_lib_LDADD
= lib
/libopenvswitch.la
285 # idltest schema and IDL
286 OVSIDL_BUILT
+= tests
/idltest.c tests
/idltest.h tests
/idltest.ovsidl
287 IDLTEST_IDL_FILES
= tests
/idltest.ovsschema tests
/idltest.ann
288 EXTRA_DIST
+= $(IDLTEST_IDL_FILES
) tests
/idltest2.ovsschema
289 tests
/idltest.ovsidl
: $(IDLTEST_IDL_FILES
)
290 $(AM_V_GEN
)$(OVSDB_IDLC
) -C
$(srcdir) annotate
$(IDLTEST_IDL_FILES
) > $@.tmp
&& \
293 tests
/idltest.c
: tests
/idltest.h
296 noinst_PROGRAMS
+= tests
/test-dpdkr
297 tests_test_dpdkr_SOURCES
= \
298 tests
/dpdk
/ring_client.c
299 tests_test_dpdkr_LDADD
= lib
/libopenvswitch.la
$(LIBS
)
302 noinst_PROGRAMS
+= tests
/ovstest
303 tests_ovstest_SOURCES
= \
306 tests
/test-aes128.c \
307 tests
/test-atomic.c \
308 tests
/test-bundle.c \
309 tests
/test-byte-order.c \
310 tests
/test-classifier.c \
316 tests
/test-hindex.c \
319 tests
/test-jsonrpc.c \
321 tests
/test-lockfile.c \
322 tests
/test-multipath.c \
323 tests
/test-netflow.c \
325 tests
/test-ofpbuf.c \
327 tests
/test-packets.c \
328 tests
/test-random.c \
330 tests
/test-reconnect.c \
335 tests
/test-unixctl.c \
338 tests
/test-bitmap.c \
343 tests_ovstest_SOURCES
+= \
344 tests
/test-unix-socket.c
348 tests_ovstest_SOURCES
+= \
349 tests
/test-netlink-conntrack.c
352 tests_ovstest_LDADD
= lib
/libopenvswitch.la ovn
/lib
/libovn.la
353 dist_check_SCRIPTS
= tests
/flowgen.pl
355 noinst_PROGRAMS
+= tests
/test-strtok_r
356 tests_test_strtok_r_SOURCES
= tests
/test-strtok_r.c
358 noinst_PROGRAMS
+= tests
/test-type-props
359 tests_test_type_props_SOURCES
= tests
/test-type-props.c
364 tests
/test-daemon.py \
366 tests
/test-jsonrpc.py \
368 tests
/test-ovsdb.py \
369 tests
/test-reconnect.py \
370 tests
/MockXenAPI.py \
371 tests
/test-unix-socket.py \
372 tests
/test-unixctl.py \
374 EXTRA_DIST
+= $(CHECK_PYFILES
)
375 PYCOV_CLEAN_FILES
+= $(CHECK_PYFILES
:.py
=.py
,cover
) .coverage
377 FLAKE8_PYFILES
+= $(CHECK_PYFILES
)
381 tests
/testpki-cacert.pem \
382 tests
/testpki-cert.pem \
383 tests
/testpki-privkey.pem \
384 tests
/testpki-req.pem \
385 tests
/testpki-cert2.pem \
386 tests
/testpki-privkey2.pem \
387 tests
/testpki-req2.pem
388 check_DATA
+= $(TESTPKI_FILES
)
389 CLEANFILES
+= $(TESTPKI_FILES
)
391 tests
/testpki-cacert.pem
: tests
/pki
/stamp
392 $(AM_V_GEN
)cp tests
/pki
/switchca
/cacert.pem
$@
393 tests
/testpki-cert.pem
: tests
/pki
/stamp
394 $(AM_V_GEN
)cp tests
/pki
/test-cert.pem
$@
395 tests
/testpki-req.pem
: tests
/pki
/stamp
396 $(AM_V_GEN
)cp tests
/pki
/test-req.pem
$@
397 tests
/testpki-privkey.pem
: tests
/pki
/stamp
398 $(AM_V_GEN
)cp tests
/pki
/test-privkey.pem
$@
399 tests
/testpki-cert2.pem
: tests
/pki
/stamp
400 $(AM_V_GEN
)cp tests
/pki
/test2-cert.pem
$@
401 tests
/testpki-req2.pem
: tests
/pki
/stamp
402 $(AM_V_GEN
)cp tests
/pki
/test2-req.pem
$@
403 tests
/testpki-privkey2.pem
: tests
/pki
/stamp
404 $(AM_V_GEN
)cp tests
/pki
/test2-privkey.pem
$@
406 OVS_PKI
= $(SHELL
) $(srcdir)/utilities
/ovs-pki.in
--dir=tests
/pki
--log
=tests
/ovs-pki.log
408 $(AM_V_at
)rm -f tests
/pki
/stamp
409 $(AM_V_at
)rm -rf tests
/pki
410 $(AM_V_GEN
)$(OVS_PKI
) init
&& \
411 $(OVS_PKI
) req
+sign tests
/pki
/test && \
412 $(OVS_PKI
) req
+sign tests
/pki
/test2
&& \
414 CLEANFILES
+= tests
/ovs-pki.log
416 CLEAN_LOCAL
+= clean-pki
418 rm -f tests
/pki
/stamp