From f7d654b81e1a65803c22bb53fc1d3a2021d87d50 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 6 Jun 2013 14:56:05 -0400 Subject: Start work on fancy compiler tricks to expose extra stuff to our tests This is mainly a matter of automake trickery: we build each static library in two versions now: one with the TOR_UNIT_TESTS macro defined, and one without. When TOR_UNIT_TESTS is defined, we can enable mocking and expose more functions. When it's not defined, we can lock the binary down more. The alternatives would be to have alternate build modes: a "testing configuration" for building the libraries with test support, and a "production configuration" for building them without. I don't favor that approach, since I think it would mean more people runnning binaries build for testing, or more people not running unit tests. --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.gitignore') diff --git a/.gitignore b/.gitignore index e48918d32..bb3817ba5 100644 --- a/.gitignore +++ b/.gitignore @@ -128,10 +128,13 @@ /src/common/Makefile.in /src/common/common_sha1.i /src/common/libor.a +/src/common/libor-testing.a /src/common/libor.lib /src/common/libor-crypto.a +/src/common/libor-crypto-testing.a /src/common/libor-crypto.lib /src/common/libor-event.a +/src/common/libor-event-testing.a /src/common/libor-event.lib /src/common/libcurve25519_donna.a /src/common/libcurve25519_donna.lib @@ -150,6 +153,7 @@ /src/or/tor /src/or/tor.exe /src/or/libtor.a +/src/or/libtor-testing.a /src/or/libtor.lib # /src/test -- cgit v1.2.3