2015-12-14 21:03:10 +01:00
|
|
|
# When the day comes that Tor requires Automake >= 1.12 change
|
|
|
|
# TESTS_ENVIRONMENT to AM_TESTS_ENVIRONMENT because the former is reserved for
|
|
|
|
# users while the later is reserved for developers.
|
|
|
|
TESTS_ENVIRONMENT = \
|
2015-12-11 23:51:17 +01:00
|
|
|
export PYTHON="$(PYTHON)"; \
|
|
|
|
export SHELL="$(SHELL)"; \
|
|
|
|
export abs_top_srcdir="$(abs_top_srcdir)"; \
|
2017-05-02 04:21:42 +02:00
|
|
|
export abs_top_builddir="$(abs_top_builddir)"; \
|
2015-12-11 23:51:17 +01:00
|
|
|
export builddir="$(builddir)"; \
|
2017-04-29 13:17:22 +02:00
|
|
|
export TESTING_TOR_BINARY="$(TESTING_TOR_BINARY)"; \
|
2017-05-02 05:06:45 +02:00
|
|
|
export CARGO="$(CARGO)"; \
|
2018-06-13 18:21:25 +02:00
|
|
|
export EXTRA_CARGO_OPTIONS="$(EXTRA_CARGO_OPTIONS)"; \
|
2018-06-18 23:08:23 +02:00
|
|
|
export CARGO_ONLINE="$(CARGO_ONLINE)"; \
|
2018-07-01 15:37:28 +02:00
|
|
|
export CCLD="$(CCLD)"; \
|
2018-10-29 18:00:23 +01:00
|
|
|
export RUSTFLAGS="-C linker=`echo '$(CC)' | cut -d' ' -f 1` $(RUST_LINKER_OPTIONS)";
|
2015-09-24 21:07:39 +02:00
|
|
|
|
2016-12-14 21:57:22 +01:00
|
|
|
TESTSCRIPTS = \
|
|
|
|
src/test/fuzz_static_testcases.sh \
|
|
|
|
src/test/test_zero_length_keys.sh \
|
2016-06-08 23:29:06 +02:00
|
|
|
src/test/test_workqueue_cancel.sh \
|
|
|
|
src/test/test_workqueue_efd.sh \
|
|
|
|
src/test/test_workqueue_efd2.sh \
|
|
|
|
src/test/test_workqueue_pipe.sh \
|
|
|
|
src/test/test_workqueue_pipe2.sh \
|
|
|
|
src/test/test_workqueue_socketpair.sh \
|
2015-11-06 21:35:15 +01:00
|
|
|
src/test/test_switch_id.sh
|
2015-03-05 09:03:06 +01:00
|
|
|
|
2017-04-29 13:17:22 +02:00
|
|
|
if USE_RUST
|
|
|
|
TESTSCRIPTS += \
|
|
|
|
src/test/test_rust.sh
|
|
|
|
endif
|
|
|
|
|
2015-03-05 10:43:12 +01:00
|
|
|
if USEPYTHON
|
2017-03-14 14:06:36 +01:00
|
|
|
TESTSCRIPTS += src/test/test_ntor.sh src/test/test_hs_ntor.sh src/test/test_bt.sh
|
2018-05-17 16:01:52 +02:00
|
|
|
TESTSCRIPTS += src/test/test_rebind.sh
|
2015-03-05 10:43:12 +01:00
|
|
|
endif
|
|
|
|
|
2015-04-24 14:41:53 +02:00
|
|
|
TESTS += src/test/test src/test/test-slow src/test/test-memwipe \
|
2016-06-08 23:29:06 +02:00
|
|
|
src/test/test_workqueue \
|
|
|
|
src/test/test_keygen.sh \
|
2017-07-14 03:25:01 +02:00
|
|
|
src/test/test_key_expiration.sh \
|
2016-04-13 21:30:59 +02:00
|
|
|
src/test/test-timers \
|
2015-11-06 21:35:15 +01:00
|
|
|
$(TESTSCRIPTS)
|
2015-04-24 14:41:53 +02:00
|
|
|
|
2015-09-08 14:27:59 +02:00
|
|
|
# These flavors are run using automake's test-driver and test-network.sh
|
2017-09-12 09:08:28 +02:00
|
|
|
TEST_CHUTNEY_FLAVORS = basic-min bridges-min hs-v2-min hs-v3-min \
|
|
|
|
single-onion-v23
|
2015-09-08 14:27:59 +02:00
|
|
|
# only run if we can ping6 ::1 (localhost)
|
2017-10-26 07:51:04 +02:00
|
|
|
# IPv6-only v3 single onion services don't work yet, so we don't test the
|
2017-11-01 07:13:07 +01:00
|
|
|
# single-onion-v23-ipv6-md flavor
|
|
|
|
TEST_CHUTNEY_FLAVORS_IPV6 = bridges+ipv6-min ipv6-exit-min hs-v23-ipv6-md \
|
|
|
|
single-onion-ipv6-md
|
2015-09-08 14:27:59 +02:00
|
|
|
# only run if we can find a stable (or simply another) version of tor
|
2018-08-27 15:06:04 +02:00
|
|
|
TEST_CHUTNEY_FLAVORS_MIXED = mixed+hs-v2
|
2015-09-08 14:27:59 +02:00
|
|
|
|
2015-04-24 14:41:53 +02:00
|
|
|
### This is a lovely feature, but it requires automake >= 1.12, and Tor
|
2015-09-24 21:07:39 +02:00
|
|
|
### doesn't require that yet.
|
2015-04-24 14:41:53 +02:00
|
|
|
###
|
|
|
|
# TEST_EXTENSIONS = .sh
|
|
|
|
# SH_LOG_COMPILER = $(SHELL)
|
|
|
|
|
2013-06-06 20:56:05 +02:00
|
|
|
noinst_PROGRAMS+= src/test/bench
|
|
|
|
if UNITTESTS_ENABLED
|
2015-01-23 17:15:53 +01:00
|
|
|
noinst_PROGRAMS+= \
|
|
|
|
src/test/test \
|
|
|
|
src/test/test-slow \
|
2015-03-19 20:28:22 +01:00
|
|
|
src/test/test-memwipe \
|
2018-11-26 02:18:04 +01:00
|
|
|
src/test/test-process \
|
2015-11-06 21:35:15 +01:00
|
|
|
src/test/test_workqueue \
|
2016-04-13 21:30:59 +02:00
|
|
|
src/test/test-switch-id \
|
|
|
|
src/test/test-timers
|
2013-06-06 20:56:05 +02:00
|
|
|
endif
|
2012-08-02 15:31:43 +02:00
|
|
|
|
|
|
|
src_test_AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
|
2018-07-01 15:37:28 +02:00
|
|
|
-DLOCALSTATEDIR="\"$(localstatedir)\"" \
|
|
|
|
-DBINDIR="\"$(bindir)\"" \
|
2018-06-20 15:25:50 +02:00
|
|
|
-DTOR_UNIT_TESTS \
|
|
|
|
$(AM_CPPFLAGS)
|
2012-08-02 15:31:43 +02:00
|
|
|
|
|
|
|
# -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
|
|
|
|
# This seems to matter nowhere but on Windows, but I assure you that it
|
|
|
|
# matters a lot there, and is quite hard to debug if you forget to do it.
|
|
|
|
|
2018-06-02 11:53:04 +02:00
|
|
|
src_test_test_SOURCES =
|
|
|
|
|
|
|
|
if UNITTESTS_ENABLED
|
|
|
|
src_test_test_SOURCES += \
|
2015-09-15 17:20:44 +02:00
|
|
|
src/test/log_test_helpers.c \
|
2017-04-07 16:28:57 +02:00
|
|
|
src/test/hs_test_helpers.c \
|
2015-09-15 16:21:50 +02:00
|
|
|
src/test/rend_test_helpers.c \
|
2012-08-02 15:31:43 +02:00
|
|
|
src/test/test.c \
|
2015-01-23 15:36:00 +01:00
|
|
|
src/test/test_accounting.c \
|
2012-08-02 15:31:43 +02:00
|
|
|
src/test/test_addr.c \
|
2015-01-23 16:13:37 +01:00
|
|
|
src/test/test_address.c \
|
2018-02-08 20:35:22 +01:00
|
|
|
src/test/test_address_set.c \
|
2018-03-05 21:43:26 +01:00
|
|
|
src/test/test_bridges.c \
|
2013-07-17 23:31:27 +02:00
|
|
|
src/test/test_buffers.c \
|
2018-04-10 17:23:14 +02:00
|
|
|
src/test/test_bwmgt.c \
|
2012-10-22 17:28:37 +02:00
|
|
|
src/test/test_cell_formats.c \
|
2015-01-23 15:36:00 +01:00
|
|
|
src/test/test_cell_queue.c \
|
2013-12-13 15:34:46 +01:00
|
|
|
src/test/test_channel.c \
|
2016-09-06 20:35:53 +02:00
|
|
|
src/test/test_channelpadding.c \
|
2014-01-23 01:51:44 +01:00
|
|
|
src/test/test_channeltls.c \
|
2015-01-23 15:36:00 +01:00
|
|
|
src/test/test_checkdir.c \
|
2013-07-10 21:07:32 +02:00
|
|
|
src/test/test_circuitlist.c \
|
2013-07-19 16:17:00 +02:00
|
|
|
src/test/test_circuitmux.c \
|
2017-03-28 23:34:54 +02:00
|
|
|
src/test/test_circuitbuild.c \
|
2016-10-14 14:00:35 +02:00
|
|
|
src/test/test_circuituse.c \
|
2017-09-20 22:24:59 +02:00
|
|
|
src/test/test_circuitstats.c \
|
2015-09-15 17:20:44 +02:00
|
|
|
src/test/test_compat_libevent.c \
|
2014-09-23 18:22:36 +02:00
|
|
|
src/test/test_config.c \
|
2015-12-07 07:40:56 +01:00
|
|
|
src/test/test_connection.c \
|
2017-04-04 19:51:34 +02:00
|
|
|
src/test/test_conscache.c \
|
2017-03-07 15:58:30 +01:00
|
|
|
src/test/test_consdiff.c \
|
2017-04-14 18:35:02 +02:00
|
|
|
src/test/test_consdiffmgr.c \
|
2012-08-02 15:31:43 +02:00
|
|
|
src/test/test_containers.c \
|
2015-04-25 10:23:15 +02:00
|
|
|
src/test/test_controller.c \
|
2013-05-31 15:51:25 +02:00
|
|
|
src/test/test_controller_events.c \
|
2012-08-02 15:31:43 +02:00
|
|
|
src/test/test_crypto.c \
|
2018-05-10 14:46:36 +02:00
|
|
|
src/test/test_crypto_ope.c \
|
2012-08-02 15:31:43 +02:00
|
|
|
src/test/test_data.c \
|
|
|
|
src/test/test_dir.c \
|
2015-01-26 20:49:48 +01:00
|
|
|
src/test/test_dir_common.c \
|
2015-09-07 19:22:33 +02:00
|
|
|
src/test/test_dir_handle_get.c \
|
2018-01-30 15:33:12 +01:00
|
|
|
src/test/test_dos.c \
|
2015-01-13 03:08:43 +01:00
|
|
|
src/test/test_entryconn.c \
|
2014-06-24 20:22:52 +02:00
|
|
|
src/test/test_entrynodes.c \
|
2018-03-15 14:47:01 +01:00
|
|
|
src/test/test_geoip.c \
|
2015-01-29 16:10:28 +01:00
|
|
|
src/test/test_guardfraction.c \
|
2013-07-18 21:51:29 +02:00
|
|
|
src/test/test_extorport.c \
|
2014-09-23 18:22:36 +02:00
|
|
|
src/test/test_hs.c \
|
2017-04-20 17:20:02 +02:00
|
|
|
src/test/test_hs_common.c \
|
2017-01-13 17:20:31 +01:00
|
|
|
src/test/test_hs_config.c \
|
2017-04-20 15:58:21 +02:00
|
|
|
src/test/test_hs_cell.c \
|
2017-04-20 16:04:28 +02:00
|
|
|
src/test/test_hs_ntor.c \
|
2016-09-05 18:03:30 +02:00
|
|
|
src/test/test_hs_service.c \
|
2017-05-02 15:36:59 +02:00
|
|
|
src/test/test_hs_client.c \
|
2016-09-05 18:03:30 +02:00
|
|
|
src/test/test_hs_intropoint.c \
|
2017-11-20 18:10:07 +01:00
|
|
|
src/test/test_hs_control.c \
|
2016-02-12 00:34:29 +01:00
|
|
|
src/test/test_handles.c \
|
2016-08-10 22:40:06 +02:00
|
|
|
src/test/test_hs_cache.c \
|
2016-03-15 19:18:03 +01:00
|
|
|
src/test/test_hs_descriptor.c \
|
2012-08-02 15:31:43 +02:00
|
|
|
src/test/test_introduce.c \
|
2014-10-02 21:34:23 +02:00
|
|
|
src/test/test_keypin.c \
|
2014-10-08 21:39:34 +02:00
|
|
|
src/test/test_link_handshake.c \
|
2013-07-29 19:30:49 +02:00
|
|
|
src/test/test_logging.c \
|
2018-05-03 16:53:19 +02:00
|
|
|
src/test/test_mainloop.c \
|
2012-08-02 15:31:43 +02:00
|
|
|
src/test/test_microdesc.c \
|
2014-09-23 18:22:36 +02:00
|
|
|
src/test/test_nodelist.c \
|
2014-01-13 20:15:33 +01:00
|
|
|
src/test/test_oom.c \
|
2016-07-02 06:39:45 +02:00
|
|
|
src/test/test_oos.c \
|
2013-07-18 20:38:31 +02:00
|
|
|
src/test/test_options.c \
|
2018-07-19 21:47:48 +02:00
|
|
|
src/test/test_pem.c \
|
2018-04-18 20:50:07 +02:00
|
|
|
src/test/test_periodic_event.c \
|
2015-01-23 15:36:00 +01:00
|
|
|
src/test/test_policy.c \
|
2018-11-22 04:25:11 +01:00
|
|
|
src/test/test_process.c \
|
2015-09-15 17:56:56 +02:00
|
|
|
src/test/test_procmon.c \
|
2017-09-28 03:45:55 +02:00
|
|
|
src/test/test_proto_http.c \
|
2017-09-27 15:09:00 +02:00
|
|
|
src/test/test_proto_misc.c \
|
2016-08-10 01:11:47 +02:00
|
|
|
src/test/test_protover.c \
|
2012-08-02 15:31:43 +02:00
|
|
|
src/test/test_pt.c \
|
2014-01-21 11:54:35 +01:00
|
|
|
src/test/test_relay.c \
|
2015-01-23 15:36:00 +01:00
|
|
|
src/test/test_relaycell.c \
|
2018-03-17 16:23:05 +01:00
|
|
|
src/test/test_relaycrypt.c \
|
2015-09-15 16:21:50 +02:00
|
|
|
src/test/test_rendcache.c \
|
2012-08-02 15:31:43 +02:00
|
|
|
src/test/test_replay.c \
|
2017-10-23 21:44:06 +02:00
|
|
|
src/test/test_router.c \
|
2014-02-26 19:42:21 +01:00
|
|
|
src/test/test_routerkeys.c \
|
2014-09-23 18:22:36 +02:00
|
|
|
src/test/test_routerlist.c \
|
2015-01-23 15:36:00 +01:00
|
|
|
src/test/test_routerset.c \
|
2014-01-24 05:55:34 +01:00
|
|
|
src/test/test_scheduler.c \
|
2016-05-03 17:42:50 +02:00
|
|
|
src/test/test_shared_random.c \
|
2013-07-17 23:31:27 +02:00
|
|
|
src/test/test_socks.c \
|
2015-01-23 15:36:00 +01:00
|
|
|
src/test/test_status.c \
|
2017-03-10 19:22:01 +01:00
|
|
|
src/test/test_storagedir.c \
|
2013-09-25 20:50:01 +02:00
|
|
|
src/test/test_threads.c \
|
2015-09-15 17:09:18 +02:00
|
|
|
src/test/test_tortls.c \
|
2012-08-02 15:31:43 +02:00
|
|
|
src/test/test_util.c \
|
2015-09-15 17:40:16 +02:00
|
|
|
src/test/test_util_format.c \
|
2015-09-15 17:37:25 +02:00
|
|
|
src/test/test_util_process.c \
|
2018-05-07 02:42:18 +02:00
|
|
|
src/test/test_voting_schedule.c \
|
2018-08-23 20:03:00 +02:00
|
|
|
src/test/test_x509.c \
|
2015-01-29 16:09:53 +01:00
|
|
|
src/test/test_helpers.c \
|
2015-09-07 19:22:33 +02:00
|
|
|
src/test/test_dns.c \
|
2018-10-11 14:22:12 +02:00
|
|
|
src/test/test_parsecommon.c \
|
2015-01-23 17:15:53 +01:00
|
|
|
src/test/testing_common.c \
|
2016-09-11 18:36:09 +02:00
|
|
|
src/test/testing_rsakeys.c \
|
2012-10-11 23:19:37 +02:00
|
|
|
src/ext/tinytest.c
|
2018-08-12 22:04:12 +02:00
|
|
|
|
|
|
|
if USE_NSS
|
|
|
|
# ...
|
|
|
|
else
|
|
|
|
src_test_test_SOURCES += \
|
2018-08-12 23:18:41 +02:00
|
|
|
src/test/test_crypto_openssl.c \
|
2018-08-12 22:04:12 +02:00
|
|
|
src/test/test_tortls_openssl.c
|
|
|
|
endif
|
|
|
|
|
2018-06-02 11:53:04 +02:00
|
|
|
endif
|
2012-08-02 15:31:43 +02:00
|
|
|
|
2018-06-02 11:53:04 +02:00
|
|
|
src_test_test_slow_SOURCES =
|
|
|
|
if UNITTESTS_ENABLED
|
|
|
|
src_test_test_slow_SOURCES += \
|
2015-01-23 17:15:53 +01:00
|
|
|
src/test/test_slow.c \
|
|
|
|
src/test/test_crypto_slow.c \
|
2018-11-26 02:18:04 +01:00
|
|
|
src/test/test_process_slow.c \
|
2015-01-23 17:15:53 +01:00
|
|
|
src/test/testing_common.c \
|
2016-09-11 18:36:09 +02:00
|
|
|
src/test/testing_rsakeys.c \
|
2015-01-23 17:15:53 +01:00
|
|
|
src/ext/tinytest.c
|
2018-06-02 11:53:04 +02:00
|
|
|
endif
|
2015-01-23 17:15:53 +01:00
|
|
|
|
2015-03-19 20:28:22 +01:00
|
|
|
src_test_test_memwipe_SOURCES = \
|
|
|
|
src/test/test-memwipe.c
|
|
|
|
|
2016-04-13 21:30:59 +02:00
|
|
|
src_test_test_timers_SOURCES = \
|
|
|
|
src/test/test-timers.c
|
2015-01-23 17:15:53 +01:00
|
|
|
|
2013-07-09 18:37:11 +02:00
|
|
|
src_test_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
|
|
|
|
|
2015-03-20 13:12:09 +01:00
|
|
|
src_test_test_CPPFLAGS= $(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS)
|
2012-08-02 15:31:43 +02:00
|
|
|
|
|
|
|
src_test_bench_SOURCES = \
|
|
|
|
src/test/bench.c
|
|
|
|
|
2013-09-25 17:36:02 +02:00
|
|
|
src_test_test_workqueue_SOURCES = \
|
|
|
|
src/test/test_workqueue.c
|
|
|
|
src_test_test_workqueue_CPPFLAGS= $(src_test_AM_CPPFLAGS)
|
|
|
|
src_test_test_workqueue_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
|
2013-09-23 07:19:16 +02:00
|
|
|
|
2015-11-06 21:35:15 +01:00
|
|
|
src_test_test_switch_id_SOURCES = \
|
|
|
|
src/test/test_switch_id.c
|
|
|
|
src_test_test_switch_id_CPPFLAGS= $(src_test_AM_CPPFLAGS)
|
|
|
|
src_test_test_switch_id_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
|
2015-12-18 10:04:06 +01:00
|
|
|
src_test_test_switch_id_LDFLAGS = @TOR_LDFLAGS_zlib@
|
2015-11-06 21:35:15 +01:00
|
|
|
src_test_test_switch_id_LDADD = \
|
2018-06-21 16:34:29 +02:00
|
|
|
$(TOR_UTIL_TESTING_LIBS) \
|
2017-08-10 10:08:41 +02:00
|
|
|
$(rust_ldadd) \
|
2017-04-18 13:56:02 +02:00
|
|
|
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
|
2018-06-27 15:09:10 +02:00
|
|
|
@TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_USERENV@ \
|
2017-08-10 10:08:41 +02:00
|
|
|
@TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
|
2015-11-06 21:35:15 +01:00
|
|
|
|
2018-07-11 18:51:36 +02:00
|
|
|
src_test_test_LDFLAGS = @TOR_LDFLAGS_zlib@ $(TOR_LDFLAGS_CRYPTLIB) \
|
2018-07-01 15:37:28 +02:00
|
|
|
@TOR_LDFLAGS_libevent@
|
2018-06-21 16:34:29 +02:00
|
|
|
src_test_test_LDADD = \
|
2018-07-01 15:37:28 +02:00
|
|
|
$(TOR_INTERNAL_TESTING_LIBS) \
|
2017-08-10 10:08:41 +02:00
|
|
|
$(rust_ldadd) \
|
2012-08-02 15:31:43 +02:00
|
|
|
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
|
2018-07-11 18:51:36 +02:00
|
|
|
$(TOR_LIBS_CRYPTLIB) @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
|
2017-08-10 10:08:41 +02:00
|
|
|
@CURVE25519_LIBS@ \
|
|
|
|
@TOR_SYSTEMD_LIBS@ @TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
|
2012-08-02 15:31:43 +02:00
|
|
|
|
2015-01-23 17:15:53 +01:00
|
|
|
src_test_test_slow_CPPFLAGS = $(src_test_test_CPPFLAGS)
|
|
|
|
src_test_test_slow_CFLAGS = $(src_test_test_CFLAGS)
|
|
|
|
src_test_test_slow_LDADD = $(src_test_test_LDADD)
|
|
|
|
src_test_test_slow_LDFLAGS = $(src_test_test_LDFLAGS)
|
|
|
|
|
2015-03-19 20:28:22 +01:00
|
|
|
src_test_test_memwipe_CPPFLAGS = $(src_test_test_CPPFLAGS)
|
2016-05-12 18:56:47 +02:00
|
|
|
# Don't use bugtrap cflags here: memwipe tests require memory violations.
|
2016-05-02 18:56:18 +02:00
|
|
|
src_test_test_memwipe_CFLAGS = $(TEST_CFLAGS)
|
2015-03-19 20:28:22 +01:00
|
|
|
src_test_test_memwipe_LDADD = $(src_test_test_LDADD)
|
2016-05-12 18:56:47 +02:00
|
|
|
# The LDFLAGS need to include the bugtrap cflags, or else we won't link
|
|
|
|
# successfully with the libraries built with them.
|
2016-05-02 18:56:18 +02:00
|
|
|
src_test_test_memwipe_LDFLAGS = $(src_test_test_LDFLAGS) @CFLAGS_BUGTRAP@
|
2015-03-19 20:28:22 +01:00
|
|
|
|
2018-07-11 18:51:36 +02:00
|
|
|
src_test_bench_LDFLAGS = @TOR_LDFLAGS_zlib@ $(TOR_LDFLAGS_CRYPTLIB) \
|
2018-07-01 15:37:28 +02:00
|
|
|
@TOR_LDFLAGS_libevent@
|
2018-06-21 16:34:29 +02:00
|
|
|
src_test_bench_LDADD = \
|
2018-07-01 15:37:28 +02:00
|
|
|
$(TOR_INTERNAL_LIBS) \
|
2017-08-10 10:08:41 +02:00
|
|
|
$(rust_ldadd) \
|
2012-08-02 15:31:43 +02:00
|
|
|
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
|
2018-07-11 18:51:36 +02:00
|
|
|
$(TOR_LIBS_CRYPTLIB) @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
|
2017-08-10 10:08:41 +02:00
|
|
|
@CURVE25519_LIBS@ \
|
|
|
|
@TOR_SYSTEMD_LIBS@ @TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
|
2012-08-02 15:31:43 +02:00
|
|
|
|
2018-07-11 18:51:36 +02:00
|
|
|
src_test_test_workqueue_LDFLAGS = @TOR_LDFLAGS_zlib@ $(TOR_LDFLAGS_CRYPTLIB) \
|
2018-07-01 15:37:28 +02:00
|
|
|
@TOR_LDFLAGS_libevent@
|
2018-06-21 16:34:29 +02:00
|
|
|
src_test_test_workqueue_LDADD = \
|
2018-07-01 15:37:28 +02:00
|
|
|
$(TOR_INTERNAL_TESTING_LIBS) \
|
2017-08-10 10:08:41 +02:00
|
|
|
$(rust_ldadd) \
|
2013-09-23 07:19:16 +02:00
|
|
|
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
|
2018-07-11 18:51:36 +02:00
|
|
|
$(TOR_LIBS_CRYPTLIB) @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
|
2017-08-10 10:08:41 +02:00
|
|
|
@CURVE25519_LIBS@ \
|
|
|
|
@TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
|
2013-09-23 07:19:16 +02:00
|
|
|
|
2016-04-13 21:30:59 +02:00
|
|
|
src_test_test_timers_CPPFLAGS = $(src_test_test_CPPFLAGS)
|
|
|
|
src_test_test_timers_CFLAGS = $(src_test_test_CFLAGS)
|
|
|
|
src_test_test_timers_LDADD = \
|
2018-07-05 21:13:44 +02:00
|
|
|
src/lib/libtor-evloop-testing.a \
|
2018-06-21 16:34:29 +02:00
|
|
|
$(TOR_CRYPTO_TESTING_LIBS) \
|
|
|
|
$(TOR_UTIL_TESTING_LIBS) \
|
2017-08-10 10:08:41 +02:00
|
|
|
$(rust_ldadd) \
|
2016-04-13 21:30:59 +02:00
|
|
|
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
|
2018-07-11 18:51:36 +02:00
|
|
|
$(TOR_LIBS_CRYPTLIB) @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
|
2017-08-10 10:08:41 +02:00
|
|
|
@CURVE25519_LIBS@ \
|
|
|
|
@TOR_LZMA_LIBS@
|
2016-04-13 21:30:59 +02:00
|
|
|
src_test_test_timers_LDFLAGS = $(src_test_test_LDFLAGS)
|
|
|
|
|
2012-08-02 15:31:43 +02:00
|
|
|
noinst_HEADERS+= \
|
2014-12-04 15:19:44 +01:00
|
|
|
src/test/fakechans.h \
|
2017-05-15 17:45:20 +02:00
|
|
|
src/test/hs_test_helpers.h \
|
2015-10-02 13:15:20 +02:00
|
|
|
src/test/log_test_helpers.h \
|
2015-10-02 15:36:59 +02:00
|
|
|
src/test/rend_test_helpers.h \
|
2014-07-16 22:37:00 +02:00
|
|
|
src/test/test.h \
|
2015-01-29 16:09:53 +01:00
|
|
|
src/test/test_helpers.h \
|
2015-12-21 18:32:20 +01:00
|
|
|
src/test/test_dir_common.h \
|
2017-05-02 15:35:22 +02:00
|
|
|
src/test/test_connection.h \
|
2018-09-04 18:59:47 +02:00
|
|
|
src/test/test_tortls.h \
|
2014-09-01 01:39:43 +02:00
|
|
|
src/test/test_descriptors.inc \
|
2014-10-06 15:06:04 +02:00
|
|
|
src/test/example_extrainfo.inc \
|
|
|
|
src/test/failing_routerdescs.inc \
|
2015-02-11 21:06:04 +01:00
|
|
|
src/test/ed25519_vectors.inc \
|
2015-10-02 15:36:59 +02:00
|
|
|
src/test/test_descriptors.inc \
|
2017-08-23 19:08:59 +02:00
|
|
|
src/test/test_hs_descriptor.inc \
|
2015-10-02 15:36:59 +02:00
|
|
|
src/test/vote_descriptors.inc
|
2012-08-02 15:31:43 +02:00
|
|
|
|
2012-12-08 06:52:44 +01:00
|
|
|
noinst_PROGRAMS+= src/test/test-ntor-cl
|
2017-03-14 14:06:36 +01:00
|
|
|
noinst_PROGRAMS+= src/test/test-hs-ntor-cl
|
2012-12-08 06:52:44 +01:00
|
|
|
src_test_test_ntor_cl_SOURCES = src/test/test_ntor_cl.c
|
2018-07-11 18:51:36 +02:00
|
|
|
src_test_test_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ $(TOR_LDFLAGS_CRYPTLIB)
|
2018-06-21 16:34:29 +02:00
|
|
|
src_test_test_ntor_cl_LDADD = \
|
2018-07-01 15:37:28 +02:00
|
|
|
$(TOR_INTERNAL_LIBS) \
|
2017-08-10 10:08:41 +02:00
|
|
|
$(rust_ldadd) \
|
2012-12-08 06:52:44 +01:00
|
|
|
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
|
2018-07-11 18:51:36 +02:00
|
|
|
$(TOR_LIBS_CRYPTLIB) @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
|
2017-08-10 10:08:41 +02:00
|
|
|
@CURVE25519_LIBS@ @TOR_LZMA_LIBS@
|
2012-12-08 06:52:44 +01:00
|
|
|
src_test_test_ntor_cl_AM_CPPFLAGS = \
|
2018-06-20 15:25:50 +02:00
|
|
|
$(AM_CPPFLAGS)
|
2012-12-08 06:52:44 +01:00
|
|
|
|
2017-03-14 14:06:36 +01:00
|
|
|
src_test_test_hs_ntor_cl_SOURCES = src/test/test_hs_ntor_cl.c
|
2018-07-11 18:51:36 +02:00
|
|
|
src_test_test_hs_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ $(TOR_LDFLAGS_CRYPTLIB)
|
2018-06-21 16:34:29 +02:00
|
|
|
src_test_test_hs_ntor_cl_LDADD = \
|
|
|
|
$(TOR_INTERNAL_LIBS) \
|
2017-03-14 14:06:36 +01:00
|
|
|
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
|
2018-07-11 18:51:36 +02:00
|
|
|
$(TOR_LIBS_CRYPTLIB) @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
|
2017-03-14 14:06:36 +01:00
|
|
|
src_test_test_hs_ntor_cl_AM_CPPFLAGS = \
|
2018-06-20 15:25:50 +02:00
|
|
|
$(AM_CPPFLAGS)
|
2017-03-14 14:06:36 +01:00
|
|
|
|
|
|
|
|
2018-07-16 12:49:40 +02:00
|
|
|
if UNITTESTS_ENABLED
|
2013-07-30 03:56:31 +02:00
|
|
|
noinst_PROGRAMS += src/test/test-bt-cl
|
|
|
|
src_test_test_bt_cl_SOURCES = src/test/test_bt_cl.c
|
2018-06-21 16:34:29 +02:00
|
|
|
src_test_test_bt_cl_LDADD = \
|
|
|
|
$(TOR_UTIL_TESTING_LIBS) \
|
2017-08-10 10:08:41 +02:00
|
|
|
$(rust_ldadd) \
|
2013-07-30 03:56:31 +02:00
|
|
|
@TOR_LIB_MATH@ \
|
2018-06-27 15:09:10 +02:00
|
|
|
@TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@
|
2013-07-30 03:56:31 +02:00
|
|
|
src_test_test_bt_cl_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
|
2015-03-20 13:12:09 +01:00
|
|
|
src_test_test_bt_cl_CPPFLAGS= $(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS)
|
2018-07-16 12:49:40 +02:00
|
|
|
endif
|
2013-07-30 03:56:31 +02:00
|
|
|
|
2014-02-04 17:07:43 +01:00
|
|
|
EXTRA_DIST += \
|
|
|
|
src/test/bt_test.py \
|
|
|
|
src/test/ntor_ref.py \
|
2017-03-14 14:06:36 +01:00
|
|
|
src/test/hs_ntor_ref.py \
|
2017-08-29 18:12:52 +02:00
|
|
|
src/test/hs_build_address.py \
|
|
|
|
src/test/hs_indexes.py \
|
2017-02-03 18:04:08 +01:00
|
|
|
src/test/fuzz_static_testcases.sh \
|
2014-02-04 17:07:43 +01:00
|
|
|
src/test/slownacl_curve25519.py \
|
2018-05-17 16:01:52 +02:00
|
|
|
src/test/test_rebind.sh \
|
|
|
|
src/test/test_rebind.py \
|
2015-09-02 15:17:43 +02:00
|
|
|
src/test/zero_length_keys.sh \
|
2018-07-01 15:37:28 +02:00
|
|
|
src/test/rust_supp.txt \
|
2015-09-24 21:07:39 +02:00
|
|
|
src/test/test_keygen.sh \
|
2017-07-14 03:25:01 +02:00
|
|
|
src/test/test_key_expiration.sh \
|
2016-05-12 19:06:58 +02:00
|
|
|
src/test/test_zero_length_keys.sh \
|
2017-03-14 14:06:36 +01:00
|
|
|
src/test/test_ntor.sh src/test/test_hs_ntor.sh src/test/test_bt.sh \
|
2015-12-20 20:57:27 +01:00
|
|
|
src/test/test-network.sh \
|
2017-04-29 13:17:22 +02:00
|
|
|
src/test/test_rust.sh \
|
2016-06-08 23:29:06 +02:00
|
|
|
src/test/test_switch_id.sh \
|
|
|
|
src/test/test_workqueue_cancel.sh \
|
|
|
|
src/test/test_workqueue_efd.sh \
|
|
|
|
src/test/test_workqueue_efd2.sh \
|
|
|
|
src/test/test_workqueue_pipe.sh \
|
|
|
|
src/test/test_workqueue_pipe2.sh \
|
|
|
|
src/test/test_workqueue_socketpair.sh
|
|
|
|
|
2018-02-08 23:51:57 +01:00
|
|
|
test-rust:
|
2018-03-20 21:46:19 +01:00
|
|
|
$(TESTS_ENVIRONMENT) "$(abs_top_srcdir)/src/test/test_rust.sh"
|