Minor tweaks to set_build_result, added some tests. TODO proper test.