aboutsummaryrefslogtreecommitdiffstats
path: root/erts/test/run_erl_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-12-10 12:40:40 +0100
committerBjörn Gustavsson <[email protected]>2015-12-14 15:44:42 +0100
commit5850300f41de8047b9a9da1e4f00aaee3dcd662c (patch)
tree0569dfffab90d91edfc4c2a0deb35eea99de620b /erts/test/run_erl_SUITE.erl
parent38e8ab99454f69acab55e5bcb575ed60a8b72c2e (diff)
downloadotp-5850300f41de8047b9a9da1e4f00aaee3dcd662c.tar.gz
otp-5850300f41de8047b9a9da1e4f00aaee3dcd662c.tar.bz2
otp-5850300f41de8047b9a9da1e4f00aaee3dcd662c.zip
system tests: Replace 'random' with 'rand'
Diffstat (limited to 'erts/test/run_erl_SUITE.erl')
-rw-r--r--erts/test/run_erl_SUITE.erl18
1 files changed, 8 insertions, 10 deletions
diff --git a/erts/test/run_erl_SUITE.erl b/erts/test/run_erl_SUITE.erl
index 328477d870..6759d41a2b 100644
--- a/erts/test/run_erl_SUITE.erl
+++ b/erts/test/run_erl_SUITE.erl
@@ -141,12 +141,10 @@ heavier_1(Config) ->
?line ToErl = open_port({spawn,"to_erl "++Pipe}, []),
io:format("ToErl = ~p\n", [ToErl]),
- X = 1,
- Y = 555,
- Z = 42,
- ?line random:seed(X, Y, Z),
- SeedCmd = lists:flatten(io_lib:format("random:seed(~p, ~p, ~p). \r\n",
- [X,Y,Z])),
+ Seed = {1,555,42},
+ rand:seed(exsplus, Seed),
+ SeedCmd = lists:flatten(io_lib:format("rand:seed(exsplus, ~p). \r\n",
+ [Seed])),
?line io:format("~p\n", [SeedCmd]),
?line erlang:port_command(ToErl, SeedCmd),
@@ -157,9 +155,9 @@ heavier_1(Config) ->
"F = fun(F,0) -> ok; "++
"(F,N) -> " ++
"io:format(\"\\\"~s\\\"~n\","++
- "[[35|[random:uniform(25)+65 || " ++
+ "[[35|[rand:uniform(25)+65 || " ++
"_ <- lists:seq(1, "++
- "random:uniform("++
+ "rand:uniform("++
integer_to_list(MaxLen)++
"))]]]), "++
"F(F,N-1) "++
@@ -189,8 +187,8 @@ receive_all(Iter, ToErl, MaxLen) ->
receive_all_1(0, _, _, _) -> ok;
receive_all_1(Iter, Line, ToErl, MaxLen) ->
- NumChars = random:uniform(MaxLen),
- Pattern = [random:uniform(25)+65 || _ <- lists:seq(1, NumChars)],
+ NumChars = rand:uniform(MaxLen),
+ Pattern = [rand:uniform(25)+65 || _ <- lists:seq(1, NumChars)],
receive_all_2(Iter, {NumChars,Pattern}, Line, ToErl, MaxLen).