@mirabilos @dalias As I said, it does not have to be an "either this or that" approach. My requirement: Production code must compile into the exact same binaries in both presence and absence of test code and test resources. That ensures 1. Nothing hidden in test code and/or test resources can be smuggled into the production artefacts, and 2. the validity of the test suite is the same. The only downside is the load on the build farm due to running the main build twice.