aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/test/ei_accept_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-07-03 21:45:29 +0200
committerSverker Eriksson <[email protected]>2018-07-16 17:44:31 +0200
commit3e2508e0f6dbd973d80c96418a989d1fa525767a (patch)
treefaf6c8ff5371a128243d1fcc58fa1e34ded71606 /lib/erl_interface/test/ei_accept_SUITE.erl
parentedabb78bccd26fe817844d92cd04d8ac7fb8e817 (diff)
downloadotp-3e2508e0f6dbd973d80c96418a989d1fa525767a.tar.gz
otp-3e2508e0f6dbd973d80c96418a989d1fa525767a.tar.bz2
otp-3e2508e0f6dbd973d80c96418a989d1fa525767a.zip
erl_interface: Add valgrind ability for test port programs
Run under valgrind if environment variable VALGRIND_LOG_DIR is set.
Diffstat (limited to 'lib/erl_interface/test/ei_accept_SUITE.erl')
-rw-r--r--lib/erl_interface/test/ei_accept_SUITE.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/erl_interface/test/ei_accept_SUITE.erl b/lib/erl_interface/test/ei_accept_SUITE.erl
index 85c567acd3..78a433d21b 100644
--- a/lib/erl_interface/test/ei_accept_SUITE.erl
+++ b/lib/erl_interface/test/ei_accept_SUITE.erl
@@ -25,6 +25,7 @@
-include("ei_accept_SUITE_data/ei_accept_test_cases.hrl").
-export([all/0, suite/0,
+ init_per_testcase/2,
ei_accept/1, ei_threaded_accept/1,
monitor_ei_process/1]).
@@ -38,8 +39,11 @@ all() ->
[ei_accept, ei_threaded_accept,
monitor_ei_process].
+init_per_testcase(Case, Config) ->
+ runner:init_per_testcase(?MODULE, Case, Config).
+
ei_accept(Config) when is_list(Config) ->
- P = runner:start(?interpret),
+ P = runner:start(Config, ?interpret),
0 = ei_connect_init(P, 42, erlang:get_cookie(), 0),
Myname = hd(tl(string:tokens(atom_to_list(node()), "@"))),
@@ -91,7 +95,7 @@ ei_threaded_accept(Config) when is_list(Config) ->
%% Test erlang:monitor toward erl_interface "processes"
monitor_ei_process(Config) when is_list(Config) ->
- P = runner:start(?interpret),
+ P = runner:start(Config, ?interpret),
0 = ei_connect_init(P, 42, erlang:get_cookie(), 0),
Myname = hd(tl(string:tokens(atom_to_list(node()), "@"))),
@@ -99,7 +103,6 @@ monitor_ei_process(Config) when is_list(Config) ->
EINode = list_to_atom("c42@"++Myname),
io:format("EINode ~p ~n", [EINode]),
- Self = self(),
Port = 6543,
{ok, ListenFd} = ei_publish(P, Port),
MRef1 = erlang:monitor(process, {any, EINode}),