From 70b6b32a9c7e3e3fca45fc3a0e11e2a5087a4660 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 3 Oct 2017 14:53:42 +0200 Subject: Add app name tag in process dictionary --- lib/common_test/src/ct_logs.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/common_test/src/ct_logs.erl') diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl index ba7660fe6a..f7c118a4c7 100644 --- a/lib/common_test/src/ct_logs.erl +++ b/lib/common_test/src/ct_logs.erl @@ -665,6 +665,7 @@ log_timestamp({MS,S,US}) -> tc_esc_chars}). logger(Parent, Mode, Verbosity) -> + put(app, common_test), register(?MODULE,self()), %%! Below is a temporary workaround for the limitation of %%! max one test run per second. @@ -1004,6 +1005,7 @@ print_to_log(async, FromPid, Category, TCGL, Content, EscChars, State) -> if FromPid /= TCGL -> IoFun = create_io_fun(FromPid, CtLogFd, EscChars), fun() -> + put(app, common_test), test_server:permit_io(TCGL, self()), %% Since asynchronous io gets can get buffered if @@ -1035,6 +1037,7 @@ print_to_log(async, FromPid, Category, TCGL, Content, EscChars, State) -> end; true -> fun() -> + put(app, common_test), unexpected_io(FromPid, Category, ?MAX_IMPORTANCE, Content, CtLogFd, EscChars) end @@ -3016,6 +3019,7 @@ simulate() -> cast(stop), S = self(), Pid = spawn(fun() -> + put(app, common_test), register(?MODULE,self()), S ! {self(),started}, simulate_logger_loop() -- cgit v1.2.3 From 2df013b5bfd714247570d9b4958b40f7559d35dd Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Fri, 6 Oct 2017 14:22:25 +0200 Subject: Tag Common Test system processes using process dictionary --- lib/common_test/src/ct_logs.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/common_test/src/ct_logs.erl') diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl index f7c118a4c7..f1f8065599 100644 --- a/lib/common_test/src/ct_logs.erl +++ b/lib/common_test/src/ct_logs.erl @@ -665,8 +665,8 @@ log_timestamp({MS,S,US}) -> tc_esc_chars}). logger(Parent, Mode, Verbosity) -> - put(app, common_test), register(?MODULE,self()), + ct_util:mark_process(), %%! Below is a temporary workaround for the limitation of %%! max one test run per second. %%! ---> @@ -1005,7 +1005,7 @@ print_to_log(async, FromPid, Category, TCGL, Content, EscChars, State) -> if FromPid /= TCGL -> IoFun = create_io_fun(FromPid, CtLogFd, EscChars), fun() -> - put(app, common_test), + ct_util:mark_process(), test_server:permit_io(TCGL, self()), %% Since asynchronous io gets can get buffered if @@ -1037,7 +1037,7 @@ print_to_log(async, FromPid, Category, TCGL, Content, EscChars, State) -> end; true -> fun() -> - put(app, common_test), + ct_util:mark_process(), unexpected_io(FromPid, Category, ?MAX_IMPORTANCE, Content, CtLogFd, EscChars) end @@ -3019,8 +3019,8 @@ simulate() -> cast(stop), S = self(), Pid = spawn(fun() -> - put(app, common_test), register(?MODULE,self()), + ct_util:mark_process(), S ! {self(),started}, simulate_logger_loop() end), -- cgit v1.2.3