Permalink
Browse files

Merge pull request #14 from juanedi/master

Abort exunit if a suite fails.
  • Loading branch information...
2 parents 9db87db + c953a47 commit 7058379b7c7e017555647f6b9cecfd87cd50f884 @josevalim josevalim committed Apr 20, 2015
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/rebar_exunit.erl
@@ -78,4 +78,8 @@ perform_exunit(_Config, Files) ->
_ -> ok
end,
[ 'Elixir.Code':require_file(list_to_binary(File)) || File <- Files ],
- 'Elixir.ExUnit':run().
+ Result = 'Elixir.ExUnit':run(),
+ case maps:get(failures, Result) of
+ 0 -> ok;
+ F -> rebar_utils:abort("~p tests failed.~n", [F])
+ end.

0 comments on commit 7058379

Please sign in to comment.