refactor code to test builds in a new test_runner module