aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2016-09-14 13:32:04 +0200
committerPeter Andersson <[email protected]>2016-09-14 13:32:04 +0200
commit8ba70d0bdb2ee8718801bac0ca91f4aaac73a36b (patch)
treef4883d4cf973636a91c7cd1b27eb776d64ac6045
parent3f8eeea4a291060a25bcc7d6a9f5d09e18cc9aa4 (diff)
parent356338ad69008558cc2be1bd57fe6caa10c04fe1 (diff)
downloadotp-8ba70d0bdb2ee8718801bac0ca91f4aaac73a36b.tar.gz
otp-8ba70d0bdb2ee8718801bac0ca91f4aaac73a36b.tar.bz2
otp-8ba70d0bdb2ee8718801bac0ca91f4aaac73a36b.zip
Merge branch 'maint'
-rw-r--r--lib/common_test/src/ct.erl19
-rw-r--r--lib/kernel/src/code_server.erl12
2 files changed, 30 insertions, 1 deletions
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl
index d7ae81a5ce..f9f845e1a9 100644
--- a/lib/common_test/src/ct.erl
+++ b/lib/common_test/src/ct.erl
@@ -68,6 +68,7 @@
log/1, log/2, log/3, log/4, log/5,
print/1, print/2, print/3, print/4,
pal/1, pal/2, pal/3, pal/4,
+ set_verbosity/2, get_verbosity/1,
capture_start/0, capture_stop/0, capture_get/0, capture_get/1,
fail/1, fail/2, comment/1, comment/2, make_priv_dir/0,
testcases/2, userdata/2, userdata/3,
@@ -715,6 +716,24 @@ pal(Category,Importance,Format,Args) ->
ct_logs:tc_pal(Category,Importance,Format,Args).
%%%-----------------------------------------------------------------
+%%% @spec set_verbosity(Category, Level) -> ok
+%%% Category = default | atom()
+%%% Level = integer()
+%%%
+%%% @doc Set the verbosity level for a category
+set_verbosity(Category, Level) ->
+ ct_util:set_verbosity({Category,Level}).
+
+%%%-----------------------------------------------------------------
+%%% @spec get_verbosity(Category) -> Level | undefined
+%%% Category = default | atom()
+%%% Level = integer()
+%%%
+%%% @doc Read the verbosity level for a category
+get_verbosity(Category) ->
+ ct_util:get_verbosity(Category).
+
+%%%-----------------------------------------------------------------
%%% @spec capture_start() -> ok
%%%
%%% @doc Start capturing all text strings printed to stdout during
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index 3f220f4a6c..29c8856a42 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -811,7 +811,13 @@ clear_namedb([], _) ->
%% Dir must be a complete pathname (not only a name).
insert_dir(Dir, Db) ->
Splitted = filename:split(Dir),
- Name = get_name_from_splitted(Splitted),
+ case get_name_from_splitted(Splitted) of
+ Name when Name /= "ebin", Name /= "." ->
+ Name;
+ _ ->
+ SplittedAbsName = filename:split(absname(Dir)),
+ Name = get_name_from_splitted(SplittedAbsName)
+ end,
AppDir = filename:join(del_ebin_1(Splitted)),
do_insert_name(Name, AppDir, Db).
@@ -952,6 +958,10 @@ del_ebin_1([Parent,App,"ebin"]) ->
[Archive]
end
end;
+del_ebin_1(Path = [_App,"ebin"]) ->
+ del_ebin_1(filename:split(absname(filename:join(Path))));
+del_ebin_1(["ebin"]) ->
+ del_ebin_1(filename:split(absname("ebin")));
del_ebin_1([H|T]) ->
[H|del_ebin_1(T)];
del_ebin_1([]) ->