Buildd-setup faffing around with __FILE__ breaks my unit tests.

Sune Vuorela sune at debian.org
Sun Feb 10 19:10:37 GMT 2019


On Sunday, February 10, 2019 8:00:00 PM CET Ximin Luo wrote:
> i.e. QT tests shouldn't use __FILE__, they should use something else.

What should they use?  A custom macro that the build system passes into 
instead?

That's just silly. So what are your actual suggestion to find the source tree 
from executables in the build tree?

Note that this is all about tests, so nothing shipped to actual users, so 
reproducibility should be a non-issue here.

> Patching this one macro is easier than patching several hundred packages
> that use __FILE__ directly for more innocent (less assumptive) purposes
> that are unaffected by -ffile-prefix-mpa.

What do you consider acceptable usecases for __FILE__ ?

/Sune
-- 
I didn’t stop pretending when I became an adult, it’s just that when I was a 
kid I was pretending that I fit into the rules and structures of this world. 
And now that I’m an adult, I pretend that those rules and structures exist.
   - zefrank





More information about the Reproducible-builds mailing list