message: Unit tests for tor fix
diff: @@ -118,20 +118,28 @@ LIBTOR_A_SOURCES = \
  # source files of every module to libtor-testing.a so we can build the unit
  # tests for everything. See the UNITTESTS_ENABLED branch below.
  #
  -#LIBTOR_TESTING_A_SOURCES = $(LIBTOR_A_SOURCES)
  +LIBTOR_TESTING_A_SOURCES = $(LIBTOR_A_SOURCES)
  # The Directory Authority module.
  -#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
  +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)
  +#if UNITTESTS_ENABLED
  +
  +# Add the sources of the modules that are needed for tests to work here.
  +LIBTOR_TESTING_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
  +
  +src_or_libtor_testing_a_SOURCES = $(LIBTOR_TESTING_A_SOURCES)
  +#else
  +#src_or_libtor_testing_a_SOURCES =
  +#endif
  src_or_tor_SOURCES = src/or/tor_main.c
  AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or
  