aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/test/wx_test_lib.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2017-09-18 11:26:24 +0200
committerDan Gudmundsson <[email protected]>2017-09-18 11:26:24 +0200
commit83a66e961f043720c9d353923baaefb6f5e8ed96 (patch)
treec9886fe0e0c4265b80fd2f9115e191001385b6c6 /lib/wx/test/wx_test_lib.erl
parent0e8d50bd2f25910559f54295a05a2a7fc6bf9c6f (diff)
parentf4a7f8a1f617e46653267bb18b9f7f635437d6d1 (diff)
downloadotp-83a66e961f043720c9d353923baaefb6f5e8ed96.tar.gz
otp-83a66e961f043720c9d353923baaefb6f5e8ed96.tar.bz2
otp-83a66e961f043720c9d353923baaefb6f5e8ed96.zip
Merge branch 'maint'
* maint: reltool: Remove export_all warning in tests et: Remove export_all warnings in test mnesia: Remove export_all in tests wx: Remove export_all in example code wx: test remove export_all wx: Update doc, OpenGL external links wx: Reduce Opengl docs
Diffstat (limited to 'lib/wx/test/wx_test_lib.erl')
-rw-r--r--lib/wx/test/wx_test_lib.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/wx/test/wx_test_lib.erl b/lib/wx/test/wx_test_lib.erl
index 9f26b8cb9d..af508ff490 100644
--- a/lib/wx/test/wx_test_lib.erl
+++ b/lib/wx/test/wx_test_lib.erl
@@ -24,7 +24,10 @@
%%% Created : 30 Oct 2008 by Dan Gudmundsson <[email protected]>
%%%-------------------------------------------------------------------
-module(wx_test_lib).
--compile(export_all).
+-export([init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2]).
+-export([tc_info/1, log/2, log/4, verbose/4, error/4,
+ flush/0, pick_msg/0, user_available/1, wx_destroy/2, wx_close/2, wait_for_close/0,
+ run_test/2, run_test/3, test_case_evaluator/3]).
-include("wx_test_lib.hrl").
@@ -182,11 +185,15 @@ run_test([], _Config) -> [].
run_test(Module, all, Config) ->
All = [{Module, Test} || Test <- Module:all()],
run_test(All, Config);
+run_test(Module, {group, Group}, Config) ->
+ {_, _, TCs} = lists:keyfind(Group, 1, Module:groups()),
+ All = [{Module, Test} || Test <- TCs],
+ run_test(All, Config);
+
run_test(Module, TestCase, Config) ->
log("Eval test case: ~w~n", [{Module, TestCase}]),
Sec = timer:seconds(1) * 1000,
- {T, Res} =
- timer:tc(?MODULE, eval_test_case, [Module, TestCase, Config]),
+ {T, Res} = timer:tc(fun() -> eval_test_case(Module, TestCase, Config) end),
log("Tested ~w in ~w sec~n", [TestCase, T div Sec]),
{T div Sec, Res}.