ninja: add support for build-time tests

+1

I will do it right now.