Using the AM_TESTS_ENVIRONMENT variable ensures the environment
variables are only set during test execution and not during the
compilation phase.
AM_CPPFLAGS=
AM_CFLAGS = @TOR_SYSTEMD_CFLAGS@
SHELL = @SHELL@
+
+if COVERAGE_ENABLED
+TESTING_TOR_BINARY="$(top_builddir)/src/or/tor-cov"
+else
+TESTING_TOR_BINARY="$(top_builddir)/src/or/tor"
+endif
+
include src/include.am
include doc/include.am
include contrib/include.am
src/common/libor-event-testing.a src/trunnel/libor-trunnel-testing.a \
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
@TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@
-export TESTING_TOR_BINARY=$(top_builddir)/src/or/tor-cov
-else
-export TESTING_TOR_BINARY=$(top_builddir)/src/or/tor
endif
ORHEADERS = \
-
-export PYTHON=@PYTHON@
-export SHELL=@SHELL@
-export abs_top_srcdir=@abs_top_srcdir@
-export builddir=@builddir@
+AM_TESTS_ENVIRONMENT = \
+ export PYTHON=@PYTHON@; \
+ export SHELL=@SHELL@; \
+ export abs_top_srcdir=@abs_top_srcdir@; \
+ export builddir=@builddir@; \
+ export TESTING_TOR_BINARY="$(TESTING_TOR_BINARY)";
TESTSCRIPTS = src/test/test_zero_length_keys.sh