summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_prv_dialyzer.erl3
-rw-r--r--test/rebar_test_utils.erl3
-rw-r--r--test/rebar_utils_SUITE.erl8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/rebar_prv_dialyzer.erl b/src/rebar_prv_dialyzer.erl
index af0bae3..1cf7b71 100644
--- a/src/rebar_prv_dialyzer.erl
+++ b/src/rebar_prv_dialyzer.erl
@@ -97,8 +97,7 @@ do(State) ->
%% Dialyzer gets default plt location wrong way by peeking HOME environment
%% variable which usually is not defined on Windows.
maybe_fix_env() ->
- {ok, [[HomePath]]} = init:get_argument(home),
- os:putenv("DIALYZER_PLT", filename:join(HomePath, ".dialyzer_plt")).
+ os:putenv("DIALYZER_PLT", filename:join(rebar_dir:home_dir(), ".dialyzer_plt")).
-spec format_error(any()) -> iolist().
format_error({error_processing_apps, Error}) ->
diff --git a/test/rebar_test_utils.erl b/test/rebar_test_utils.erl
index b210bc2..639a293 100644
--- a/test/rebar_test_utils.erl
+++ b/test/rebar_test_utils.erl
@@ -105,7 +105,8 @@ create_config(AppDir, Contents) ->
%% @doc Util to create a random variation of a given name.
create_random_name(Name) ->
- random:seed(erlang:now()),
+ <<A:32, B:32, C:32>> = crypto:rand_bytes(12),
+ random:seed({A,B,C}),
Name ++ erlang:integer_to_list(random:uniform(1000000)).
%% @doc Util to create a random variation of a given version.
diff --git a/test/rebar_utils_SUITE.erl b/test/rebar_utils_SUITE.erl
index 76af5dd..f04ab63 100644
--- a/test/rebar_utils_SUITE.erl
+++ b/test/rebar_utils_SUITE.erl
@@ -22,7 +22,7 @@
task_with_flag_with_commas/1,
task_with_multiple_flags/1,
special_task_do/1,
- sh_don_not_miss_messages/1]).
+ sh_does_not_miss_messages/1]).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
@@ -31,7 +31,7 @@
all() ->
[{group, args_to_tasks},
- sh_don_not_miss_messages].
+ sh_does_not_miss_messages].
groups() ->
[{args_to_tasks, [], [empty_arglist,
@@ -120,7 +120,7 @@ special_task_do(_Config) ->
"do",
"bar,",
"baz"]).
-sh_don_not_miss_messages(_Config) ->
+sh_does_not_miss_messages(_Config) ->
Source = "~nmain(_) ->~n io:format(\"donotmissme\").~n",
file:write_file("do_not_miss_messages", io_lib:format(Source,[])),
{ok, "donotmissme"} = rebar_utils:sh("escript do_not_miss_messages", []),
@@ -130,4 +130,4 @@ sh_don_not_miss_messages(_Config) ->
after 100 ->
false
end,
- AnyMessageRemained = false. \ No newline at end of file
+ AnyMessageRemained = false.