aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_test_server_if_1_SUITE.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2010-06-03 14:40:16 +0200
committerRaimo Niskanen <[email protected]>2010-06-09 16:19:21 +0200
commit5d01bdc2c4c3cc18150711ebfab4c84abdfc0b45 (patch)
treeb6b0007b983b94746087542b4ef13ff79b794c05 /lib/common_test/test/ct_test_server_if_1_SUITE.erl
parent7c6504029f84c52de40a6b29b2fd1b17c053ccec (diff)
downloadotp-5d01bdc2c4c3cc18150711ebfab4c84abdfc0b45.tar.gz
otp-5d01bdc2c4c3cc18150711ebfab4c84abdfc0b45.tar.bz2
otp-5d01bdc2c4c3cc18150711ebfab4c84abdfc0b45.zip
Improve and fix various test suites
Diffstat (limited to 'lib/common_test/test/ct_test_server_if_1_SUITE.erl')
-rw-r--r--lib/common_test/test/ct_test_server_if_1_SUITE.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/common_test/test/ct_test_server_if_1_SUITE.erl b/lib/common_test/test/ct_test_server_if_1_SUITE.erl
index 069f8c75fc..8b46a30cdc 100644
--- a/lib/common_test/test/ct_test_server_if_1_SUITE.erl
+++ b/lib/common_test/test/ct_test_server_if_1_SUITE.erl
@@ -87,14 +87,14 @@ ts_if_1(Config) when is_list(Config) ->
TestSpecName = ct_test_support:write_testspec(TestSpec, PrivDir, "ts_if_1_spec"),
{Opts,ERPid} = setup({spec,TestSpecName}, Config),
- ok = ct_test_support:run(ct, run_test, [Opts], Config),
+ ok = ct_test_support:run(Opts, Config),
Events = ct_test_support:get_events(ERPid, Config),
ct_test_support:log_events(ts_if_1,
reformat(Events, ?eh),
PrivDir),
- TestEvents = test_events(ts_if_1),
+ TestEvents = events_to_check(ts_if_1),
ok = ct_test_support:verify_events(TestEvents, Events, Config).
@@ -119,6 +119,15 @@ reformat(Events, EH) ->
%%%-----------------------------------------------------------------
%%% TEST EVENTS
%%%-----------------------------------------------------------------
+events_to_check(Test) ->
+ %% 2 tests (ct:run_test + script_start) is default
+ events_to_check(Test, 2).
+
+events_to_check(_, 0) ->
+ [];
+events_to_check(Test, N) ->
+ test_events(Test) ++ events_to_check(Test, N-1).
+
test_events(ts_if_1) ->
[
{?eh,start_logging,{'DEF','RUNDIR'}},