4 export abs_top_srcdir=@abs_top_srcdir@
5 export builddir=@builddir@
7 TESTSCRIPTS = src/test/test_zero_length_keys.sh
10 TESTSCRIPTS += src/test/test_ntor.sh src/test/test_bt.sh
13 TESTS += src/test/test src/test/test-slow src/test/test-memwipe \
14 src/test/test_workqueue src/test/test_keygen.sh $(TESTSCRIPTS)
16 # These flavors are run using automake's test-driver and test-network.sh
17 TEST_CHUTNEY_FLAVORS = basic-min bridges-min hs-min bridges+hs
18 # only run if we can ping6 ::1 (localhost)
19 TEST_CHUTNEY_FLAVORS_IPV6 = bridges+ipv6-min ipv6-exit-min
20 # only run if we can find a stable (or simply another) version of tor
21 TEST_CHUTNEY_FLAVORS_MIXED = mixed
23 ### This is a lovely feature, but it requires automake >= 1.12, and Tor
24 ### doesn't require that yet.
26 # TEST_EXTENSIONS = .sh
27 # SH_LOG_COMPILER = $(SHELL)
29 noinst_PROGRAMS+= src/test/bench
34 src/test/test-memwipe \
36 src/test/test_workqueue
39 src_test_AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
40 -DLOCALSTATEDIR="\"$(localstatedir)\"" \
41 -DBINDIR="\"$(bindir)\"" \
42 -I"$(top_srcdir)/src/or" -I"$(top_srcdir)/src/ext" \
43 -I"$(top_srcdir)/src/trunnel" \
44 -I"$(top_srcdir)/src/ext/trunnel" \
47 # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
48 # This seems to matter nowhere but on Windows, but I assure you that it
49 # matters a lot there, and is quite hard to debug if you forget to do it.
51 src_test_test_SOURCES = \
52 src/test/log_test_helpers.c \
53 src/test/rend_test_helpers.c \
55 src/test/test_accounting.c \
56 src/test/test_addr.c \
57 src/test/test_address.c \
58 src/test/test_buffers.c \
59 src/test/test_cell_formats.c \
60 src/test/test_cell_queue.c \
61 src/test/test_channel.c \
62 src/test/test_channeltls.c \
63 src/test/test_checkdir.c \
64 src/test/test_circuitlist.c \
65 src/test/test_circuitmux.c \
66 src/test/test_compat_libevent.c \
67 src/test/test_config.c \
68 src/test/test_connection.c \
69 src/test/test_containers.c \
70 src/test/test_controller.c \
71 src/test/test_controller_events.c \
72 src/test/test_crypto.c \
73 src/test/test_data.c \
75 src/test/test_dir_handle_get.c \
76 src/test/test_entryconn.c \
77 src/test/test_entrynodes.c \
78 src/test/test_guardfraction.c \
79 src/test/test_extorport.c \
81 src/test/test_introduce.c \
82 src/test/test_keypin.c \
83 src/test/test_link_handshake.c \
84 src/test/test_logging.c \
85 src/test/test_microdesc.c \
86 src/test/test_nodelist.c \
88 src/test/test_options.c \
89 src/test/test_policy.c \
90 src/test/test_procmon.c \
92 src/test/test_relay.c \
93 src/test/test_relaycell.c \
94 src/test/test_rendcache.c \
95 src/test/test_replay.c \
96 src/test/test_routerkeys.c \
97 src/test/test_routerlist.c \
98 src/test/test_routerset.c \
99 src/test/test_scheduler.c \
100 src/test/test_socks.c \
101 src/test/test_status.c \
102 src/test/test_threads.c \
103 src/test/test_tortls.c \
104 src/test/test_util.c \
105 src/test/test_util_format.c \
106 src/test/test_util_process.c \
107 src/test/test_helpers.c \
108 src/test/test_dns.c \
109 src/test/testing_common.c \
112 src_test_test_slow_SOURCES = \
113 src/test/test_slow.c \
114 src/test/test_crypto_slow.c \
115 src/test/test_util_slow.c \
116 src/test/testing_common.c \
119 src_test_test_memwipe_SOURCES = \
120 src/test/test-memwipe.c
123 src_test_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
125 src_test_test_CPPFLAGS= $(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS)
127 src_test_bench_SOURCES = \
130 src_test_test_workqueue_SOURCES = \
131 src/test/test_workqueue.c
132 src_test_test_workqueue_CPPFLAGS= $(src_test_AM_CPPFLAGS)
133 src_test_test_workqueue_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
135 src_test_test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
136 @TOR_LDFLAGS_libevent@
137 src_test_test_LDADD = src/or/libtor-testing.a src/common/libor-testing.a \
138 src/common/libor-crypto-testing.a $(LIBDONNA) src/common/libor.a \
139 src/common/libor-event-testing.a src/trunnel/libor-trunnel-testing.a \
140 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
141 @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ \
144 src_test_test_slow_CPPFLAGS = $(src_test_test_CPPFLAGS)
145 src_test_test_slow_CFLAGS = $(src_test_test_CFLAGS)
146 src_test_test_slow_LDADD = $(src_test_test_LDADD)
147 src_test_test_slow_LDFLAGS = $(src_test_test_LDFLAGS)
149 src_test_test_memwipe_CPPFLAGS = $(src_test_test_CPPFLAGS)
150 src_test_test_memwipe_CFLAGS = $(src_test_test_CFLAGS)
151 src_test_test_memwipe_LDADD = $(src_test_test_LDADD)
152 src_test_test_memwipe_LDFLAGS = $(src_test_test_LDFLAGS)
154 src_test_bench_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
155 @TOR_LDFLAGS_libevent@
156 src_test_bench_LDADD = src/or/libtor.a src/common/libor.a \
157 src/common/libor-crypto.a $(LIBDONNA) \
158 src/common/libor-event.a src/trunnel/libor-trunnel.a \
159 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
160 @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ \
163 src_test_test_workqueue_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
164 @TOR_LDFLAGS_libevent@
165 src_test_test_workqueue_LDADD = src/or/libtor-testing.a \
166 src/common/libor-testing.a \
167 src/common/libor-crypto-testing.a $(LIBDONNA) \
168 src/common/libor-event-testing.a \
169 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
170 @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
173 src/test/fakechans.h \
174 src/test/log_test_helpers.h \
175 src/test/rend_test_helpers.h \
177 src/test/test_helpers.h \
178 src/test/test_descriptors.inc \
179 src/test/example_extrainfo.inc \
180 src/test/failing_routerdescs.inc \
181 src/test/ed25519_vectors.inc \
182 src/test/test_descriptors.inc \
183 src/test/vote_descriptors.inc
185 noinst_PROGRAMS+= src/test/test-ntor-cl
186 src_test_test_ntor_cl_SOURCES = src/test/test_ntor_cl.c
187 src_test_test_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
188 src_test_test_ntor_cl_LDADD = src/or/libtor.a src/common/libor.a \
189 src/common/libor-crypto.a $(LIBDONNA) \
190 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
191 @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
192 src_test_test_ntor_cl_AM_CPPFLAGS = \
193 -I"$(top_srcdir)/src/or"
195 noinst_PROGRAMS += src/test/test-bt-cl
196 src_test_test_bt_cl_SOURCES = src/test/test_bt_cl.c
197 src_test_test_bt_cl_LDADD = src/common/libor-testing.a \
199 @TOR_LIB_WS32@ @TOR_LIB_GDI@
200 src_test_test_bt_cl_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
201 src_test_test_bt_cl_CPPFLAGS= $(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS)
204 src/test/bt_test.py \
205 src/test/ntor_ref.py \
206 src/test/slownacl_curve25519.py \
207 src/test/zero_length_keys.sh \
208 src/test/test_keygen.sh \
209 src/test/test_zero_length_keys.sh \
210 src/test/test_ntor.sh src/test/test_bt.sh \
211 src/test/test-network.sh