Add support for --errorout

Failed test breaks build (non zero status is returned if --errorout flag is set)