ninja: add support for build-time tests

Closes #34306.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
ninja: add 1.5.1 bottle.