diff options
author | David Goulet <dgoulet@torproject.org> | 2018-04-27 11:33:22 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-05-01 10:07:09 -0400 |
commit | 43bba89656cce89964f260d46f2550ab9af00c9e (patch) | |
tree | ee61931d1ce7d095abf4e3eb6db5f9d54a18b78f /src/or | |
parent | a2ff4975f372870c841a8c4eeeeb93d834663650 (diff) | |
download | tor-43bba89656cce89964f260d46f2550ab9af00c9e.tar.gz tor-43bba89656cce89964f260d46f2550ab9af00c9e.zip |
build: Always compile module support for tests
The --disable-module-* configure option removes code from the final binary but
we still build the unit tests with the disable module(s) so we can actually
test that code path all the time and not forget about it.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/include.am | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/include.am b/src/or/include.am index 93f405d619..bb505937ac 100644 --- a/src/or/include.am +++ b/src/or/include.am @@ -114,20 +114,23 @@ LIBTOR_A_SOURCES = \ # # Modules are conditionnally compiled in tor starting here. We add the C files -# only if the modules has been enabled at configure time. +# only if the modules has been enabled at configure time. We always add the +# source files of every module to libtor-testing.a so we can build the unit +# tests for everything. # # The Directory Authority module. -if BUILD_MODULE_DIRAUTH -LIBTOR_A_SOURCES += \ +MODULE_DIRAUTH_SOURCES = \ src/or/dirauth/dircollate.c \ src/or/dirauth/dirvote.c \ src/or/dirauth/shared_random.c \ src/or/dirauth/shared_random_state.c +if BUILD_MODULE_DIRAUTH +LIBTOR_A_SOURCES += $(MODULE_DIRAUTH_SOURCES) endif src_or_libtor_a_SOURCES = $(LIBTOR_A_SOURCES) -src_or_libtor_testing_a_SOURCES = $(LIBTOR_A_SOURCES) +src_or_libtor_testing_a_SOURCES = $(LIBTOR_A_SOURCES) $(MODULE_DIRAUTH_SOURCES) src_or_tor_SOURCES = src/or/tor_main.c AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or |