From 89417d2897a109c069ef485f961a044d8c939494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 30 Aug 2024 11:02:02 +0200 Subject: [PATCH] wip --- lib/compiler/test/beam_debug_info_SUITE.erl | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/compiler/test/beam_debug_info_SUITE.erl b/lib/compiler/test/beam_debug_info_SUITE.erl index 172661a05931..b32d7f83d50e 100644 --- a/lib/compiler/test/beam_debug_info_SUITE.erl +++ b/lib/compiler/test/beam_debug_info_SUITE.erl @@ -68,19 +68,24 @@ do_smoke(Beam) -> %% could be for one of the following reasons: %% %% * A compiler pass has introduced a new temporary variable - %% whose name is a legal Erlang variable name. (Such temporary - %% variables are supposed to invalid names, such as `rec1`.) + %% whose name is a legal Erlang variable name. (Such + %% temporary variables are supposed to have invalid names, + %% such as `rec1`.) %% %% * Something is wrong in the mapping from `executable_line` %% instruction to function names, causing a variable to be - %% colled into the wrong function. + %% collected into the wrong function. [] = family_difference(DbgVars, SrcVars), AllDbg = family_union(DbgVars, DbgLiterals), - Diff = family_difference(SrcVars, AllDbg), - io:format("~p:\n ~p\n", [Mod,Diff]), - - ok + case family_difference(SrcVars, AllDbg) of + [] -> + ok; + [_|_]=Diff0 -> + Diff = [io_lib:format(" ~p/~p: ~p\n", [F,A,Vars]) || + {{F,A},Vars} <- Diff0], + io:format("~p:\n~ts", [Mod,Diff]) + end catch throw:{error,Error} -> io:format("*** compilation failure '~p' for file ~s\n",