diff options
author | Maxim Fedorov <maximfca@gmail.com> | 2021-09-17 17:48:40 -0700 |
---|---|---|
committer | Maxim Fedorov <maximfca@gmail.com> | 2021-11-08 20:07:05 -0800 |
commit | e2adc35ede8c48293511616c0db8582988b456db (patch) | |
tree | 0b80ffcf84ec79930f4e46ca586abec6f49593a3 /erts/emulator/test/float_SUITE.erl | |
parent | dd26ccad771a8969f62583bb795a8201f921ab2b (diff) | |
download | erlang-e2adc35ede8c48293511616c0db8582988b456db.tar.gz |
emulator: replace test_server:start node with ?CT_PEER
Cleanup emulator application, sweep duplicate code that
was adding code path to the test suite module, make peer
node naming uniform, protect from rogue nodes left when
test case fails.
Diffstat (limited to 'erts/emulator/test/float_SUITE.erl')
-rw-r--r-- | erts/emulator/test/float_SUITE.erl | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/erts/emulator/test/float_SUITE.erl b/erts/emulator/test/float_SUITE.erl index 4c450c4398..2c88a5608e 100644 --- a/erts/emulator/test/float_SUITE.erl +++ b/erts/emulator/test/float_SUITE.erl @@ -98,7 +98,7 @@ fp_drv_thread(Config) when is_list(Config) -> %% Run in a separate node since it used to crash the emulator... Parent = self(), DrvDir = proplists:get_value(data_dir, Config), - {ok,Node} = start_node(Config), + {ok, Peer, Node} = ?CT_PEER(), Tester = spawn_link(Node, fun () -> Parent ! @@ -107,7 +107,7 @@ fp_drv_thread(Config) when is_list(Config) -> DrvDir)} end), Result = receive {Tester, Res} -> Res end, - stop_node(Node), + peer:stop(Peer), Result. fp_drv_test(Test, DrvDir) -> @@ -285,21 +285,6 @@ cmp(Big,Small,BigGtSmall,BigLtSmall,SmallGtBig,SmallLtBig, id(I) -> I. -start_node(Config) when is_list(Config) -> - Pa = filename:dirname(code:which(?MODULE)), - Name = list_to_atom(atom_to_list(?MODULE) - ++ "-" - ++ atom_to_list(proplists:get_value(testcase, Config)) - ++ "-" - ++ integer_to_list(erlang:system_time(second)) - ++ "-" - ++ integer_to_list(erlang:unique_integer([positive]))), - test_server:start_node(Name, slave, [{args, "-pa "++Pa}]). - -stop_node(Node) -> - test_server:stop_node(Node). - - %% Test that operations that might hide infinite intermediate results %% do not supress the badarith. hidden_inf(Config) when is_list(Config) -> |