aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test
diff options
context:
space:
mode:
authorAndrey Pampukha <[email protected]>2010-04-12 15:46:16 +0200
committerRaimo Niskanen <[email protected]>2010-06-09 16:19:17 +0200
commit05f69de43fc8f95baab30e940cd80df86a433e1e (patch)
tree45b9cdad246c37bf253c2b71f0df6435a6756b9f /lib/common_test/test
parent2a8a08a1752392a5e9e745c2a0929642812333e0 (diff)
downloadotp-05f69de43fc8f95baab30e940cd80df86a433e1e.tar.gz
otp-05f69de43fc8f95baab30e940cd80df86a433e1e.tar.bz2
otp-05f69de43fc8f95baab30e940cd80df86a433e1e.zip
Improve eval and node_start and add new options for ct_slave
Diffstat (limited to 'lib/common_test/test')
-rw-r--r--lib/common_test/test/ct_master_SUITE.erl21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/common_test/test/ct_master_SUITE.erl b/lib/common_test/test/ct_master_SUITE.erl
index ebd399ad64..3618b08a74 100644
--- a/lib/common_test/test/ct_master_SUITE.erl
+++ b/lib/common_test/test/ct_master_SUITE.erl
@@ -74,9 +74,7 @@ ct_master_test(Config) when is_list(Config)->
FileName = filename:join(DataDir, "ct_master_spec.spec"),
Suites = [master_SUITE],
TSFile = make_spec(DataDir, FileName, NodeNames, Suites, Config),
- start_nodes(NodeNames),
[{TSFile, ok}] = run_test(ct_master_test, FileName, Config),
- stop_nodes(NodeNames),
file:delete(filename:join(DataDir, FileName)).
%%%-----------------------------------------------------------------
@@ -100,6 +98,11 @@ make_spec(DataDir, FileName, NodeNames, Suites, Config)->
end,
NodeNames),
+ NS = lists:map(fun(NodeName)->
+ {node_start, NodeName, [{startup_functions, [{io, format, ["hello, world~n"]}]}]}
+ end,
+ NodeNames),
+
S = [{suites, NodeNames, filename:join(DataDir, "master"), Suites}],
PrivDir = ?config(priv_dir, Config),
@@ -108,7 +111,7 @@ make_spec(DataDir, FileName, NodeNames, Suites, Config)->
end,
NodeNames) ++ [{logdir, master, PrivDir}],
- ct_test_support:write_testspec(N++C++S++LD, DataDir, FileName).
+ ct_test_support:write_testspec(N++C++S++LD++NS, DataDir, FileName).
get_log_dir(PrivDir, NodeName)->
LogDir = filename:join(PrivDir, io_lib:format("slave.~p", [NodeName])),
@@ -118,18 +121,6 @@ get_log_dir(PrivDir, NodeName)->
run_test(_Name, FileName, Config)->
[{FileName, ok}] = ct_test_support:run(ct_master, run, [FileName], Config).
-start_nodes(NodeNames)->
- lists:foreach(fun(NodeName)->
- {ok, _}=ct_slave:start(NodeName)
- end,
- NodeNames).
-
-stop_nodes(NodeNames)->
- lists:foreach(fun(NodeName)->
- {ok, _}=ct_slave:stop(NodeName)
- end,
- NodeNames).
-
reformat_events(Events, EH) ->
ct_test_support:reformat(Events, EH).