aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/test/test_server_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-10-03 10:55:11 +0200
committerBjörn Gustavsson <[email protected]>2012-10-03 10:55:11 +0200
commit54e7cc9086908a0e5642caa6ac3680557acc5a67 (patch)
tree19c7c12f7e8cb58548cacb8e52667a06124934c8 /lib/test_server/test/test_server_SUITE.erl
parentcb5580b02358a7df145a1b79fcbbfad57ebf246f (diff)
parenta6038cc5161495756cfeab0db36bbd17e5923aaa (diff)
downloadotp-54e7cc9086908a0e5642caa6ac3680557acc5a67.tar.gz
otp-54e7cc9086908a0e5642caa6ac3680557acc5a67.tar.bz2
otp-54e7cc9086908a0e5642caa6ac3680557acc5a67.zip
Merge branch 'bjorn/test_server/fix-test-cases'
* bjorn/test_server/fix-test-cases: Provided better information when the test cases fail Remove the useless test_server_line_SUITE test suite test_server_SUITE: Remove the undefined_functions/1 test case
Diffstat (limited to 'lib/test_server/test/test_server_SUITE.erl')
-rw-r--r--lib/test_server/test/test_server_SUITE.erl38
1 files changed, 23 insertions, 15 deletions
diff --git a/lib/test_server/test/test_server_SUITE.erl b/lib/test_server/test/test_server_SUITE.erl
index a8532b08ab..cb8cb9da31 100644
--- a/lib/test_server/test/test_server_SUITE.erl
+++ b/lib/test_server/test/test_server_SUITE.erl
@@ -92,8 +92,8 @@ test_server_SUITE(Config) ->
% rpc:call(Node,dbg, tracer,[]),
% rpc:call(Node,dbg, p,[all,c]),
% rpc:call(Node,dbg, tpl,[test_server_ctrl,x]),
- run_test_server_tests("test_server_SUITE", 39, 1, 31,
- 20, 9, 1, 11, 2, 26, Config).
+ run_test_server_tests("test_server_SUITE", 38, 1, 30,
+ 19, 9, 1, 11, 2, 25, Config).
test_server_parallel01_SUITE(Config) ->
run_test_server_tests("test_server_parallel01_SUITE", 37, 0, 19,
@@ -120,7 +120,7 @@ run_test_server_tests(SuiteName, NCases, NFail, NExpected, NSucc,
NUsrSkip, NAutoSkip,
NActualSkip, NActualFail, NActualSucc, Config) ->
- ct:log("See test case log files under:~n~p~n",
+ ct:log("<a href=\"file://~s\">Test case log files</a>\n",
[filename:join([proplists:get_value(priv_dir, Config),
SuiteName++".logs"])]),
@@ -138,17 +138,16 @@ run_test_server_tests(SuiteName, NCases, NFail, NExpected, NSucc,
rpc:call(Node,test_server_ctrl, stop, []),
- {ok,#suite{ n_cases = NCases,
- n_cases_failed = NFail,
- n_cases_expected = NExpected,
- n_cases_succ = NSucc,
- n_cases_user_skip = NUsrSkip,
- n_cases_auto_skip = NAutoSkip,
- cases = Cases }} = Data =
- test_server_test_lib:parse_suite(
- hd(filelib:wildcard(
- filename:join([proplists:get_value(priv_dir, Config),
- SuiteName++".logs","run*","suite.log"])))),
+ {ok,Data} = test_server_test_lib:parse_suite(
+ hd(filelib:wildcard(
+ filename:join([proplists:get_value(priv_dir, Config),
+ SuiteName++".logs","run*","suite.log"])))),
+ check([{"Number of cases",NCases,Data#suite.n_cases},
+ {"Number failed",NFail,Data#suite.n_cases_failed},
+ {"Number expected",NExpected,Data#suite.n_cases_expected},
+ {"Number successful",NSucc,Data#suite.n_cases_succ},
+ {"Number user skipped",NUsrSkip,Data#suite.n_cases_user_skip},
+ {"Number auto skipped",NAutoSkip,Data#suite.n_cases_auto_skip}], ok),
{NActualSkip,NActualFail,NActualSucc} =
lists:foldl(fun(#tc{ result = skip },{S,F,Su}) ->
{S+1,F,Su};
@@ -156,9 +155,18 @@ run_test_server_tests(SuiteName, NCases, NFail, NExpected, NSucc,
{S,F,Su+1};
(#tc{ result = failed },{S,F,Su}) ->
{S,F+1,Su}
- end,{0,0,0},Cases),
+ end,{0,0,0},Data#suite.cases),
Data.
+check([{Str,Same,Same}|T], Status) ->
+ io:format("~s: ~p\n", [Str,Same]),
+ check(T, Status);
+check([{Str,Expected,Actual}|T], _) ->
+ io:format("~s: expected ~p, actual ~p\n", [Str,Expected,Actual]),
+ check(T, error);
+check([], ok) -> ok;
+check([], error) -> ?t:fail().
+
until(Fun) ->
case Fun() of
true ->