6666
6767log_environment () ->
6868 Vars = lists :sort (fun (A , B ) -> A =< B end , os :getenv ()),
69- ct :pal (? LOW_IMPORTANCE , " Environment variables:~n~ts " ,
69+ ct :log (? LOW_IMPORTANCE , " Environment variables:~n~ts " ,
7070 [[io_lib :format (" ~ts~n " , [V ]) || V <- Vars ]]).
7171
7272run_setup_steps (Config ) ->
@@ -152,7 +152,7 @@ run_steps(Config, []) ->
152152 Config .
153153
154154redirect_logger_to_ct_logs (Config ) ->
155- ct :pal (
155+ ct :log (
156156 ? LOW_IMPORTANCE ,
157157 " Configuring logger to send logs to common_test logs" ),
158158 ok = logger :set_handler_config (cth_log_redirect , level , debug ),
@@ -172,7 +172,7 @@ redirect_logger_to_ct_logs(Config) ->
172172
173173 ok = logger :remove_handler (default ),
174174
175- ct :pal (
175+ ct :log (
176176 ? LOW_IMPORTANCE ,
177177 " Logger configured to send logs to common_test logs; you should see "
178178 " a message below saying so" ),
@@ -433,12 +433,12 @@ ensure_rabbitmqctl_cmd(Config) ->
433433 false ->
434434 find_script (Config , " rabbitmqctl" );
435435 R ->
436- ct :pal (? LOW_IMPORTANCE ,
436+ ct :log (? LOW_IMPORTANCE ,
437437 " Using rabbitmqctl from RABBITMQCTL: ~tp~n " , [R ]),
438438 R
439439 end ;
440440 R ->
441- ct :pal (? LOW_IMPORTANCE ,
441+ ct :log (? LOW_IMPORTANCE ,
442442 " Using rabbitmqctl from rabbitmqctl_cmd: ~tp~n " , [R ]),
443443 R
444444 end ,
@@ -470,7 +470,7 @@ find_script(Config, Script) ->
470470 filelib :is_file (File )],
471471 case Locations of
472472 [Location | _ ] ->
473- ct :pal (? LOW_IMPORTANCE , " Using ~ts at ~tp~n " , [Script , Location ]),
473+ ct :log (? LOW_IMPORTANCE , " Using ~ts at ~tp~n " , [Script , Location ]),
474474 Location ;
475475 [] ->
476476 false
@@ -555,7 +555,7 @@ ensure_rabbitmq_queues_cmd(Config) ->
555555 R -> R
556556 end ;
557557 R ->
558- ct :pal (? LOW_IMPORTANCE ,
558+ ct :log (? LOW_IMPORTANCE ,
559559 " Using rabbitmq-queues from rabbitmq_queues_cmd: ~tp~n " , [R ]),
560560 R
561561 end ,
@@ -654,12 +654,12 @@ symlink_priv_dir(Config) ->
654654 Target = filename :join ([SrcDir , " logs" , Name ]),
655655 case exec ([" ln" , " -snf" , PrivDir , Target ]) of
656656 {ok , _ } -> ok ;
657- _ -> ct :pal (? LOW_IMPORTANCE ,
657+ _ -> ct :log (? LOW_IMPORTANCE ,
658658 " Failed to symlink private_log directory." )
659659 end ,
660660 Config ;
661661 not_found ->
662- ct :pal (? LOW_IMPORTANCE ,
662+ ct :log (? LOW_IMPORTANCE ,
663663 " Failed to symlink private_log directory." ),
664664 Config
665665 end
@@ -684,7 +684,7 @@ load_elixir(Config) ->
684684 {skip , _ } = Skip ->
685685 Skip ;
686686 ElixirLibDir ->
687- ct :pal (? LOW_IMPORTANCE , " Elixir lib dir: ~ts~n " , [ElixirLibDir ]),
687+ ct :log (? LOW_IMPORTANCE , " Elixir lib dir: ~ts~n " , [ElixirLibDir ]),
688688 true = code :add_pathz (ElixirLibDir ),
689689 {ok , _ } = application :ensure_all_started (elixir ),
690690 Config
@@ -720,14 +720,18 @@ long_running_testsuite_monitor(TimerRef, Testcases) ->
720720 long_running_testsuite_monitor (TimerRef , Testcases1 );
721721 ping_ct ->
722722 T1 = erlang :monotonic_time (seconds ),
723- ct :pal (? STD_IMPORTANCE , " Testcases still in progress:~ts " ,
724- [[
723+ InProgress = [
725724 begin
726725 TDiff = format_time_diff (T1 , T0 ),
727726 rabbit_misc :format (" ~n - ~ts (~ts )" , [TC , TDiff ])
728727 end
729728 || {TC , T0 } <- Testcases
730- ]]),
729+ ],
730+ case InProgress of
731+ [] -> ok ;
732+ _ -> ct :pal (? STD_IMPORTANCE , " Testcases still in progress:~ts " ,
733+ [InProgress ])
734+ end ,
731735 long_running_testsuite_monitor (TimerRef , Testcases );
732736 stop ->
733737 timer :cancel (TimerRef )
@@ -905,7 +909,7 @@ exec([Cmd | Args], Options) when is_list(Cmd) orelse is_binary(Cmd) ->
905909 % % Because Args1 may contain binaries, we don't use string:join().
906910 % % Instead we do a list comprehension.
907911 ArgsIoList = [Cmd1 , [[$\s , Arg ] || Arg <- Args1 ]],
908- ct :pal (? LOW_IMPORTANCE , Log1 , [ArgsIoList , self ()]),
912+ ct :log (? LOW_IMPORTANCE , Log1 , [ArgsIoList , self ()]),
909913 try
910914 Port = erlang :open_port (
911915 {spawn_executable , Cmd1 }, [
@@ -951,10 +955,10 @@ port_receive_loop(Port, Stdout, Options, Until, DumpTimer) ->
951955 Stdout =:= " " ,
952956 if
953957 DropStdout ->
954- ct :pal (? LOW_IMPORTANCE , " Exit code: ~tp (pid ~tp )" ,
958+ ct :log (? LOW_IMPORTANCE , " Exit code: ~tp (pid ~tp )" ,
955959 [X , self ()]);
956960 true ->
957- ct :pal (? LOW_IMPORTANCE , " ~ts~n Exit code: ~tp (pid ~tp )" ,
961+ ct :log (? LOW_IMPORTANCE , " ~ts~n Exit code: ~tp (pid ~tp )" ,
958962 [Stdout , X , self ()])
959963 end ,
960964 case proplists :get_value (match_stdout , Options ) of
@@ -976,7 +980,7 @@ port_receive_loop(Port, Stdout, Options, Until, DumpTimer) ->
976980 DropStdout ->
977981 ok ;
978982 true ->
979- ct :pal (? LOW_IMPORTANCE , " ~ts~n [Command still in progress] (pid ~tp )" ,
983+ ct :log (? LOW_IMPORTANCE , " ~ts~n [Command still in progress] (pid ~tp )" ,
980984 [Stdout , self ()])
981985 end ,
982986 port_receive_loop (Port , Stdout , Options , Until , stdout_dump_timer ());
@@ -1101,7 +1105,7 @@ eventually({Line, Assertion} = TestObj, PollInterval, PollCount)
11011105 ok ->
11021106 ok ;
11031107 Err ->
1104- ct :pal (? LOW_IMPORTANCE ,
1108+ ct :log (? LOW_IMPORTANCE ,
11051109 " Retrying in ~b ms for ~b more times due to failed assertion in line ~b : ~tp " ,
11061110 [PollInterval , PollCount - 1 , Line , Err ]),
11071111 timer :sleep (PollInterval ),
0 commit comments