1 # When the day comes that Tor requires Automake >= 1.12 change
2 # TESTS_ENVIRONMENT to AM_TESTS_ENVIRONMENT because the former is reserved for
3 # users while the later is reserved for developers.
5 export PYTHON="$(PYTHON)"; \
6 export SHELL="$(SHELL)"; \
7 export abs_top_srcdir="$(abs_top_srcdir)"; \
8 export builddir="$(builddir)"; \
9 export TESTING_TOR_BINARY="$(TESTING_TOR_BINARY)";
11 TESTSCRIPTS = src/test/test_zero_length_keys.sh \
12 src/test/test_switch_id.sh
15 TESTSCRIPTS += src/test/test_ntor.sh src/test/test_bt.sh
18 TESTS += src/test/test src/test/test-slow src/test/test-memwipe \
19 src/test/test_workqueue src/test/test_keygen.sh \
22 # These flavors are run using automake's test-driver and test-network.sh
23 TEST_CHUTNEY_FLAVORS = basic-min bridges-min hs-min bridges+hs
24 # only run if we can ping6 ::1 (localhost)
25 TEST_CHUTNEY_FLAVORS_IPV6 = bridges+ipv6-min ipv6-exit-min
26 # only run if we can find a stable (or simply another) version of tor
27 TEST_CHUTNEY_FLAVORS_MIXED = mixed
29 ### This is a lovely feature, but it requires automake >= 1.12, and Tor
30 ### doesn't require that yet.
32 # TEST_EXTENSIONS = .sh
33 # SH_LOG_COMPILER = $(SHELL)
35 noinst_PROGRAMS+= src/test/bench
40 src/test/test-memwipe \
42 src/test/test_workqueue \
43 src/test/test-switch-id
46 src_test_AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
47 -DLOCALSTATEDIR="\"$(localstatedir)\"" \
48 -DBINDIR="\"$(bindir)\"" \
49 -I"$(top_srcdir)/src/or" -I"$(top_srcdir)/src/ext" \
50 -I"$(top_srcdir)/src/trunnel" \
51 -I"$(top_srcdir)/src/ext/trunnel" \
54 # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
55 # This seems to matter nowhere but on Windows, but I assure you that it
56 # matters a lot there, and is quite hard to debug if you forget to do it.
58 src_test_test_SOURCES = \
59 src/test/log_test_helpers.c \
60 src/test/rend_test_helpers.c \
62 src/test/test_accounting.c \
63 src/test/test_addr.c \
64 src/test/test_address.c \
65 src/test/test_buffers.c \
66 src/test/test_cell_formats.c \
67 src/test/test_cell_queue.c \
68 src/test/test_channel.c \
69 src/test/test_channeltls.c \
70 src/test/test_checkdir.c \
71 src/test/test_circuitlist.c \
72 src/test/test_circuitmux.c \
73 src/test/test_compat_libevent.c \
74 src/test/test_config.c \
75 src/test/test_connection.c \
76 src/test/test_containers.c \
77 src/test/test_controller.c \
78 src/test/test_controller_events.c \
79 src/test/test_crypto.c \
80 src/test/test_data.c \
82 src/test/test_dir_common.c \
83 src/test/test_dir_handle_get.c \
84 src/test/test_entryconn.c \
85 src/test/test_entrynodes.c \
86 src/test/test_guardfraction.c \
87 src/test/test_extorport.c \
89 src/test/test_introduce.c \
90 src/test/test_keypin.c \
91 src/test/test_link_handshake.c \
92 src/test/test_logging.c \
93 src/test/test_microdesc.c \
94 src/test/test_nodelist.c \
96 src/test/test_options.c \
97 src/test/test_policy.c \
98 src/test/test_procmon.c \
100 src/test/test_relay.c \
101 src/test/test_relaycell.c \
102 src/test/test_rendcache.c \
103 src/test/test_replay.c \
104 src/test/test_routerkeys.c \
105 src/test/test_routerlist.c \
106 src/test/test_routerset.c \
107 src/test/test_scheduler.c \
108 src/test/test_socks.c \
109 src/test/test_status.c \
110 src/test/test_threads.c \
111 src/test/test_tortls.c \
112 src/test/test_util.c \
113 src/test/test_util_format.c \
114 src/test/test_util_process.c \
115 src/test/test_helpers.c \
116 src/test/test_dns.c \
117 src/test/testing_common.c \
120 src_test_test_slow_SOURCES = \
121 src/test/test_slow.c \
122 src/test/test_crypto_slow.c \
123 src/test/test_util_slow.c \
124 src/test/testing_common.c \
127 src_test_test_memwipe_SOURCES = \
128 src/test/test-memwipe.c
131 src_test_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
133 src_test_test_CPPFLAGS= $(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS)
135 src_test_bench_SOURCES = \
138 src_test_test_workqueue_SOURCES = \
139 src/test/test_workqueue.c
140 src_test_test_workqueue_CPPFLAGS= $(src_test_AM_CPPFLAGS)
141 src_test_test_workqueue_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
143 src_test_test_switch_id_SOURCES = \
144 src/test/test_switch_id.c
145 src_test_test_switch_id_CPPFLAGS= $(src_test_AM_CPPFLAGS)
146 src_test_test_switch_id_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
147 src_test_test_switch_id_LDFLAGS = @TOR_LDFLAGS_zlib@
148 src_test_test_switch_id_LDADD = \
149 src/common/libor-testing.a \
150 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@
152 src_test_test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
153 @TOR_LDFLAGS_libevent@
154 src_test_test_LDADD = src/or/libtor-testing.a \
155 src/common/libor-crypto-testing.a \
158 src/common/libor-testing.a \
159 src/common/libor-event-testing.a \
160 src/trunnel/libor-trunnel-testing.a \
161 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
162 @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ \
165 src_test_test_slow_CPPFLAGS = $(src_test_test_CPPFLAGS)
166 src_test_test_slow_CFLAGS = $(src_test_test_CFLAGS)
167 src_test_test_slow_LDADD = $(src_test_test_LDADD)
168 src_test_test_slow_LDFLAGS = $(src_test_test_LDFLAGS)
170 src_test_test_memwipe_CPPFLAGS = $(src_test_test_CPPFLAGS)
171 src_test_test_memwipe_CFLAGS = $(src_test_test_CFLAGS)
172 src_test_test_memwipe_LDADD = $(src_test_test_LDADD)
173 src_test_test_memwipe_LDFLAGS = $(src_test_test_LDFLAGS)
175 src_test_bench_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
176 @TOR_LDFLAGS_libevent@
177 src_test_bench_LDADD = src/or/libtor.a src/common/libor.a \
178 src/common/libor-crypto.a $(LIBKECCAK_TINY) $(LIBDONNA) \
179 src/common/libor-event.a src/trunnel/libor-trunnel.a \
180 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
181 @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ \
184 src_test_test_workqueue_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
185 @TOR_LDFLAGS_libevent@
186 src_test_test_workqueue_LDADD = src/or/libtor-testing.a \
187 src/common/libor-testing.a \
188 src/common/libor-crypto-testing.a $(LIBKECCAK_TINY) $(LIBDONNA) \
189 src/common/libor-event-testing.a \
190 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
191 @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
194 src/test/fakechans.h \
195 src/test/log_test_helpers.h \
196 src/test/rend_test_helpers.h \
198 src/test/test_helpers.h \
199 src/test/test_dir_common.h \
200 src/test/test_descriptors.inc \
201 src/test/example_extrainfo.inc \
202 src/test/failing_routerdescs.inc \
203 src/test/ed25519_vectors.inc \
204 src/test/test_descriptors.inc \
205 src/test/vote_descriptors.inc
207 noinst_PROGRAMS+= src/test/test-ntor-cl
208 src_test_test_ntor_cl_SOURCES = src/test/test_ntor_cl.c
209 src_test_test_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
210 src_test_test_ntor_cl_LDADD = src/or/libtor.a src/common/libor.a \
211 src/common/libor-crypto.a $(LIBKECCAK_TINY) $(LIBDONNA) \
212 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
213 @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
214 src_test_test_ntor_cl_AM_CPPFLAGS = \
215 -I"$(top_srcdir)/src/or"
217 noinst_PROGRAMS += src/test/test-bt-cl
218 src_test_test_bt_cl_SOURCES = src/test/test_bt_cl.c
219 src_test_test_bt_cl_LDADD = src/common/libor-testing.a \
221 @TOR_LIB_WS32@ @TOR_LIB_GDI@
222 src_test_test_bt_cl_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
223 src_test_test_bt_cl_CPPFLAGS= $(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS)
226 src/test/bt_test.py \
227 src/test/ntor_ref.py \
228 src/test/slownacl_curve25519.py \
229 src/test/zero_length_keys.sh \
230 src/test/test_keygen.sh \
231 src/test/test_zero_length_keys.sh \
232 src/test/test_ntor.sh src/test/test_bt.sh \
233 src/test/test-network.sh \
234 src/test/test_switch_id.sh