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
:ovn
/controller-vtep
:ovn
/northd
:ovn
/utilities
:ovn
/controller
117 check-local
: tests
/atconfig tests
/atlocal
$(TESTSUITE
)
118 $(SHELL
) '$(TESTSUITE)' -C tests AUTOTEST_PATH
=$(AUTOTEST_PATH
) $(TESTSUITEFLAGS
)
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
137 valgrind_wrappers
= \
138 tests
/valgrind
/ovs-appctl \
139 tests
/valgrind
/ovs-ofctl \
140 tests
/valgrind
/ovstest \
141 tests
/valgrind
/ovs-vsctl \
142 tests
/valgrind
/ovs-vswitchd \
143 tests
/valgrind
/ovsdb-client \
144 tests
/valgrind
/ovsdb-server \
145 tests
/valgrind
/ovsdb-tool \
146 tests
/valgrind
/test-aes128 \
147 tests
/valgrind
/test-atomic \
148 tests
/valgrind
/test-bundle \
149 tests
/valgrind
/test-byte-order \
150 tests
/valgrind
/test-classifier \
151 tests
/valgrind
/test-cmap \
152 tests
/valgrind
/test-csum \
153 tests
/valgrind
/test-flows \
154 tests
/valgrind
/test-hash \
155 tests
/valgrind
/test-hindex \
156 tests
/valgrind
/test-hmap \
157 tests
/valgrind
/test-json \
158 tests
/valgrind
/test-jsonrpc \
159 tests
/valgrind
/test-list \
160 tests
/valgrind
/test-lockfile \
161 tests
/valgrind
/test-multipath \
162 tests
/valgrind
/test-odp \
163 tests
/valgrind
/test-ofpbuf \
164 tests
/valgrind
/test-ovsdb \
165 tests
/valgrind
/test-packets \
166 tests
/valgrind
/test-random \
167 tests
/valgrind
/test-reconnect \
168 tests
/valgrind
/test-rstp \
169 tests
/valgrind
/test-sha1 \
170 tests
/valgrind
/test-stp \
171 tests
/valgrind
/test-type-props \
172 tests
/valgrind
/test-unix-socket \
173 tests
/valgrind
/test-uuid \
174 tests
/valgrind
/test-vconn
176 $(valgrind_wrappers
): tests
/valgrind-wrapper.in
177 @
test -d tests
/valgrind || mkdir tests
/valgrind
178 $(AM_V_GEN
) sed
-e
's,[@]wrap_program[@],$@,' \
179 $(top_srcdir
)/tests
/valgrind-wrapper.in
> $@.tmp
&& \
182 CLEANFILES
+= $(valgrind_wrappers
)
183 EXTRA_DIST
+= tests
/valgrind-wrapper.in
185 VALGRIND
= valgrind
--log-file
=valgrind.
%p
--leak-check
=full \
186 --suppressions
=$(abs_top_srcdir
)/tests
/glibc.supp \
187 --suppressions
=$(abs_top_srcdir
)/tests
/openssl.supp
--num-callers
=20
188 EXTRA_DIST
+= tests
/glibc.supp tests
/openssl.supp
189 check-valgrind
: all tests
/atconfig tests
/atlocal
$(TESTSUITE
) \
190 $(valgrind_wrappers
) $(check_DATA
)
191 $(SHELL
) '$(TESTSUITE)' -C tests CHECK_VALGRIND
=true VALGRIND
='$(VALGRIND)' AUTOTEST_PATH
='tests/valgrind:$(AUTOTEST_PATH)' -d
$(TESTSUITEFLAGS
)
193 @echo
'----------------------------------------------------------------------'
194 @echo
'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
195 @echo
'----------------------------------------------------------------------'
200 $(AM_V_at
)srcdir='$(srcdir)' $(SHELL
) $(srcdir)/tests
/run-oftest
201 EXTRA_DIST
+= tests
/run-oftest
205 $(AM_V_at
)srcdir='$(srcdir)' $(SHELL
) $(srcdir)/tests
/run-ryu
206 EXTRA_DIST
+= tests
/run-ryu
208 # Run kmod tests. Assume kernel modules has been installed or linked into the kernel
209 check-kernel
: all tests
/atconfig tests
/atlocal
$(SYSTEM_KMOD_TESTSUITE
)
210 $(SHELL
) '$(SYSTEM_KMOD_TESTSUITE)' -C tests AUTOTEST_PATH
='$(AUTOTEST_PATH)' -d
$(TESTSUITEFLAGS
)
212 # Testing the out of tree Kernel module
213 check-kmod
: all tests
/atconfig tests
/atlocal
$(SYSTEM_KMOD_TESTSUITE
)
214 $(MAKE
) modules_install
215 modprobe
-r openvswitch
218 check-system-userspace
: all tests
/atconfig tests
/atlocal
$(SYSTEM_USERSPACE_TESTSUITE
)
219 $(SHELL
) '$(SYSTEM_USERSPACE_TESTSUITE)' -C tests AUTOTEST_PATH
='$(AUTOTEST_PATH)' $(TESTSUITEFLAGS
)
222 test ! -f
'$(TESTSUITE)' ||
$(SHELL
) '$(TESTSUITE)' -C tests
--clean
224 AUTOTEST
= $(AUTOM4TE
) --language
=autotest
227 $(TESTSUITE
): package.m4
$(TESTSUITE_AT
) $(COMMON_MACROS_AT
) $(TESTSUITE_PATCH
)
228 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o testsuite.tmp
$@.at
229 patch
-p0 testsuite.tmp
$(TESTSUITE_PATCH
)
230 $(AM_V_at
)mv testsuite.tmp
$@
232 $(TESTSUITE
): package.m4
$(TESTSUITE_AT
) $(COMMON_MACROS_AT
)
233 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
234 $(AM_V_at
)mv
$@.tmp
$@
237 $(SYSTEM_KMOD_TESTSUITE
): package.m4
$(SYSTEM_TESTSUITE_AT
) $(SYSTEM_KMOD_TESTSUITE_AT
) $(COMMON_MACROS_AT
)
238 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
239 $(AM_V_at
)mv
$@.tmp
$@
241 $(SYSTEM_USERSPACE_TESTSUITE
): package.m4
$(SYSTEM_TESTSUITE_AT
) $(SYSTEM_USERSPACE_TESTSUITE_AT
) $(COMMON_MACROS_AT
)
242 $(AM_V_GEN
)$(AUTOTEST
) -I
'$(srcdir)' -o
$@.tmp
$@.at
243 $(AM_V_at
)mv
$@.tmp
$@
245 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
246 $(srcdir)/package.m4
: $(top_srcdir
)/configure.ac
248 echo
'# Signature of the current package.' && \
249 echo
'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
250 echo
'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
251 echo
'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
252 echo
'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
253 echo
'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
254 } >'$(srcdir)/package.m4'
256 noinst_PROGRAMS
+= tests
/test-ovsdb
257 tests_test_ovsdb_SOURCES
= tests
/test-ovsdb.c
258 nodist_tests_test_ovsdb_SOURCES
= tests
/idltest.c tests
/idltest.h
259 EXTRA_DIST
+= tests
/uuidfilt.pl tests
/ovsdb-monitor-sort.pl
260 tests_test_ovsdb_LDADD
= ovsdb
/libovsdb.la lib
/libopenvswitch.la
262 noinst_PROGRAMS
+= tests
/test-lib
263 tests_test_lib_SOURCES
= \
265 tests_test_lib_LDADD
= lib
/libopenvswitch.la
267 # idltest schema and IDL
268 OVSIDL_BUILT
+= tests
/idltest.c tests
/idltest.h tests
/idltest.ovsidl
269 IDLTEST_IDL_FILES
= tests
/idltest.ovsschema tests
/idltest.ann
270 EXTRA_DIST
+= $(IDLTEST_IDL_FILES
) tests
/idltest2.ovsschema
271 tests
/idltest.ovsidl
: $(IDLTEST_IDL_FILES
)
272 $(AM_V_GEN
)$(OVSDB_IDLC
) -C
$(srcdir) annotate
$(IDLTEST_IDL_FILES
) > $@.tmp
&& \
275 tests
/idltest.c
: tests
/idltest.h
278 noinst_PROGRAMS
+= tests
/test-dpdkr
279 tests_test_dpdkr_SOURCES
= \
280 tests
/dpdk
/ring_client.c
281 tests_test_dpdkr_LDADD
= lib
/libopenvswitch.la
$(LIBS
)
284 noinst_PROGRAMS
+= tests
/ovstest
285 tests_ovstest_SOURCES
= \
288 tests
/test-aes128.c \
289 tests
/test-atomic.c \
290 tests
/test-bundle.c \
291 tests
/test-byte-order.c \
292 tests
/test-classifier.c \
298 tests
/test-hindex.c \
301 tests
/test-jsonrpc.c \
303 tests
/test-lockfile.c \
304 tests
/test-multipath.c \
305 tests
/test-netflow.c \
307 tests
/test-ofpbuf.c \
309 tests
/test-packets.c \
310 tests
/test-random.c \
311 tests
/test-reconnect.c \
318 tests
/test-bitmap.c \
323 tests_ovstest_SOURCES
+= \
324 tests
/test-unix-socket.c
328 tests_ovstest_SOURCES
+= \
329 tests
/test-netlink-conntrack.c
332 tests_ovstest_LDADD
= lib
/libopenvswitch.la ovn
/lib
/libovn.la
333 dist_check_SCRIPTS
= tests
/flowgen.pl
335 noinst_PROGRAMS
+= tests
/test-strtok_r
336 tests_test_strtok_r_SOURCES
= tests
/test-strtok_r.c
338 noinst_PROGRAMS
+= tests
/test-type-props
339 tests_test_type_props_SOURCES
= tests
/test-type-props.c
344 tests
/test-daemon.py \
346 tests
/test-jsonrpc.py \
348 tests
/test-ovsdb.py \
349 tests
/test-reconnect.py \
350 tests
/MockXenAPI.py \
351 tests
/test-unix-socket.py \
352 tests
/test-unixctl.py \
354 EXTRA_DIST
+= $(CHECK_PYFILES
)
355 PYCOV_CLEAN_FILES
+= $(CHECK_PYFILES
:.py
=.py
,cover
) .coverage
357 FLAKE8_PYFILES
+= $(CHECK_PYFILES
)
361 tests
/testpki-cacert.pem \
362 tests
/testpki-cert.pem \
363 tests
/testpki-privkey.pem \
364 tests
/testpki-req.pem \
365 tests
/testpki-cert2.pem \
366 tests
/testpki-privkey2.pem \
367 tests
/testpki-req2.pem
368 check_DATA
+= $(TESTPKI_FILES
)
369 CLEANFILES
+= $(TESTPKI_FILES
)
371 tests
/testpki-cacert.pem
: tests
/pki
/stamp
372 $(AM_V_GEN
)cp tests
/pki
/switchca
/cacert.pem
$@
373 tests
/testpki-cert.pem
: tests
/pki
/stamp
374 $(AM_V_GEN
)cp tests
/pki
/test-cert.pem
$@
375 tests
/testpki-req.pem
: tests
/pki
/stamp
376 $(AM_V_GEN
)cp tests
/pki
/test-req.pem
$@
377 tests
/testpki-privkey.pem
: tests
/pki
/stamp
378 $(AM_V_GEN
)cp tests
/pki
/test-privkey.pem
$@
379 tests
/testpki-cert2.pem
: tests
/pki
/stamp
380 $(AM_V_GEN
)cp tests
/pki
/test2-cert.pem
$@
381 tests
/testpki-req2.pem
: tests
/pki
/stamp
382 $(AM_V_GEN
)cp tests
/pki
/test2-req.pem
$@
383 tests
/testpki-privkey2.pem
: tests
/pki
/stamp
384 $(AM_V_GEN
)cp tests
/pki
/test2-privkey.pem
$@
386 OVS_PKI
= $(SHELL
) $(srcdir)/utilities
/ovs-pki.in
--dir=tests
/pki
--log
=tests
/ovs-pki.log
388 $(AM_V_at
)rm -f tests
/pki
/stamp
389 $(AM_V_at
)rm -rf tests
/pki
390 $(AM_V_GEN
)$(OVS_PKI
) init
&& \
391 $(OVS_PKI
) req
+sign tests
/pki
/test && \
392 $(OVS_PKI
) req
+sign tests
/pki
/test2
&& \
394 CLEANFILES
+= tests
/ovs-pki.log
396 CLEAN_LOCAL
+= clean-pki
398 rm -f tests
/pki
/stamp