diff options
author | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2017-05-11 14:06:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-11 14:06:04 -0700 |
commit | 643a4b214c6842d43b9ed7ca9f12d247743e74ed (patch) | |
tree | bcadca71b902dfdbff61d0cf4f8d60ec085021f1 | |
parent | ce0d8ee15c92968c987b173047e8b14d14a63318 (diff) | |
parent | f4ca27d58fa81521808f530cfa50b9b314e93aa2 (diff) |
Merge pull request #1545 from ferd/catch-ct-internal-errors
Handle internal CT failures
-rw-r--r-- | src/rebar_prv_common_test.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl index e6788f8..3df8b75 100644 --- a/src/rebar_prv_common_test.erl +++ b/src/rebar_prv_common_test.erl @@ -650,7 +650,11 @@ handle_results(_) -> sum_results({Passed, Failed, {UserSkipped, AutoSkipped}}, {Passed2, Failed2, {UserSkipped2, AutoSkipped2}}) -> {Passed+Passed2, Failed+Failed2, - {UserSkipped+UserSkipped2, AutoSkipped+AutoSkipped2}}. + {UserSkipped+UserSkipped2, AutoSkipped+AutoSkipped2}}; +sum_results(_, {error, Reason}) -> + {error, Reason}; +sum_results(Unknown, _) -> + {error, Unknown}. handle_quiet_results(_, {error, _} = Result) -> handle_results(Result); @@ -673,7 +677,10 @@ format_result({Passed, 0, {0, 0}}) -> format_result({Passed, Failed, Skipped}) -> Format = [format_failed(Failed), format_skipped(Skipped), format_passed(Passed)], - ?CONSOLE("~s", [Format]). + ?CONSOLE("~s", [Format]); +format_result(_Unknown) -> + %% Happens when CT itself encounters a bug + ok. format_failed(0) -> []; |