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 \
61 tests
/vlan-splinters.at \
65 tests
/ovsdb-types.at \
67 tests
/ovsdb-column.at \
68 tests
/ovsdb-table.at \
70 tests
/ovsdb-schema.at \
71 tests
/ovsdb-condition.at \
72 tests
/ovsdb-mutation.at \
73 tests
/ovsdb-query.at \
74 tests
/ovsdb-transaction.at \
75 tests
/ovsdb-execution.at \
76 tests
/ovsdb-trigger.at \
78 tests
/ovsdb-server.at \
79 tests
/ovsdb-monitor.at \
82 tests
/ovs-monitor-ipsec.at \
83 tests
/ovs-xapi-sync.at \
86 tests
/interface-reconfigure.at \
89 tests
/auto-attach.at \
93 tests
/ovn-controller.at \
94 tests
/ovn-controller-vtep.at
96 SYSTEM_KMOD_TESTSUITE_AT
= \
97 tests
/system-common-macros.at \
98 tests
/system-kmod-testsuite.at \
99 tests
/system-kmod-macros.at
101 SYSTEM_USERSPACE_TESTSUITE_AT
= \
102 tests
/system-userspace-testsuite.at \
103 tests
/system-userspace-macros.at
105 SYSTEM_TESTSUITE_AT
= \
106 tests
/system-common-macros.at \
107 tests
/system-traffic.at
109 TESTSUITE
= $(srcdir)/tests
/testsuite
110 TESTSUITE_PATCH
= $(srcdir)/tests
/testsuite.patch
111 SYSTEM_KMOD_TESTSUITE
= $(srcdir)/tests
/system-kmod-testsuite
112 SYSTEM_USERSPACE_TESTSUITE
= $(srcdir)/tests
/system-userspace-testsuite
113 DISTCLEANFILES
+= tests
/atconfig tests
/atlocal
115 AUTOTEST_PATH
= utilities
:vswitchd
:ovsdb
:vtep
:tests
:$(PTHREAD_WIN32_DIR_DLL
):ovn
/controller-vtep
:ovn
/northd
:ovn
/utilities
:ovn
/controller
117 check-local
: tests
/atconfig tests
/atlocal
$(TESTSUITE
)
118 set
$(SHELL
) '$(TESTSUITE)' -C tests AUTOTEST_PATH
=$(AUTOTEST_PATH
) $(TESTSUITEFLAGS
); \
119 "$$@" ||
(test X
'$(RECHECK)' = Xyes
&& "$$@" --recheck
)
121 # Python Coverage support.
122 # Requires coverage.py http://nedbatchelder.com/code/coverage/.
125 COVERAGE_FILE
='$(abs_srcdir)/.coverage'
126 check-pycov
: all tests
/atconfig tests
/atlocal
$(TESTSUITE
) clean-pycov
127 PYTHONDONTWRITEBYTECODE
=yes COVERAGE_FILE
=$(COVERAGE_FILE
) PYTHON
='$(COVERAGE) run -p' $(SHELL
) '$(TESTSUITE)' -C tests AUTOTEST_PATH
=$(AUTOTEST_PATH
) $(TESTSUITEFLAGS
)
128 @cd
$(srcdir) && $(COVERAGE
) combine
&& COVERAGE_FILE
=$(COVERAGE_FILE
) $(COVERAGE
) annotate
130 @echo
'----------------------------------------------------------------------'
131 @echo
'Annotated coverage source has the ",cover" extension.'
132 @echo
'----------------------------------------------------------------------'
134 @COVERAGE_FILE
=$(COVERAGE_FILE
) $(COVERAGE
) report
138 valgrind_wrappers
= \
139 tests
/valgrind
/ovs-appctl \
140 tests
/valgrind
/ovs-ofctl \
141 tests
/valgrind
/ovstest \
142 tests
/valgrind
/ovs-vsctl \
143 tests
/valgrind
/ovs-vswitchd \
144 tests
/valgrind
/ovsdb-client \
145 tests
/valgrind
/ovsdb-server \
146 tests
/valgrind
/ovsdb-tool \
147 tests
/valgrind
/test-aes128 \
148 tests
/valgrind
/test-atomic \
149 tests
/valgrind
/test-bundle \
150 tests
/valgrind
/test-byte-order \
151 tests
/valgrind
/test-classifier \
152 tests
/valgrind
/test-cmap \
153 tests
/valgrind
/test-csum \
154 tests
/valgrind
/test-flows \
155 tests
/valgrind
/test-hash \
156 tests
/valgrind
/test-hindex \
157 tests
/valgrind
/test-hmap \
158 tests
/valgrind
/test-json \
159 tests
/valgrind
/test-jsonrpc \
160 tests
/valgrind
/test-list \
161 tests
/valgrind
/test-lockfile \
162 tests
/valgrind
/test-multipath \
163 tests
/valgrind
/test-odp \
164 tests
/valgrind
/test-ofpbuf \
165 tests
/valgrind
/test-ovsdb \
166 tests
/valgrind
/test-packets \
167 tests
/valgrind
/test-random \
168 tests
/valgrind
/test-reconnect \
169 tests
/valgrind
/test-rstp \
170 tests
/valgrind
/test-sha1 \
171 tests
/valgrind
/test-stp \
172 tests
/valgrind
/test-type-props \
173 tests
/valgrind
/test-unix-socket \
174 tests
/valgrind
/test-unixctl \
175 tests
/valgrind
/test-uuid \
176 tests
/valgrind
/test-vconn
178 $(valgrind_wrappers
): tests
/valgrind-wrapper.in
179 @
test -d tests
/valgrind || mkdir tests
/valgrind
180 $(AM_V_GEN
) sed
-e
's,[@]wrap_program[@],$@,' \
181 $(top_srcdir
)/tests
/valgrind-wrapper.in
> $@.tmp
&& \
184 CLEANFILES
+= $(valgrind_wrappers
)
185 EXTRA_DIST
+= tests
/valgrind-wrapper.in
187 VALGRIND
= valgrind
--log-file
=valgrind.
%p
--leak-check
=full \
188 --suppressions
=$(abs_top_srcdir
)/tests
/glibc.supp \
189 --suppressions
=$(abs_top_srcdir
)/tests
/openssl.supp
--num-callers
=20
190 EXTRA_DIST
+= tests
/glibc.supp tests
/openssl.supp
191 check-valgrind
: all tests
/atconfig tests
/atlocal
$(TESTSUITE
) \
192 $(valgrind_wrappers
) $(check_DATA
)
193 $(SHELL
) '$(TESTSUITE)' -C tests CHECK_VALGRIND
=true VALGRIND
='$(VALGRIND)' AUTOTEST_PATH
='tests/valgrind:$(AUTOTEST_PATH)' -d
$(TESTSUITEFLAGS
)
195 @echo
'----------------------------------------------------------------------'
196 @echo
'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
197 @echo
'----------------------------------------------------------------------'
202 $(AM_V_at
)srcdir='$(srcdir)' $(SHELL
) $(srcdir)/tests
/run-oftest
203 EXTRA_DIST
+= tests
/run-oftest
207 $(AM_V_at
)srcdir='$(srcdir)' $(SHELL
) $(srcdir)/tests
/run-ryu
208 EXTRA_DIST
+= tests
/run-ryu
210 # Run kmod tests. Assume kernel modules has been installed or linked into the kernel
211 check-kernel
: all tests
/atconfig tests
/atlocal
$(SYSTEM_KMOD_TESTSUITE
)
212 $(SHELL
) '$(SYSTEM_KMOD_TESTSUITE)' -C tests AUTOTEST_PATH
='$(AUTOTEST_PATH)' -d
$(TESTSUITEFLAGS
)
214 # Testing the out of tree Kernel module
215 check-kmod
: all tests
/atconfig tests
/atlocal
$(SYSTEM_KMOD_TESTSUITE
)
216 $(MAKE
) modules_install
217 modprobe
-r openvswitch
220 check-system-userspace
: all tests
/atconfig tests
/atlocal
$(SYSTEM_USERSPACE_TESTSUITE
)
221 $(SHELL
) '$(SYSTEM_USERSPACE_TESTSUITE)' -C tests AUTOTEST_PATH
='$(AUTOTEST_PATH)' $(TESTSUITEFLAGS
)
224 test ! -f
'$(TESTSUITE)' ||
$(SHELL
) '$(TESTSUITE)' -C tests
--clean
226 AUTOTEST
= $(AUTOM4TE
) --language
=autotest
229 $(TESTSUITE
): package.m4
$(TESTSUITE_AT
) $(COMMON_MACROS_AT
) $(TESTSUITE_PATCH
)
230 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o testsuite.tmp
$@.at
231 patch
-p0 testsuite.tmp
$(TESTSUITE_PATCH
)
232 $(AM_V_at
)mv testsuite.tmp
$@
234 $(TESTSUITE
): package.m4
$(TESTSUITE_AT
) $(COMMON_MACROS_AT
)
235 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
236 $(AM_V_at
)mv
$@.tmp
$@
239 $(SYSTEM_KMOD_TESTSUITE
): package.m4
$(SYSTEM_TESTSUITE_AT
) $(SYSTEM_KMOD_TESTSUITE_AT
) $(COMMON_MACROS_AT
)
240 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
241 $(AM_V_at
)mv
$@.tmp
$@
243 $(SYSTEM_USERSPACE_TESTSUITE
): package.m4
$(SYSTEM_TESTSUITE_AT
) $(SYSTEM_USERSPACE_TESTSUITE_AT
) $(COMMON_MACROS_AT
)
244 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
245 $(AM_V_at
)mv
$@.tmp
$@
247 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
248 $(srcdir)/package.m4
: $(top_srcdir
)/configure.ac
250 echo
'# Signature of the current package.' && \
251 echo
'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
252 echo
'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
253 echo
'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
254 echo
'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
255 echo
'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
256 } >'$(srcdir)/package.m4'
258 noinst_PROGRAMS
+= tests
/test-ovsdb
259 tests_test_ovsdb_SOURCES
= tests
/test-ovsdb.c
260 nodist_tests_test_ovsdb_SOURCES
= tests
/idltest.c tests
/idltest.h
261 EXTRA_DIST
+= tests
/uuidfilt.pl tests
/ovsdb-monitor-sort.pl
262 tests_test_ovsdb_LDADD
= ovsdb
/libovsdb.la lib
/libopenvswitch.la
264 noinst_PROGRAMS
+= tests
/test-lib
265 tests_test_lib_SOURCES
= \
267 tests_test_lib_LDADD
= lib
/libopenvswitch.la
269 # idltest schema and IDL
270 OVSIDL_BUILT
+= tests
/idltest.c tests
/idltest.h tests
/idltest.ovsidl
271 IDLTEST_IDL_FILES
= tests
/idltest.ovsschema tests
/idltest.ann
272 EXTRA_DIST
+= $(IDLTEST_IDL_FILES
) tests
/idltest2.ovsschema
273 tests
/idltest.ovsidl
: $(IDLTEST_IDL_FILES
)
274 $(AM_V_GEN
)$(OVSDB_IDLC
) -C
$(srcdir) annotate
$(IDLTEST_IDL_FILES
) > $@.tmp
&& \
277 tests
/idltest.c
: tests
/idltest.h
280 noinst_PROGRAMS
+= tests
/test-dpdkr
281 tests_test_dpdkr_SOURCES
= \
282 tests
/dpdk
/ring_client.c
283 tests_test_dpdkr_LDADD
= lib
/libopenvswitch.la
$(LIBS
)
286 noinst_PROGRAMS
+= tests
/ovstest
287 tests_ovstest_SOURCES
= \
290 tests
/test-aes128.c \
291 tests
/test-atomic.c \
292 tests
/test-bundle.c \
293 tests
/test-byte-order.c \
294 tests
/test-classifier.c \
300 tests
/test-hindex.c \
303 tests
/test-jsonrpc.c \
305 tests
/test-lockfile.c \
306 tests
/test-multipath.c \
307 tests
/test-netflow.c \
309 tests
/test-ofpbuf.c \
311 tests
/test-packets.c \
312 tests
/test-random.c \
313 tests
/test-reconnect.c \
318 tests
/test-unixctl.c \
321 tests
/test-bitmap.c \
326 tests_ovstest_SOURCES
+= \
327 tests
/test-unix-socket.c
331 tests_ovstest_SOURCES
+= \
332 tests
/test-netlink-conntrack.c
335 tests_ovstest_LDADD
= lib
/libopenvswitch.la ovn
/lib
/libovn.la
336 dist_check_SCRIPTS
= tests
/flowgen.pl
338 noinst_PROGRAMS
+= tests
/test-strtok_r
339 tests_test_strtok_r_SOURCES
= tests
/test-strtok_r.c
341 noinst_PROGRAMS
+= tests
/test-type-props
342 tests_test_type_props_SOURCES
= tests
/test-type-props.c
347 tests
/test-daemon.py \
349 tests
/test-jsonrpc.py \
351 tests
/test-ovsdb.py \
352 tests
/test-reconnect.py \
353 tests
/MockXenAPI.py \
354 tests
/test-unix-socket.py \
355 tests
/test-unixctl.py \
357 EXTRA_DIST
+= $(CHECK_PYFILES
)
358 PYCOV_CLEAN_FILES
+= $(CHECK_PYFILES
:.py
=.py
,cover
) .coverage
360 FLAKE8_PYFILES
+= $(CHECK_PYFILES
)
364 tests
/testpki-cacert.pem \
365 tests
/testpki-cert.pem \
366 tests
/testpki-privkey.pem \
367 tests
/testpki-req.pem \
368 tests
/testpki-cert2.pem \
369 tests
/testpki-privkey2.pem \
370 tests
/testpki-req2.pem
371 check_DATA
+= $(TESTPKI_FILES
)
372 CLEANFILES
+= $(TESTPKI_FILES
)
374 tests
/testpki-cacert.pem
: tests
/pki
/stamp
375 $(AM_V_GEN
)cp tests
/pki
/switchca
/cacert.pem
$@
376 tests
/testpki-cert.pem
: tests
/pki
/stamp
377 $(AM_V_GEN
)cp tests
/pki
/test-cert.pem
$@
378 tests
/testpki-req.pem
: tests
/pki
/stamp
379 $(AM_V_GEN
)cp tests
/pki
/test-req.pem
$@
380 tests
/testpki-privkey.pem
: tests
/pki
/stamp
381 $(AM_V_GEN
)cp tests
/pki
/test-privkey.pem
$@
382 tests
/testpki-cert2.pem
: tests
/pki
/stamp
383 $(AM_V_GEN
)cp tests
/pki
/test2-cert.pem
$@
384 tests
/testpki-req2.pem
: tests
/pki
/stamp
385 $(AM_V_GEN
)cp tests
/pki
/test2-req.pem
$@
386 tests
/testpki-privkey2.pem
: tests
/pki
/stamp
387 $(AM_V_GEN
)cp tests
/pki
/test2-privkey.pem
$@
389 OVS_PKI
= $(SHELL
) $(srcdir)/utilities
/ovs-pki.in
--dir=tests
/pki
--log
=tests
/ovs-pki.log
391 $(AM_V_at
)rm -f tests
/pki
/stamp
392 $(AM_V_at
)rm -rf tests
/pki
393 $(AM_V_GEN
)$(OVS_PKI
) init
&& \
394 $(OVS_PKI
) req
+sign tests
/pki
/test && \
395 $(OVS_PKI
) req
+sign tests
/pki
/test2
&& \
397 CLEANFILES
+= tests
/ovs-pki.log
399 CLEAN_LOCAL
+= clean-pki
401 rm -f tests
/pki
/stamp