summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSiri Hansen <siri@erlang.org>2016-12-22 22:14:07 +0100
committerSiri Hansen <siri@erlang.org>2016-12-22 22:14:07 +0100
commit146f2732b96b5db6476e3b86b13e7a3d7b1b2dc5 (patch)
tree4b97602c04997d0c053f8259c36f8ef988dc8f67 /src
parent998c6756b73ec2c227ed6f7f2e66eb059d1027fc (diff)
Handle errors from ct_testspec
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_common_test.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl
index 30596da..2ac8fc7 100644
--- a/src/rebar_prv_common_test.erl
+++ b/src/rebar_prv_common_test.erl
@@ -100,7 +100,9 @@ format_error({badconfig, Msg}) ->
io_lib:format(Msg, []);
format_error({multiple_errors, Errors}) ->
io_lib:format(lists:concat(["Error running tests:"] ++
- lists:map(fun(Error) -> "~n " ++ Error end, Errors)), []).
+ lists:map(fun(Error) -> "~n " ++ Error end, Errors)), []);
+format_error({error_reading_testspec, Reason}) ->
+ io_lib:format("Error reading testspec: ~p", [Reason]).
%% ===================================================================
%% Internal functions
@@ -549,8 +551,8 @@ get_dirs_from_specs(Specs) ->
RunList = lists:append([R || {_,R,_} <- NodeRunSkipList]),
DirList = [element(1,R) || R <- RunList],
{ok,{SpecList,DirList}};
- Error ->
- Error
+ {error,Reason} ->
+ {error,{?MODULE,{error_reading_testspec,Reason}}}
end.
get_tests_from_specs(Specs) ->