aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_framework.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2015-03-06 12:12:16 +0100
committerPeter Andersson <[email protected]>2015-03-06 12:12:16 +0100
commitd53c43168aefaa8eab8fb3ebf31200488c1abf84 (patch)
treeca505a39cc3d043a74f41806b894820555b0b9ba /lib/common_test/src/ct_framework.erl
parent86ce4d658f9a11dbfc3d6ffe0a8be50c33807210 (diff)
parente725cd9385f269b501ebc3ca31999ac69706b535 (diff)
downloadotp-d53c43168aefaa8eab8fb3ebf31200488c1abf84.tar.gz
otp-d53c43168aefaa8eab8fb3ebf31200488c1abf84.tar.bz2
otp-d53c43168aefaa8eab8fb3ebf31200488c1abf84.zip
Merge branch 'maint'
Diffstat (limited to 'lib/common_test/src/ct_framework.erl')
-rw-r--r--lib/common_test/src/ct_framework.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl
index e8ea7992b4..ec525784ec 100644
--- a/lib/common_test/src/ct_framework.erl
+++ b/lib/common_test/src/ct_framework.erl
@@ -1268,6 +1268,11 @@ report(What,Data) ->
Data1 = if GrName == undefined -> {Suite,Func,Result};
true -> Data
end,
+ %% Register the group leader for the process calling the report
+ %% function, making it possible for a hook function to print
+ %% in the test case log file
+ ReportingPid = self(),
+ ct_logs:register_groupleader(ReportingPid, group_leader()),
case Result of
{failed, _} ->
ct_hooks:on_tc_fail(What, Data1);
@@ -1282,6 +1287,7 @@ report(What,Data) ->
_Else ->
ok
end,
+ ct_logs:unregister_groupleader(ReportingPid),
case {Func,Result} of
{init_per_suite,_} ->
ok;