]> git.proxmox.com Git - ovs.git/blame - tests/automake.mk
tests: Fix timing dependency in ovsdb-log test.
[ovs.git] / tests / automake.mk
CommitLineData
1b233b95
BP
1EXTRA_DIST += \
2 $(TESTSUITE_AT) \
3 $(TESTSUITE) \
4 tests/atlocal.in \
5 $(srcdir)/package.m4 \
6 $(srcdir)/tests/testsuite
7TESTSUITE_AT = \
8 tests/testsuite.at \
24c8ae53 9 tests/ovsdb-macros.at \
1b233b95 10 tests/library.at \
05b3c97b 11 tests/check-structs.at \
ff8decf1 12 tests/daemon.at \
d27ce529 13 tests/vconn.at \
29d4af60 14 tests/dir_name.at \
d918d9d1
BP
15 tests/aes128.at \
16 tests/uuid.at \
f38b84ea 17 tests/json.at \
f2129093 18 tests/jsonrpc.at \
e7cfedd6 19 tests/timeval.at \
ac718c9d 20 tests/lockfile.at \
3ed497fc 21 tests/reconnect.at \
f85f8ebb 22 tests/ovsdb.at \
41709ccc 23 tests/ovsdb-log.at \
f85f8ebb
BP
24 tests/ovsdb-types.at \
25 tests/ovsdb-data.at \
26 tests/ovsdb-column.at \
27 tests/ovsdb-table.at \
28 tests/ovsdb-row.at \
29 tests/ovsdb-condition.at \
e9f8f936 30 tests/ovsdb-mutation.at \
f85f8ebb
BP
31 tests/ovsdb-query.at \
32 tests/ovsdb-transaction.at \
33 tests/ovsdb-execution.at \
34 tests/ovsdb-trigger.at \
21ff1aee
BP
35 tests/ovsdb-file.at \
36 tests/ovsdb-server.at \
a8425c53 37 tests/ovsdb-monitor.at \
c3bb4bd7 38 tests/ovsdb-idl.at \
c2b07021 39 tests/stp.at \
7c126fbb 40 tests/ovs-vsctl.at
1b233b95
BP
41TESTSUITE = $(srcdir)/tests/testsuite
42DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
43
7c126fbb
BP
44AUTOTEST_PATH = utilities:vswitchd:ovsdb:tests
45
1b233b95 46check-local: tests/atconfig tests/atlocal $(TESTSUITE)
7c126fbb
BP
47 $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
48\f
49# lcov support
50
51lcov_wrappers = \
52 tests/lcov/ovs-appctl \
53 tests/lcov/ovs-vsctl \
54 tests/lcov/ovsdb-client \
55 tests/lcov/ovsdb-server \
56 tests/lcov/ovsdb-tool \
57 tests/lcov/test-aes128 \
58 tests/lcov/test-classifier \
59 tests/lcov/test-csum \
60 tests/lcov/test-dhcp-client \
61 tests/lcov/test-dir_name \
62 tests/lcov/test-flows \
63 tests/lcov/test-hash \
64 tests/lcov/test-hmap \
65 tests/lcov/test-json \
66 tests/lcov/test-jsonrpc \
67 tests/lcov/test-list \
68 tests/lcov/test-lockfile \
69 tests/lcov/test-ovsdb \
70 tests/lcov/test-reconnect \
71 tests/lcov/test-sha1 \
72 tests/lcov/test-stp \
73 tests/lcov/test-timeval \
74 tests/lcov/test-type-props \
75 tests/lcov/test-uuid \
76 tests/lcov/test-vconn
77
78$(lcov_wrappers): tests/lcov-wrapper.in
79 @test -d tests/lcov || mkdir tests/lcov
80 sed -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),' \
81 -e 's,[@]wrap_program[@],$@,' \
82 $(top_srcdir)/tests/lcov-wrapper.in > $@.tmp
83 chmod +x $@.tmp
84 mv $@.tmp $@
85CLEANFILES += $(lcov_wrappers)
86EXTRA_DIST += tests/lcov-wrapper.in
1b233b95 87
7c126fbb
BP
88LCOV = lcov -b $(abs_top_builddir) -d $(abs_top_builddir) -q
89check-lcov: all tests/atconfig tests/atlocal $(TESTSUITE) $(lcov_wrappers)
90 rm -fr tests/coverage.html tests/coverage.info
91 $(LCOV) -c -i -o - > tests/coverage.info
92 $(SHELL) '$(TESTSUITE)' -C tests CHECK_LCOV=true AUTOTEST_PATH='tests/lcov:$(AUTOTEST_PATH)' $(TESTSUITEFLAGS); \
93 rc=$$?; \
94 echo "Producing coverage.html..."; \
95 cd tests && genhtml -q -o coverage.html coverage.info; \
96 exit $$rc
97\f
1b233b95
BP
98clean-local:
99 test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
100
101AUTOM4TE = autom4te
102AUTOTEST = $(AUTOM4TE) --language=autotest
103$(TESTSUITE): package.m4 $(TESTSUITE_AT)
104 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
105 mv $@.tmp $@
106
107# The `:;' works around a Bash 3.2 bug when the output is not writeable.
108$(srcdir)/package.m4: $(top_srcdir)/configure.ac
109 :;{ \
110 echo '# Signature of the current package.' && \
f99cd6ee
BP
111 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
112 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
113 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
114 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
115 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
1b233b95
BP
116 } >'$(srcdir)/package.m4'
117
d918d9d1
BP
118noinst_PROGRAMS += tests/test-aes128
119tests_test_aes128_SOURCES = tests/test-aes128.c
120tests_test_aes128_LDADD = lib/libopenvswitch.a
121
064af421
BP
122noinst_PROGRAMS += tests/test-classifier
123tests_test_classifier_SOURCES = tests/test-classifier.c
124tests_test_classifier_LDADD = lib/libopenvswitch.a
125
21effc03
BP
126noinst_PROGRAMS += tests/test-csum
127tests_test_csum_SOURCES = tests/test-csum.c
128tests_test_csum_LDADD = lib/libopenvswitch.a
129
29d4af60
BP
130noinst_PROGRAMS += tests/test-dir_name
131tests_test_dir_name_SOURCES = tests/test-dir_name.c
132tests_test_dir_name_LDADD = lib/libopenvswitch.a
133
064af421
BP
134noinst_PROGRAMS += tests/test-flows
135tests_test_flows_SOURCES = tests/test-flows.c
136tests_test_flows_LDADD = lib/libopenvswitch.a
1b233b95 137dist_check_SCRIPTS = tests/flowgen.pl
064af421 138
064af421
BP
139noinst_PROGRAMS += tests/test-hash
140tests_test_hash_SOURCES = tests/test-hash.c
141tests_test_hash_LDADD = lib/libopenvswitch.a
142
064af421
BP
143noinst_PROGRAMS += tests/test-hmap
144tests_test_hmap_SOURCES = tests/test-hmap.c
145tests_test_hmap_LDADD = lib/libopenvswitch.a
146
f38b84ea
BP
147noinst_PROGRAMS += tests/test-json
148tests_test_json_SOURCES = tests/test-json.c
149tests_test_json_LDADD = lib/libopenvswitch.a
150
f2129093
BP
151noinst_PROGRAMS += tests/test-jsonrpc
152tests_test_jsonrpc_SOURCES = tests/test-jsonrpc.c
9467fe62 153tests_test_jsonrpc_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
f2129093 154
064af421
BP
155noinst_PROGRAMS += tests/test-list
156tests_test_list_SOURCES = tests/test-list.c
157tests_test_list_LDADD = lib/libopenvswitch.a
158
ac718c9d
BP
159noinst_PROGRAMS += tests/test-lockfile
160tests_test_lockfile_SOURCES = tests/test-lockfile.c
161tests_test_lockfile_LDADD = lib/libopenvswitch.a
162
f85f8ebb 163noinst_PROGRAMS += tests/test-ovsdb
00732bf5
BP
164tests_test_ovsdb_SOURCES = \
165 tests/test-ovsdb.c \
166 tests/idltest.c \
167 tests/idltest.h
168EXTRA_DIST += tests/uuidfilt.pl
55709289 169tests_test_ovsdb_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS)
00732bf5
BP
170
171# idltest schema and IDL
172OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
173IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
174EXTRA_DIST += $(IDLTEST_IDL_FILES)
175tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
176 $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp
177 mv $@.tmp $@
178
b0fc010a 179tests/idltest.c: tests/idltest.h
f85f8ebb 180
3ed497fc
BP
181noinst_PROGRAMS += tests/test-reconnect
182tests_test_reconnect_SOURCES = tests/test-reconnect.c
183tests_test_reconnect_LDADD = lib/libopenvswitch.a
184
d138cd2c
BP
185noinst_PROGRAMS += tests/test-sha1
186tests_test_sha1_SOURCES = tests/test-sha1.c
187tests_test_sha1_LDADD = lib/libopenvswitch.a
188
e7cfedd6
BP
189noinst_PROGRAMS += tests/test-timeval
190tests_test_timeval_SOURCES = tests/test-timeval.c
191tests_test_timeval_LDADD = lib/libopenvswitch.a
192
064af421
BP
193noinst_PROGRAMS += tests/test-type-props
194tests_test_type_props_SOURCES = tests/test-type-props.c
195
196noinst_PROGRAMS += tests/test-dhcp-client
197tests_test_dhcp_client_SOURCES = tests/test-dhcp-client.c
250382a8 198tests_test_dhcp_client_LDADD = lib/libopenvswitch.a
064af421 199
064af421 200noinst_PROGRAMS += tests/test-stp
064af421
BP
201tests_test_stp_SOURCES = tests/test-stp.c
202tests_test_stp_LDADD = lib/libopenvswitch.a
1b233b95 203
d918d9d1
BP
204noinst_PROGRAMS += tests/test-uuid
205tests_test_uuid_SOURCES = tests/test-uuid.c
206tests_test_uuid_LDADD = lib/libopenvswitch.a
207
48d973e3
BP
208noinst_PROGRAMS += tests/test-vconn
209tests_test_vconn_SOURCES = tests/test-vconn.c
210tests_test_vconn_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
4c4d10b1
BP
211EXTRA_DIST += \
212 tests/testpki-cacert.pem \
213 tests/testpki-cert.pem \
80d326ad 214 tests/testpki-cert2.pem \
4c4d10b1 215 tests/testpki-privkey.pem \
80d326ad
BP
216 tests/testpki-privkey2.pem \
217 tests/testpki-req.pem \
218 tests/testpki-req2.pem