Abstracted out common build for tests