aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common_test/test/ct_error_SUITE.erl24
-rw-r--r--lib/common_test/test/ct_repeat_1_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_skip_SUITE.erl2
-rw-r--r--lib/test_server/src/test_server.erl11
4 files changed, 21 insertions, 18 deletions
diff --git a/lib/common_test/test/ct_error_SUITE.erl b/lib/common_test/test/ct_error_SUITE.erl
index 6867e59b60..6231e27644 100644
--- a/lib/common_test/test/ct_error_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE.erl
@@ -285,7 +285,7 @@ test_events(cfg_error) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}},
+ {test_server,run_test_case_eval,9}]}}}}},
{?eh,tc_auto_skip,
{cfg_error_2_SUITE,tc1,
{failed,{cfg_error_2_SUITE,init_per_suite,
@@ -294,7 +294,7 @@ test_events(cfg_error) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}}},
+ {test_server,run_test_case_eval,9}]}}}}}},
{?eh,test_stats,{0,0,{0,3}}},
{?eh,tc_auto_skip,
{cfg_error_2_SUITE,tc2,
@@ -304,7 +304,7 @@ test_events(cfg_error) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}}},
+ {test_server,run_test_case_eval,9}]}}}}}},
{?eh,test_stats,{0,0,{0,4}}},
{?eh,tc_auto_skip,
{cfg_error_2_SUITE,end_per_suite,
@@ -314,7 +314,7 @@ test_events(cfg_error) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}}},
+ {test_server,run_test_case_eval,9}]}}}}}},
{?eh,tc_start,{cfg_error_3_SUITE,init_per_suite}},
{?eh,tc_done,
@@ -378,7 +378,7 @@ test_events(cfg_error) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}},
+ {test_server,run_test_case_eval,9}]}}}}},
{?eh,tc_start,{cfg_error_7_SUITE,init_per_suite}},
{?eh,tc_done,{cfg_error_7_SUITE,init_per_suite,ok}},
@@ -432,7 +432,7 @@ test_events(cfg_error) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}},
+ {test_server,run_test_case_eval,9}]}}}}},
{?eh,tc_auto_skip,
{cfg_error_8_SUITE,tc1,
{failed,{cfg_error_8_SUITE,init_per_group,
@@ -441,7 +441,7 @@ test_events(cfg_error) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}}},
+ {test_server,run_test_case_eval,9}]}}}}}},
{?eh,test_stats,{4,0,{0,13}}},
{?eh,tc_auto_skip,
{cfg_error_8_SUITE,end_per_group,
@@ -451,7 +451,7 @@ test_events(cfg_error) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}}}],
+ {test_server,run_test_case_eval,9}]}}}}}}],
[{?eh,tc_start,{cfg_error_8_SUITE,{init_per_group,g4,[]}}},
{?eh,tc_done,{cfg_error_8_SUITE,{init_per_group,g4,[]},ok}},
@@ -525,7 +525,7 @@ test_events(cfg_error) ->
{test_server,my_apply,3},
{test_server,init_per_testcase,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}}},
+ {test_server,run_test_case_eval,9}]}}}}}},
{?eh,test_stats,{9,0,{0,17}}},
{?eh,tc_start,{cfg_error_9_SUITE,tc4}},
{?eh,tc_done,
@@ -562,7 +562,7 @@ test_events(cfg_error) ->
{test_server,my_apply,3},
{test_server,do_end_per_testcase,4},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}}},
+ {test_server,run_test_case_eval,9}]}}}}}},
{?eh,test_stats,{12,3,{0,18}}},
{?eh,tc_start,{cfg_error_9_SUITE,tc14}},
{?eh,tc_done,
@@ -646,7 +646,7 @@ test_events(lib_error) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}},
+ {test_server,run_test_case_eval,9}]}}}}},
{?eh,test_stats,{0,1,{0,0}}},
{?eh,tc_start,{lib_error_1_SUITE,lines_exit}},
{?eh,tc_done,
@@ -671,7 +671,7 @@ test_events(lib_error) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}},
+ {test_server,run_test_case_eval,9}]}}}}},
{?eh,test_stats,{0,5,{0,0}}},
{?eh,tc_start,{lib_error_1_SUITE,no_lines_exit}},
{?eh,tc_done,
diff --git a/lib/common_test/test/ct_repeat_1_SUITE.erl b/lib/common_test/test/ct_repeat_1_SUITE.erl
index 4e842bd6d6..99e3b83ea9 100644
--- a/lib/common_test/test/ct_repeat_1_SUITE.erl
+++ b/lib/common_test/test/ct_repeat_1_SUITE.erl
@@ -565,7 +565,7 @@ test_events(repeat_cs_until_any_fail) ->
{test_server,my_apply,3},
{test_server,ts_tc,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}},
+ {test_server,run_test_case_eval,9}]}}}}},
{?eh,test_stats,{5,2,{0,0}}},
{?eh,tc_start,{repeat_1_SUITE,tc_fail_2}},
{?eh,tc_done,
diff --git a/lib/common_test/test/ct_skip_SUITE.erl b/lib/common_test/test/ct_skip_SUITE.erl
index 4ba4479208..6a8c57a6bd 100644
--- a/lib/common_test/test/ct_skip_SUITE.erl
+++ b/lib/common_test/test/ct_skip_SUITE.erl
@@ -369,7 +369,7 @@ test_events(auto_skip) ->
{test_server,my_apply,3},
{test_server,init_per_testcase,3},
{test_server,run_test_case_eval1,6},
- {test_server,run_test_case_eval,8}]}}}}}},
+ {test_server,run_test_case_eval,9}]}}}}}},
{?eh,tc_start,
{auto_skip_9_SUITE,{end_per_group,g5,[parallel]}}},
{?eh,tc_done,
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl
index 039ea720a8..ea55b22603 100644
--- a/lib/test_server/src/test_server.erl
+++ b/lib/test_server/src/test_server.erl
@@ -612,6 +612,7 @@ do_run_test_case_apply(Mod, Func, Args, Name, RunInit, TimetrapData) ->
print(minor, "Current directory is ~p\n", [Cwd]),
print_timestamp(minor,"Started at "),
TCCallback = get(test_server_testcase_callback),
+ LogOpts = get(test_server_logopts),
Ref = make_ref(),
OldGLeader = group_leader(),
%% Set ourself to group leader for the spawned process
@@ -621,7 +622,7 @@ do_run_test_case_apply(Mod, Func, Args, Name, RunInit, TimetrapData) ->
fun() ->
run_test_case_eval(Mod, Func, Args, Name, Ref,
RunInit, TimetrapData,
- TCCallback)
+ LogOpts, TCCallback)
end),
group_leader(OldGLeader, self()),
put(test_server_detected_fail, []),
@@ -979,7 +980,8 @@ spawn_fw_call(Mod,{end_per_testcase,Func},EndConf,Pid,
E = {failed,Reason} ->
{E,{error,Reason}};
Result ->
- {Result,Result}
+ E = {failed,{Mod,end_per_testcase,Why}},
+ {Result,E}
end,
FailLoc = proplists:get_value(tc_fail_loc, EndConf),
case catch do_end_tc_call(Mod,Func, FailLoc,
@@ -1092,8 +1094,9 @@ job_proxy_msgloop() ->
%% or sends a message {failed, File, Line} to it's group_leader
run_test_case_eval(Mod, Func, Args0, Name, Ref, RunInit,
- TimetrapData, TCCallback) ->
- put(test_server_multiply_timetraps,TimetrapData),
+ TimetrapData, LogOpts, TCCallback) ->
+ put(test_server_multiply_timetraps, TimetrapData),
+ put(test_server_logopts, LogOpts),
{{Time,Value},Loc,Opts} =
case test_server_sup:framework_call(init_tc,[?pl2a(Mod),Func,Args0],