diff options
author | Peter Andersson <[email protected]> | 2013-08-07 09:19:20 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2013-08-07 09:19:53 +0200 |
commit | 6ed736d1d5e00b4264d2928c555a2c347941dc10 (patch) | |
tree | 7c21b37e096d798a37cd96782c9777034ed20ab1 /lib/common_test/src/ct_util.erl | |
parent | 0fad6449c7ec48aa7454880b5a1caf0f2580b33f (diff) | |
parent | ac887c1fab12ab3c2502489cb747b08daa2214ea (diff) | |
download | otp-6ed736d1d5e00b4264d2928c555a2c347941dc10.tar.gz otp-6ed736d1d5e00b4264d2928c555a2c347941dc10.tar.bz2 otp-6ed736d1d5e00b4264d2928c555a2c347941dc10.zip |
Merge remote branch 'origin/peppe/common_test/ct_log_updates' into maint
* origin/peppe/common_test/ct_log_updates:
Make the CT logger print to stdout if test_server is not running
Add test
Allow calls to ct:pal and ct:print even if CT is not running
OTP-11176
Diffstat (limited to 'lib/common_test/src/ct_util.erl')
-rw-r--r-- | lib/common_test/src/ct_util.erl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/common_test/src/ct_util.erl b/lib/common_test/src/ct_util.erl index 68e76c2396..abda87c2cd 100644 --- a/lib/common_test/src/ct_util.erl +++ b/lib/common_test/src/ct_util.erl @@ -286,14 +286,23 @@ get_start_dir() -> %% handle verbosity outside ct_util_server (let the client read %% the verbosity table) to avoid possible deadlock situations set_verbosity(Elem = {_Category,_Level}) -> - ets:insert(?verbosity_table, Elem), - ok. + try ets:insert(?verbosity_table, Elem) of + _ -> + ok + catch + _:Reason -> + {error,Reason} + end. + get_verbosity(Category) -> - case ets:lookup(?verbosity_table, Category) of + try ets:lookup(?verbosity_table, Category) of [{Category,Level}] -> Level; _ -> undefined + catch + _:Reason -> + {error,Reason} end. loop(Mode,TestData,StartDir) -> |