@@ -723,14 +723,28 @@ master_print_summary_for(Title,List) ->
723723 _ = case List of
724724 [] -> ok ;
725725 _ ->
726- Chars = [
726+ Chars = [[
727+ master_format_gh_anno (Reason ),
727728 io_lib :format (" Node: ~w~n Case: ~w :~w~n Reason: ~p~n~n " ,
728729 [Node , Suite , FuncOrGroup , Reason ])
729- || {Node , Suite , FuncOrGroup , Reason } <- List ],
730+ ] || {Node , Suite , FuncOrGroup , Reason } <- List ],
730731 log (all ,Title ,Chars ,[])
731732 end ,
732733 ok .
733734
735+ master_format_gh_anno ({error , {{exception , Reason , [{Mod , Fun , Arity , Loc }|_ ]}, _ }}) ->
736+ % % We use .github because that file exists in our repository
737+ % % so GH will still put annotations in pull requests even
738+ % % if we don't have the real file name.
739+ File = proplists :get_value (file , Loc , " .github" ),
740+ Line = proplists :get_value (line , Loc , 0 ),
741+ io_lib :format (" ::error file=~s ,line=~d ::~w :~tw /~d : ~w~n " ,
742+ [File , Line , Mod , Fun , Arity , Reason ]);
743+ master_format_gh_anno (Reason ) ->
744+ % % Do the bare minimum if we don't know the error reason.
745+ io_lib :format (" ::error file=.github,line=0::~w~n " ,
746+ [Reason ]).
747+
734748update_queue (take ,Node ,From ,Lock = {Op ,Resource },Locks ,Blocked ) ->
735749 % % Locks: [{{Operation,Resource},Node},...]
736750 % % Blocked: [{{Operation,Resource},Node,WaitingPid},...]
0 commit comments