test runner: non-zero exit code in case of failed tests

This makes it easier to detect unit test failures from the
command line.
modern-harvey2
Robert Vollmert 2017-05-05 18:11:33 +02:00 committed by John Benediktsson
parent 27423b78aa
commit 445b55b3e5
1 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@ generalizations io io.files.temp io.files.unique kernel lexer
locals macros namespaces parser prettyprint quotations sequences
sequences.generalizations source-files source-files.errors
source-files.errors.debugger splitting stack-checker summary
tools.errors unicode vocabs vocabs.files vocabs.metadata
system tools.errors unicode vocabs vocabs.files vocabs.metadata
vocabs.parser words ;
FROM: vocabs.hierarchy => load ;
IN: tools.test
@ -193,6 +193,7 @@ M: test-failure error. ( error -- )
: test-all ( -- ) loaded-vocab-names filter-don't-test test-vocabs ;
: test-main ( -- )
command-line get [ [ load ] [ test ] bi ] each ;
command-line get [ [ load ] [ test ] bi ] each
test-failures get empty? [ 0 ] [ 1 ] if exit ;
MAIN: test-main