aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_framework.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2012-03-26 13:40:14 +0200
committerPeter Andersson <[email protected]>2012-03-26 13:40:20 +0200
commit67ccf96bb7b430e691509a45299eeee1ca5f27c5 (patch)
tree2f0fdf2cf41e2f39d430d17413ff6d1e9b24f819 /lib/common_test/src/ct_framework.erl
parent22c4c386fe2a8655b1c9be09a083b89e220f1120 (diff)
parent5fd16511a1240220f0126f7be51f44aa38bcce56 (diff)
downloadotp-67ccf96bb7b430e691509a45299eeee1ca5f27c5.tar.gz
otp-67ccf96bb7b430e691509a45299eeee1ca5f27c5.tar.bz2
otp-67ccf96bb7b430e691509a45299eeee1ca5f27c5.zip
Merge remote branch 'origin/peppe/common_test/otp-9988_9871.merged' into maint
* origin/peppe/common_test/otp-9988_9871.merged: Fix various problems with the user timetrap implementation Fix dialyzer reported errors Implement support for user controlled timetraps OTP-9988
Diffstat (limited to 'lib/common_test/src/ct_framework.erl')
-rw-r--r--lib/common_test/src/ct_framework.erl35
1 files changed, 12 insertions, 23 deletions
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl
index 187794e78b..e4fbf95fdd 100644
--- a/lib/common_test/src/ct_framework.erl
+++ b/lib/common_test/src/ct_framework.erl
@@ -212,23 +212,16 @@ init_tc2(Mod,Suite,Func,SuiteInfo,MergeResult,Config) ->
{auto_skip,{require_failed,Reason}};
{'EXIT',Reason} ->
{auto_skip,Reason};
- {ok,FinalConfig} ->
- case MergeResult of
- {error,Reason} ->
- %% suite0 configure finished now, report that
- %% first test case actually failed
- {skip,Reason};
- _ ->
- case get('$test_server_framework_test') of
- undefined ->
- ct_suite_init(Suite, FuncSpec, FinalConfig);
- Fun ->
- case Fun(init_tc, FinalConfig) of
- NewConfig when is_list(NewConfig) ->
- {ok,NewConfig};
- Else ->
- Else
- end
+ {ok,Config1} ->
+ case get('$test_server_framework_test') of
+ undefined ->
+ ct_suite_init(Suite, FuncSpec, Config1);
+ Fun ->
+ case Fun(init_tc, Config1) of
+ NewConfig when is_list(NewConfig) ->
+ {ok,NewConfig};
+ Else ->
+ Else
end
end
end.
@@ -346,16 +339,12 @@ get_suite_name(Mod, _) ->
Mod.
%% Check that alias names are not already in use
-check_for_clashes(TCInfo, GrPathInfo, SuiteInfo) ->
- {CurrGrInfo,SearchIn} = case GrPathInfo of
- [] -> {[],[SuiteInfo]};
- [Curr|Path] -> {Curr,[SuiteInfo|Path]}
- end,
+check_for_clashes(TCInfo, [CurrGrInfo|Path], SuiteInfo) ->
ReqNames = fun(Info) -> [element(2,R) || R <- Info,
size(R) == 3,
require == element(1,R)]
end,
- ExistingNames = lists:flatten([ReqNames(L) || L <- SearchIn]),
+ ExistingNames = lists:flatten([ReqNames(L) || L <- [SuiteInfo|Path]]),
CurrGrReqNs = ReqNames(CurrGrInfo),
GrClashes = [Name || Name <- CurrGrReqNs,
true == lists:member(Name, ExistingNames)],