summaryrefslogtreecommitdiff
path: root/test/rebar_test_utils.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-06-27 17:47:56 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-06-27 17:47:56 -0500
commit5012e06e68a168d102545ddd3fb0428715c08753 (patch)
tree1d84b4e90a580be07e632fa4a468ec82d4055adb /test/rebar_test_utils.erl
parente28ebaa95725698bfed110804e0448c073c98531 (diff)
parent99858f3b6902c4feb95620ce0125c52635bf8f00 (diff)
Merge pull request #489 from kovyl2404/windows-ct-fix
Make test on windows green.
Diffstat (limited to 'test/rebar_test_utils.erl')
-rw-r--r--test/rebar_test_utils.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/rebar_test_utils.erl b/test/rebar_test_utils.erl
index e5de0a6..4943d4b 100644
--- a/test/rebar_test_utils.erl
+++ b/test/rebar_test_utils.erl
@@ -105,16 +105,22 @@ create_config(AppDir, Contents) ->
%% @doc Util to create a random variation of a given name.
create_random_name(Name) ->
- random:seed(os:timestamp()),
+ random_seed(),
Name ++ erlang:integer_to_list(random:uniform(1000000)).
%% @doc Util to create a random variation of a given version.
create_random_vsn() ->
- random:seed(os:timestamp()),
+ random_seed(),
lists:flatten([erlang:integer_to_list(random:uniform(100)),
".", erlang:integer_to_list(random:uniform(100)),
".", erlang:integer_to_list(random:uniform(100))]).
+random_seed() ->
+ <<A:32, B:32, C:32>> = crypto:rand_bytes(12),
+ random:seed({A,B,C}).
+
+
+
expand_deps(_, []) -> [];
expand_deps(git, [{Name, Deps} | Rest]) ->
Dep = {Name, ".*", {git, "https://example.org/user/"++Name++".git", "master"}},