Skip to content

Commit

Permalink
DEBUG: Try to figure out which step that is failing
Browse files Browse the repository at this point in the history
  • Loading branch information
frej committed Jul 31, 2024
1 parent b75022e commit 7b2b9db
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions lib/compiler/test/compilation_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,13 @@ compile_load(Module, Dir, Conf) ->
ok.

self_compile(Config) when is_list(Config) ->
ct:pal(?HI_IMPORTANCE, "Starting self_compile~n"),
self_compile_1(Config, "new", [inline]).

self_compile_old_inliner(Config) when is_list(Config) ->
%% The old inliner is useful for testing that sys_core_fold does not
%% introduce name capture problems.
ct:pal(?HI_IMPORTANCE, "Starting self_compile_old_inliner~n"),
self_compile_1(Config, "old", [verbose,{inline,500}]).

self_compile_1(Config, Prefix, Opts) ->
Expand All @@ -328,15 +330,17 @@ self_compile_1(Config, Prefix, Opts) ->
%% Compile the compiler. (In this node to get better coverage.)
CompA = make_compiler_dir(Priv, Prefix++"compiler_a"),
VsnA = Version ++ ".0",
ct:pal(?HI_IMPORTANCE, "self_compile_1: 0~n"),
compile_compiler(compiler_src(), CompA, VsnA, Opts),

Check warning on line 334 in lib/compiler/test/compilation_SUITE.erl

View workflow job for this annotation

GitHub Actions / CT Test Results

self_compile_old_inliner failed

artifacts/Unit Test Results/compiler_junit.xml [took 3s]
Raw output
Test self_compile_old_inliner in compilation_SUITE failed!
{{case_clause,
     {badarg,
         [{io,format,
              [user,
               "\n----------------------------------------------------\n2024-07-31 14:16:35.090\n!! ~s: error: ~p~n\n\n",
               [[47,98,117,105,108,100,114,111,111,116,47,111,116,112,47,69,
                 114,108,97,110,103,32,8709,8868,8478,47,108,105,98,47,99,111,
                 109,112,105,108,101,114,45,56,46,53,46,49,47,115,114,99,47,
                 98,101,97,109,95,115,115,97,95,97,108,105,97,115,46,101,114,
                 108],
                error]],
              [{file,"io.erl"},
               {line,203},
               {error_info,
                   #{cause => {device,format},module => erl_stdlib_errors}}]},
          {ct_logs,tc_print,5,[{file,"ct_logs.erl"},{line,557}]},
          {ct_logs,tc_pal,5,[{file,"ct_logs.erl"},{line,600}]},
          {compilation_SUITE,'-compile_compiler/4-fun-0-',2,
              [{file,"compilation_SUITE.erl"},{line,383}]},
          {test_lib,'-p_run_loop/6-fun-0-',2,
              [{file,"test_lib.erl"},{line,193}]}]}},
 [{test_lib,p_run_loop,6,[{file,"test_lib.erl"},{line,198}]},
  {compilation_SUITE,self_compile_1,3,
      [{file,"compilation_SUITE.erl"},{line,334}]},
  {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1794}]},
  {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1303}]},
  {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1235}]}]}

Check warning on line 334 in lib/compiler/test/compilation_SUITE.erl

View workflow job for this annotation

GitHub Actions / CT Test Results

self_compile failed

artifacts/Unit Test Results/compiler_junit.xml [took 2s]
Raw output
Test self_compile in compilation_SUITE failed!
{{case_clause,
     {badarg,
         [{io,format,
              [user,
               "\n----------------------------------------------------\n2024-07-31 14:16:37.521\n!! ~s: error: ~p~n\n\n",
               [[47,98,117,105,108,100,114,111,111,116,47,111,116,112,47,69,
                 114,108,97,110,103,32,8709,8868,8478,47,108,105,98,47,99,111,
                 109,112,105,108,101,114,45,56,46,53,46,49,47,115,114,99,47,
                 98,101,97,109,95,115,115,97,95,97,108,105,97,115,46,101,114,
                 108],
                error]],
              [{file,"io.erl"},
               {line,203},
               {error_info,
                   #{cause => {device,format},module => erl_stdlib_errors}}]},
          {ct_logs,tc_print,5,[{file,"ct_logs.erl"},{line,557}]},
          {ct_logs,tc_pal,5,[{file,"ct_logs.erl"},{line,600}]},
          {compilation_SUITE,'-compile_compiler/4-fun-0-',2,
              [{file,"compilation_SUITE.erl"},{line,383}]},
          {test_lib,'-p_run_loop/6-fun-0-',2,
              [{file,"test_lib.erl"},{line,193}]}]}},
 [{test_lib,p_run_loop,6,[{file,"test_lib.erl"},{line,198}]},
  {compilation_SUITE,self_compile_1,3,
      [{file,"compilation_SUITE.erl"},{line,334}]},
  {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1794}]},
  {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1303}]},
  {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1235}]}]}

ct:pal(?HI_IMPORTANCE, "self_compile_1: 1~n"),
%% Compile the compiler again using the newly compiled compiler.
%% (In another node because reloading the compiler would disturb cover.)
CompilerB = Prefix++"compiler_b",
CompB = make_compiler_dir(Priv, CompilerB),
VsnB = VsnA ++ ".0",
ct:pal(?HI_IMPORTANCE, "self_compile_1: 2~n"),
self_compile_node(CompA, CompB, VsnB, Opts),

ct:pal(?HI_IMPORTANCE, "self_compile_1: 3~n"),
%% Compare compiler directories. The compiler directories should
%% be equal (except for beam_asm that contains the compiler version).
compare_compilers(CompA, CompB),
Expand Down Expand Up @@ -373,8 +377,12 @@ compile_compiler(Files, OutDir, Version, InlineOpts) ->
{i,filename:join(code:lib_dir(stdlib), "include")}|InlineOpts],
test_lib:p_run(fun(File) ->
case compile:file(File, Opts) of
{ok,_} -> ok;
_ -> error
{ok,_} ->
ok;
E ->
ct:pal(?HI_IMPORTANCE, "!! ~s: error: ~p~n",
[File, E]),
error
end
end, Files).

Expand Down

0 comments on commit 7b2b9db

Please sign in to comment.