diff options
author | Peter Andersson <[email protected]> | 2014-04-30 00:25:42 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2014-04-30 00:25:42 +0200 |
commit | af8a352109ba87f7960ab46bd6ed1d237b87ed7c (patch) | |
tree | 8fed4dc185fb67a922ae81650f9cd08011ce2a3a /lib/common_test/src/ct_framework.erl | |
parent | aca0b6182b039333b4c963938878d9eecc85e5a1 (diff) | |
download | otp-af8a352109ba87f7960ab46bd6ed1d237b87ed7c.tar.gz otp-af8a352109ba87f7960ab46bd6ed1d237b87ed7c.tar.bz2 otp-af8a352109ba87f7960ab46bd6ed1d237b87ed7c.zip |
Fix problem with comments getting lost when running parallel test cases
OTP-11898
Diffstat (limited to 'lib/common_test/src/ct_framework.erl')
-rw-r--r-- | lib/common_test/src/ct_framework.erl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl index 9ef917a507..20903607dc 100644 --- a/lib/common_test/src/ct_framework.erl +++ b/lib/common_test/src/ct_framework.erl @@ -657,7 +657,18 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) -> _ -> ok end, - ct_util:delete_testdata(comment), + if Func == end_per_group; Func == end_per_suite -> + %% clean up any saved comments + ct_util:match_delete_testdata({comment,'_'}); + true -> + %% attemp to delete any saved comment for this TC + case process_info(TCPid, group_leader) of + {group_leader,TCGL} -> + ct_util:delete_testdata({comment,TCGL}); + _ -> + ok + end + end, ct_util:delete_suite_data(last_saved_config), FuncSpec = group_or_func(Func,Args), @@ -850,7 +861,7 @@ error_notification(Mod,Func,_Args,{Error,Loc}) -> _ -> %% this notification comes from the test case process, so %% we can add error info to comment with test_server:comment/1 - case ct_util:get_testdata(comment) of + case ct_util:get_testdata({comment,group_leader()}) of undefined -> test_server:comment(ErrorHtml); Comment -> |