mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
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.
9 lines
362 B
Text
9 lines
362 B
Text
o Build features:
|
|
|
|
- Tor now builds each source file in two modes: a mode that avoids
|
|
exposing identifiers needlessly, and another mode that exposes
|
|
more identifiers for testing. This lets the compiler do better at
|
|
optimizing the production code, while enabling us to take more
|
|
radical measures to let the unit tests test things.
|
|
|
|
|