4 $(SYSTEM_TESTSUITE_AT
) \
5 $(SYSTEM_KMOD_TESTSUITE_AT
) \
6 $(SYSTEM_USERSPACE_TESTSUITE_AT
) \
7 $(SYSTEM_OFFLOADS_TESTSUITE_AT
) \
9 $(SYSTEM_KMOD_TESTSUITE
) \
10 $(SYSTEM_USERSPACE_TESTSUITE
) \
11 $(SYSTEM_OFFLOADS_TESTSUITE
) \
13 $(srcdir)/package.m4 \
14 $(srcdir)/tests
/testsuite \
15 $(srcdir)/tests
/testsuite.patch
18 tests
/ovsdb-macros.at \
20 tests
/ofproto-macros.at
29 tests
/check-structs.at \
32 tests
/ofp-actions.at \
55 tests
/tunnel-push-pop.at \
56 tests
/tunnel-push-pop-ipv6.at \
60 tests
/ovs-vswitchd.at \
61 tests
/dpif-netdev.at \
63 tests
/ofproto-dpif.at \
66 tests
/netdev-type.at \
69 tests
/ovsdb-types.at \
71 tests
/ovsdb-column.at \
72 tests
/ovsdb-table.at \
74 tests
/ovsdb-schema.at \
75 tests
/ovsdb-condition.at \
76 tests
/ovsdb-mutation.at \
77 tests
/ovsdb-query.at \
78 tests
/ovsdb-transaction.at \
79 tests
/ovsdb-execution.at \
80 tests
/ovsdb-trigger.at \
82 tests
/ovsdb-replication.at \
83 tests
/ovsdb-server.at \
84 tests
/ovsdb-client.at \
85 tests
/ovsdb-monitor.at \
90 tests
/ovs-xapi-sync.at \
93 tests
/interface-reconfigure.at \
96 tests
/auto-attach.at \
101 tests
/ovn-controller.at \
102 tests
/ovn-controller-vtep.at \
103 tests
/mcast-snooping.at \
104 tests
/packet-type-aware.at \
107 SYSTEM_KMOD_TESTSUITE_AT
= \
108 tests
/system-common-macros.at \
109 tests
/system-kmod-testsuite.at \
110 tests
/system-kmod-macros.at
112 SYSTEM_USERSPACE_TESTSUITE_AT
= \
113 tests
/system-userspace-testsuite.at \
114 tests
/system-ovn.at \
115 tests
/system-userspace-macros.at \
116 tests
/system-userspace-packet-type-aware.at
118 SYSTEM_TESTSUITE_AT
= \
119 tests
/system-common-macros.at \
120 tests
/system-ovn.at \
121 tests
/system-layer3-tunnels.at \
122 tests
/system-traffic.at
124 SYSTEM_OFFLOADS_TESTSUITE_AT
= \
125 tests
/system-common-macros.at \
126 tests
/system-offloads-traffic.at \
127 tests
/system-offloads-testsuite.at
129 check_SCRIPTS
+= tests
/atlocal
131 TESTSUITE
= $(srcdir)/tests
/testsuite
132 TESTSUITE_PATCH
= $(srcdir)/tests
/testsuite.patch
133 SYSTEM_KMOD_TESTSUITE
= $(srcdir)/tests
/system-kmod-testsuite
134 SYSTEM_USERSPACE_TESTSUITE
= $(srcdir)/tests
/system-userspace-testsuite
135 SYSTEM_OFFLOADS_TESTSUITE
= $(srcdir)/tests
/system-offloads-testsuite
136 DISTCLEANFILES
+= tests
/atconfig tests
/atlocal
138 AUTOTEST_PATH
= utilities
:vswitchd
:ovsdb
:vtep
:tests
:$(PTHREAD_WIN32_DIR_DLL
):ovn
/controller-vtep
:ovn
/northd
:ovn
/utilities
:ovn
/controller
141 set
$(SHELL
) '$(TESTSUITE)' -C tests AUTOTEST_PATH
=$(AUTOTEST_PATH
) $(TESTSUITEFLAGS
); \
142 "$$@" ||
(test X
'$(RECHECK)' = Xyes
&& "$$@" --recheck
)
144 # Python Coverage support.
145 # Requires coverage.py http://nedbatchelder.com/code/coverage/.
148 COVERAGE_FILE
='$(abs_srcdir)/.coverage'
149 check-pycov
: all clean-pycov
150 PYTHONDONTWRITEBYTECODE
=yes COVERAGE_FILE
=$(COVERAGE_FILE
) PYTHON
='$(COVERAGE) run -p' $(SHELL
) '$(TESTSUITE)' -C tests AUTOTEST_PATH
=$(AUTOTEST_PATH
) $(TESTSUITEFLAGS
)
151 @cd
$(srcdir) && $(COVERAGE
) combine
&& COVERAGE_FILE
=$(COVERAGE_FILE
) $(COVERAGE
) annotate
153 @echo
'----------------------------------------------------------------------'
154 @echo
'Annotated coverage source has the ",cover" extension.'
155 @echo
'----------------------------------------------------------------------'
157 @COVERAGE_FILE
=$(COVERAGE_FILE
) $(COVERAGE
) report
160 # Requires build with --enable-coverage and lcov/genhtml in $PATH
161 CLEAN_LOCAL
+= clean-lcov
165 LCOV_OPTS
= -b
$(abs_top_builddir
) -d
$(abs_top_builddir
) -q
-c
--rc lcov_branch_coverage
=1
166 GENHTML_OPTS
= -q
--branch-coverage
--num-spaces
4
167 check-lcov
: all $(check_DATA
) clean-lcov
168 find .
-name
'*.gcda' | xargs
-n1
rm -f
169 -set
$(SHELL
) '$(TESTSUITE)' -C tests AUTOTEST_PATH
=$(AUTOTEST_PATH
) $(TESTSUITEFLAGS
); \
170 "$$@" ||
(test X
'$(RECHECK)' = Xyes
&& "$$@" --recheck
)
171 $(MKDIR_P
) tests
/lcov
172 lcov
$(LCOV_OPTS
) -o tests
/lcov
/coverage.
info
173 genhtml
$(GENHTML_OPTS
) -o tests
/lcov tests
/lcov
/coverage.
info
174 @echo
"coverage report generated at tests/lcov/index.html"
178 valgrind_wrappers
= \
179 tests
/valgrind
/ovn-controller \
180 tests
/valgrind
/ovn-nbctl \
181 tests
/valgrind
/ovn-northd \
182 tests
/valgrind
/ovn-sbctl \
183 tests
/valgrind
/ovs-appctl \
184 tests
/valgrind
/ovs-ofctl \
185 tests
/valgrind
/ovs-vsctl \
186 tests
/valgrind
/ovs-vswitchd \
187 tests
/valgrind
/ovsdb-client \
188 tests
/valgrind
/ovsdb-server \
189 tests
/valgrind
/ovsdb-tool \
190 tests
/valgrind
/ovstest \
191 tests
/valgrind
/test-ovsdb \
192 tests
/valgrind
/test-skiplist \
193 tests
/valgrind
/test-strtok_r \
194 tests
/valgrind
/test-type-props
196 $(valgrind_wrappers
): tests
/valgrind-wrapper.in
197 @
$(MKDIR_P
) tests
/valgrind
198 $(AM_V_GEN
) sed
-e
's,[@]wrap_program[@],$@,' \
199 $(top_srcdir
)/tests
/valgrind-wrapper.in
> $@.tmp
&& \
202 CLEANFILES
+= $(valgrind_wrappers
)
203 EXTRA_DIST
+= tests
/valgrind-wrapper.in
205 VALGRIND
= valgrind
--log-file
=valgrind.
%p
--leak-check
=full \
206 --suppressions
=$(abs_top_srcdir
)/tests
/glibc.supp \
207 --suppressions
=$(abs_top_srcdir
)/tests
/openssl.supp
--num-callers
=20
208 HELGRIND
= valgrind
--log-file
=helgrind.
%p
--tool
=helgrind \
209 --suppressions
=$(abs_top_srcdir
)/tests
/glibc.supp \
210 --suppressions
=$(abs_top_srcdir
)/tests
/openssl.supp
--num-callers
=20
211 EXTRA_DIST
+= tests
/glibc.supp tests
/openssl.supp
212 check-valgrind
: all $(valgrind_wrappers
) $(check_DATA
)
213 $(SHELL
) '$(TESTSUITE)' -C tests CHECK_VALGRIND
=true VALGRIND
='$(VALGRIND)' AUTOTEST_PATH
='tests/valgrind:$(AUTOTEST_PATH)' -d
$(TESTSUITEFLAGS
)
215 @echo
'----------------------------------------------------------------------'
216 @echo
'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
217 @echo
'----------------------------------------------------------------------'
218 check-helgrind
: all $(valgrind_wrappers
) $(check_DATA
)
219 -$(SHELL
) '$(TESTSUITE)' -C tests CHECK_VALGRIND
=true VALGRIND
='$(HELGRIND)' AUTOTEST_PATH
='tests/valgrind:$(AUTOTEST_PATH)' -d
$(TESTSUITEFLAGS
)
225 $(AM_V_at
)srcdir='$(srcdir)' $(SHELL
) $(srcdir)/tests
/run-oftest
226 EXTRA_DIST
+= tests
/run-oftest
230 $(AM_V_at
)srcdir='$(srcdir)' $(SHELL
) $(srcdir)/tests
/run-ryu
231 EXTRA_DIST
+= tests
/run-ryu
233 # Run kmod tests. Assume kernel modules has been installed or linked into the kernel
235 set
$(SHELL
) '$(SYSTEM_KMOD_TESTSUITE)' -C tests AUTOTEST_PATH
='$(AUTOTEST_PATH)' $(TESTSUITEFLAGS
) -j1
; \
236 "$$@" ||
(test X
'$(RECHECK)' = Xyes
&& "$$@" --recheck
)
238 # Testing the out of tree Kernel module
240 $(MAKE
) modules_install
241 modprobe
-r
-a vport-geneve vport-gre vport-lisp vport-stt vport-vxlan openvswitch
244 check-system-userspace
: all
245 set
$(SHELL
) '$(SYSTEM_USERSPACE_TESTSUITE)' -C tests AUTOTEST_PATH
='$(AUTOTEST_PATH)' $(TESTSUITEFLAGS
) -j1
; \
246 "$$@" ||
(test X
'$(RECHECK)' = Xyes
&& "$$@" --recheck
)
249 set
$(SHELL
) '$(SYSTEM_OFFLOADS_TESTSUITE)' -C tests AUTOTEST_PATH
='$(AUTOTEST_PATH)' $(TESTSUITEFLAGS
) -j1
; \
250 "$$@" ||
(test X
'$(RECHECK)' = Xyes
&& "$$@" --recheck
)
253 test ! -f
'$(TESTSUITE)' ||
$(SHELL
) '$(TESTSUITE)' -C tests
--clean
255 AUTOTEST
= $(AUTOM4TE
) --language
=autotest
258 $(TESTSUITE
): package.m4
$(TESTSUITE_AT
) $(COMMON_MACROS_AT
) $(TESTSUITE_PATCH
)
259 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o testsuite.tmp
$@.at
260 patch
-p0 testsuite.tmp
$(TESTSUITE_PATCH
)
261 $(AM_V_at
)mv testsuite.tmp
$@
263 $(TESTSUITE
): package.m4
$(TESTSUITE_AT
) $(COMMON_MACROS_AT
)
264 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
265 $(AM_V_at
)mv
$@.tmp
$@
268 $(SYSTEM_KMOD_TESTSUITE
): package.m4
$(SYSTEM_TESTSUITE_AT
) $(SYSTEM_KMOD_TESTSUITE_AT
) $(COMMON_MACROS_AT
)
269 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
270 $(AM_V_at
)mv
$@.tmp
$@
272 $(SYSTEM_USERSPACE_TESTSUITE
): package.m4
$(SYSTEM_TESTSUITE_AT
) $(SYSTEM_USERSPACE_TESTSUITE_AT
) $(COMMON_MACROS_AT
)
273 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
274 $(AM_V_at
)mv
$@.tmp
$@
276 $(SYSTEM_OFFLOADS_TESTSUITE
): package.m4
$(SYSTEM_TESTSUITE_AT
) $(SYSTEM_OFFLOADS_TESTSUITE_AT
) $(COMMON_MACROS_AT
)
277 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
278 $(AM_V_at
)mv
$@.tmp
$@
280 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
281 $(srcdir)/package.m4
: $(top_srcdir
)/configure.ac
283 echo
'# Signature of the current package.' && \
284 echo
'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
285 echo
'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
286 echo
'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
287 echo
'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
288 echo
'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
289 } >'$(srcdir)/package.m4'
291 noinst_PROGRAMS
+= tests
/test-ovsdb
292 tests_test_ovsdb_SOURCES
= tests
/test-ovsdb.c
293 nodist_tests_test_ovsdb_SOURCES
= tests
/idltest.c tests
/idltest.h
294 tests_test_ovsdb_LDADD
= ovsdb
/libovsdb.la lib
/libopenvswitch.la
296 noinst_PROGRAMS
+= tests
/test-lib
297 tests_test_lib_SOURCES
= \
299 tests_test_lib_LDADD
= lib
/libopenvswitch.la
301 # idltest schema and IDL
302 OVSIDL_BUILT
+= tests
/idltest.c tests
/idltest.h tests
/idltest.ovsidl
303 IDLTEST_IDL_FILES
= tests
/idltest.ovsschema tests
/idltest.ann
304 EXTRA_DIST
+= $(IDLTEST_IDL_FILES
) tests
/idltest2.ovsschema
305 tests
/idltest.ovsidl
: $(IDLTEST_IDL_FILES
)
306 $(AM_V_GEN
)$(OVSDB_IDLC
) -C
$(srcdir) annotate
$(IDLTEST_IDL_FILES
) > $@.tmp
&& \
309 tests
/idltest.c
: tests
/idltest.h
312 noinst_PROGRAMS
+= tests
/test-dpdkr
313 tests_test_dpdkr_SOURCES
= \
314 tests
/dpdk
/ring_client.c
315 tests_test_dpdkr_LDADD
= lib
/libopenvswitch.la
$(LIBS
)
318 noinst_PROGRAMS
+= tests
/ovstest
319 tests_ovstest_SOURCES
= \
322 tests
/test-aes128.c \
323 tests
/test-atomic.c \
324 tests
/test-bundle.c \
325 tests
/test-byte-order.c \
326 tests
/test-classifier.c \
329 tests
/test-conntrack.c \
334 tests
/test-hindex.c \
337 tests
/test-jsonrpc.c \
339 tests
/test-lockfile.c \
340 tests
/test-multipath.c \
341 tests
/test-netflow.c \
343 tests
/test-ofpbuf.c \
345 tests
/test-packets.c \
346 tests
/test-random.c \
348 tests
/test-reconnect.c \
352 tests
/test-skiplist.c \
354 tests
/test-unixctl.c \
357 tests
/test-bitmap.c \
362 tests_ovstest_SOURCES
+= \
363 tests
/test-unix-socket.c
367 tests_ovstest_SOURCES
+= \
368 tests
/test-netlink-conntrack.c
371 tests_ovstest_LDADD
= lib
/libopenvswitch.la ovn
/lib
/libovn.la
373 noinst_PROGRAMS
+= tests
/test-strtok_r
374 tests_test_strtok_r_SOURCES
= tests
/test-strtok_r.c
376 noinst_PROGRAMS
+= tests
/test-type-props
377 tests_test_type_props_SOURCES
= tests
/test-type-props.c
383 tests
/ovsdb-monitor-sort.py \
384 tests
/test-daemon.py \
386 tests
/test-jsonrpc.py \
388 tests
/test-ovsdb.py \
389 tests
/test-reconnect.py \
390 tests
/MockXenAPI.py \
391 tests
/test-unix-socket.py \
392 tests
/test-unixctl.py \
395 EXTRA_DIST
+= $(CHECK_PYFILES
)
396 PYCOV_CLEAN_FILES
+= $(CHECK_PYFILES
:.py
=.py
,cover
) .coverage
398 FLAKE8_PYFILES
+= $(CHECK_PYFILES
)
402 tests
/testpki-cacert.pem \
403 tests
/testpki-cert.pem \
404 tests
/testpki-privkey.pem \
405 tests
/testpki-req.pem \
406 tests
/testpki-cert2.pem \
407 tests
/testpki-privkey2.pem \
408 tests
/testpki-req2.pem
409 check_DATA
+= $(TESTPKI_FILES
)
410 CLEANFILES
+= $(TESTPKI_FILES
)
412 tests
/testpki-cacert.pem
: tests
/pki
/stamp
413 $(AM_V_GEN
)cp tests
/pki
/switchca
/cacert.pem
$@
414 tests
/testpki-cert.pem
: tests
/pki
/stamp
415 $(AM_V_GEN
)cp tests
/pki
/test-cert.pem
$@
416 tests
/testpki-req.pem
: tests
/pki
/stamp
417 $(AM_V_GEN
)cp tests
/pki
/test-req.pem
$@
418 tests
/testpki-privkey.pem
: tests
/pki
/stamp
419 $(AM_V_GEN
)cp tests
/pki
/test-privkey.pem
$@
420 tests
/testpki-cert2.pem
: tests
/pki
/stamp
421 $(AM_V_GEN
)cp tests
/pki
/test2-cert.pem
$@
422 tests
/testpki-req2.pem
: tests
/pki
/stamp
423 $(AM_V_GEN
)cp tests
/pki
/test2-req.pem
$@
424 tests
/testpki-privkey2.pem
: tests
/pki
/stamp
425 $(AM_V_GEN
)cp tests
/pki
/test2-privkey.pem
$@
427 OVS_PKI
= $(SHELL
) $(srcdir)/utilities
/ovs-pki.in
--dir=tests
/pki
--log
=tests
/ovs-pki.log
429 $(AM_V_at
)rm -f tests
/pki
/stamp
430 $(AM_V_at
)rm -rf tests
/pki
431 $(AM_V_GEN
)$(OVS_PKI
) init
&& \
432 $(OVS_PKI
) req
+sign tests
/pki
/test && \
433 $(OVS_PKI
) req
+sign tests
/pki
/test2
&& \
435 CLEANFILES
+= tests
/ovs-pki.log
437 CLEAN_LOCAL
+= clean-pki
439 rm -f tests
/pki
/stamp