mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
a3e0a87d95
We previously used FILENAME_PRIVATE identifiers mostly for identifiers exposed only to the unit tests... but also for identifiers exposed to the benchmarker, and sometimes for identifiers exposed to a similar module, and occasionally for no really good reason at all. Now, we use FILENAME_PRIVATE identifiers for identifiers shared by Tor and the unit tests. They should be defined static when we aren't building the unit test, and globally visible otherwise. (The STATIC macro will keep us honest here.) For identifiers used only by the unit tests and never by Tor at all, on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS. This is not the motivating use case for the split test/non-test build system; it's just a test example to see how it works, and to take a chance to clean up the code a little.
13 lines
554 B
Plaintext
13 lines
554 B
Plaintext
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.
|
|
|
|
- The production builds no longer include functions used only
|
|
in the unit tests; all functions exposed from a module for
|
|
unit-testing only are now static in production builds.
|
|
|