ninja: add support for build-time tests