aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_testspec.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2011-09-01 16:32:36 +0200
committerPeter Andersson <[email protected]>2011-09-23 12:24:54 +0200
commit6668a91b365b8390d8eb369f7d6c6294711a1fef (patch)
treeaeeb629d8dd9c8a3e0b01ae17f32580e782e64d6 /lib/common_test/src/ct_testspec.erl
parent8d9b760e7fafec40787be6de5994240f1540d12a (diff)
downloadotp-6668a91b365b8390d8eb369f7d6c6294711a1fef.tar.gz
otp-6668a91b365b8390d8eb369f7d6c6294711a1fef.tar.bz2
otp-6668a91b365b8390d8eb369f7d6c6294711a1fef.zip
Various corrections and updates to improve error handling and reporting
OTP-8933
Diffstat (limited to 'lib/common_test/src/ct_testspec.erl')
-rw-r--r--lib/common_test/src/ct_testspec.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_testspec.erl b/lib/common_test/src/ct_testspec.erl
index bf1dfa24ea..2cba1d8410 100644
--- a/lib/common_test/src/ct_testspec.erl
+++ b/lib/common_test/src/ct_testspec.erl
@@ -249,11 +249,15 @@ collect_tests_from_file1([Spec|Specs],TestSpec,Relaxed) ->
SpecDir = filename:dirname(filename:absname(Spec)),
case file:consult(Spec) of
{ok,Terms} ->
- TestSpec1 = collect_tests(Terms,TestSpec#testspec{spec_dir=SpecDir},
+ TestSpec1 = collect_tests(Terms,
+ TestSpec#testspec{spec_dir=SpecDir},
Relaxed),
collect_tests_from_file1(Specs,TestSpec1,Relaxed);
{error,Reason} ->
- throw({error,{Spec,Reason}})
+ ReasonStr =
+ lists:flatten(io_lib:format("~s",
+ [file:format_error(Reason)])),
+ throw({error,{Spec,ReasonStr}})
end;
collect_tests_from_file1([],TS=#testspec{config=Cfgs,event_handler=EvHs,
include=Incl,tests=Tests},_) ->