6 $(srcdir)/tests/testsuite
9 tests/ovsdb-macros.at \
12 tests/check-structs.at \
25 tests/ovsdb-types.at \
27 tests/ovsdb-column.at \
28 tests/ovsdb-table.at \
30 tests/ovsdb-schema.at \
31 tests/ovsdb-condition.at \
32 tests/ovsdb-mutation.at \
33 tests/ovsdb-query.at \
34 tests/ovsdb-transaction.at \
35 tests/ovsdb-execution.at \
36 tests/ovsdb-trigger.at \
38 tests/ovsdb-server.at \
39 tests/ovsdb-monitor.at \
43 tests/interface-reconfigure.at
44 TESTSUITE = $(srcdir)/tests/testsuite
45 DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
47 AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests
49 check-local: tests/atconfig tests/atlocal $(TESTSUITE)
50 $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
55 tests/lcov/ovs-appctl \
56 tests/lcov/ovs-vsctl \
57 tests/lcov/ovsdb-client \
58 tests/lcov/ovsdb-server \
59 tests/lcov/ovsdb-tool \
60 tests/lcov/test-aes128 \
61 tests/lcov/test-classifier \
62 tests/lcov/test-csum \
63 tests/lcov/test-dhcp-client \
64 tests/lcov/test-dir_name \
65 tests/lcov/test-flows \
66 tests/lcov/test-hash \
67 tests/lcov/test-hmap \
68 tests/lcov/test-json \
69 tests/lcov/test-jsonrpc \
70 tests/lcov/test-list \
71 tests/lcov/test-lockfile \
72 tests/lcov/test-ovsdb \
73 tests/lcov/test-reconnect \
74 tests/lcov/test-sha1 \
76 tests/lcov/test-timeval \
77 tests/lcov/test-type-props \
78 tests/lcov/test-uuid \
81 $(lcov_wrappers): tests/lcov-wrapper.in
82 @test -d tests/lcov || mkdir tests/lcov
83 sed -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),' \
84 -e 's,[@]wrap_program[@],$@,' \
85 $(top_srcdir)/tests/lcov-wrapper.in > $@.tmp
88 CLEANFILES += $(lcov_wrappers)
89 EXTRA_DIST += tests/lcov-wrapper.in
91 LCOV = lcov -b $(abs_top_builddir) -d $(abs_top_builddir) -q
92 check-lcov: all tests/atconfig tests/atlocal $(TESTSUITE) $(lcov_wrappers)
93 rm -fr tests/coverage.html tests/coverage.info
94 $(LCOV) -c -i -o - > tests/coverage.info
95 $(SHELL) '$(TESTSUITE)' -C tests CHECK_LCOV=true AUTOTEST_PATH='tests/lcov:$(AUTOTEST_PATH)' $(TESTSUITEFLAGS); \
97 echo "Producing coverage.html..."; \
98 cd tests && genhtml -q -o coverage.html coverage.info; \
103 valgrind_wrappers = \
104 tests/valgrind/ovs-appctl \
105 tests/valgrind/ovs-vsctl \
106 tests/valgrind/ovsdb-client \
107 tests/valgrind/ovsdb-server \
108 tests/valgrind/ovsdb-tool \
109 tests/valgrind/test-aes128 \
110 tests/valgrind/test-classifier \
111 tests/valgrind/test-csum \
112 tests/valgrind/test-dhcp-client \
113 tests/valgrind/test-dir_name \
114 tests/valgrind/test-flows \
115 tests/valgrind/test-hash \
116 tests/valgrind/test-hmap \
117 tests/valgrind/test-json \
118 tests/valgrind/test-jsonrpc \
119 tests/valgrind/test-list \
120 tests/valgrind/test-lockfile \
121 tests/valgrind/test-ovsdb \
122 tests/valgrind/test-reconnect \
123 tests/valgrind/test-sha1 \
124 tests/valgrind/test-stp \
125 tests/valgrind/test-timeval \
126 tests/valgrind/test-type-props \
127 tests/valgrind/test-uuid \
128 tests/valgrind/test-vconn
130 $(valgrind_wrappers): tests/valgrind-wrapper.in
131 @test -d tests/valgrind || mkdir tests/valgrind
132 sed -e 's,[@]wrap_program[@],$@,' \
133 $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp
136 CLEANFILES += $(valgrind_wrappers)
137 EXTRA_DIST += tests/valgrind-wrapper.in
139 VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \
140 --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20
141 EXTRA_DIST += tests/openssl.supp
142 check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) $(valgrind_wrappers)
143 $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
145 @echo '----------------------------------------------------------------------'
146 @echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
147 @echo '----------------------------------------------------------------------'
150 test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
153 AUTOTEST = $(AUTOM4TE) --language=autotest
154 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
155 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
158 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
159 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
161 echo '# Signature of the current package.' && \
162 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
163 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
164 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
165 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
166 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
167 } >'$(srcdir)/package.m4'
169 noinst_PROGRAMS += tests/test-aes128
170 tests_test_aes128_SOURCES = tests/test-aes128.c
171 tests_test_aes128_LDADD = lib/libopenvswitch.a
173 noinst_PROGRAMS += tests/test-classifier
174 tests_test_classifier_SOURCES = \
175 tests/test-classifier.c \
176 tests/test-command-line.c
177 tests_test_classifier_LDADD = lib/libopenvswitch.a
179 noinst_PROGRAMS += tests/test-csum
180 tests_test_csum_SOURCES = tests/test-csum.c
181 tests_test_csum_LDADD = lib/libopenvswitch.a
183 noinst_PROGRAMS += tests/test-dir_name
184 tests_test_dir_name_SOURCES = tests/test-dir_name.c
185 tests_test_dir_name_LDADD = lib/libopenvswitch.a
187 noinst_PROGRAMS += tests/test-flows
188 tests_test_flows_SOURCES = tests/test-flows.c
189 tests_test_flows_LDADD = lib/libopenvswitch.a
190 dist_check_SCRIPTS = tests/flowgen.pl
192 noinst_PROGRAMS += tests/test-hash
193 tests_test_hash_SOURCES = tests/test-hash.c
194 tests_test_hash_LDADD = lib/libopenvswitch.a
196 noinst_PROGRAMS += tests/test-hmap
197 tests_test_hmap_SOURCES = tests/test-hmap.c
198 tests_test_hmap_LDADD = lib/libopenvswitch.a
200 noinst_PROGRAMS += tests/test-json
201 tests_test_json_SOURCES = tests/test-json.c
202 tests_test_json_LDADD = lib/libopenvswitch.a
204 noinst_PROGRAMS += tests/test-jsonrpc
205 tests_test_jsonrpc_SOURCES = tests/test-jsonrpc.c
206 tests_test_jsonrpc_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
208 noinst_PROGRAMS += tests/test-list
209 tests_test_list_SOURCES = tests/test-list.c
210 tests_test_list_LDADD = lib/libopenvswitch.a
212 noinst_PROGRAMS += tests/test-lockfile
213 tests_test_lockfile_SOURCES = tests/test-lockfile.c
214 tests_test_lockfile_LDADD = lib/libopenvswitch.a
216 noinst_PROGRAMS += tests/test-ovsdb
217 tests_test_ovsdb_SOURCES = \
221 EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl
222 tests_test_ovsdb_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS)
224 # idltest schema and IDL
225 OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
226 IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
227 EXTRA_DIST += $(IDLTEST_IDL_FILES)
228 tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
229 $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp
232 tests/idltest.c: tests/idltest.h
234 noinst_PROGRAMS += tests/test-reconnect
235 tests_test_reconnect_SOURCES = tests/test-reconnect.c
236 tests_test_reconnect_LDADD = lib/libopenvswitch.a
238 noinst_PROGRAMS += tests/test-sha1
239 tests_test_sha1_SOURCES = tests/test-sha1.c
240 tests_test_sha1_LDADD = lib/libopenvswitch.a
242 noinst_PROGRAMS += tests/test-timeval
243 tests_test_timeval_SOURCES = tests/test-timeval.c
244 tests_test_timeval_LDADD = lib/libopenvswitch.a
246 noinst_PROGRAMS += tests/test-strtok_r
247 tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
249 noinst_PROGRAMS += tests/test-type-props
250 tests_test_type_props_SOURCES = tests/test-type-props.c
252 noinst_PROGRAMS += tests/test-dhcp-client
253 tests_test_dhcp_client_SOURCES = tests/test-dhcp-client.c
254 tests_test_dhcp_client_LDADD = lib/libopenvswitch.a
256 noinst_PROGRAMS += tests/test-stp
257 tests_test_stp_SOURCES = tests/test-stp.c
258 tests_test_stp_LDADD = lib/libopenvswitch.a
260 noinst_PROGRAMS += tests/test-uuid
261 tests_test_uuid_SOURCES = tests/test-uuid.c
262 tests_test_uuid_LDADD = lib/libopenvswitch.a
264 noinst_PROGRAMS += tests/test-vconn
265 tests_test_vconn_SOURCES = tests/test-vconn.c
266 tests_test_vconn_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
268 tests/testpki-cacert.pem \
269 tests/testpki-cert.pem \
270 tests/testpki-cert2.pem \
271 tests/testpki-privkey.pem \
272 tests/testpki-privkey2.pem \
273 tests/testpki-req.pem \
274 tests/testpki-req2.pem