Add check_result function to build2

Change-Id: Iad9e7eb5075525a4b7390995c44f8916fec1ad79