build in tmp dir, check that tests pass