diff options
author | Dan Gudmundsson <[email protected]> | 2017-09-18 11:24:52 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2017-09-18 11:24:52 +0200 |
commit | f4a7f8a1f617e46653267bb18b9f7f635437d6d1 (patch) | |
tree | 7ec7d1d25435522c4c1cd3448f54280b29522174 /lib/wx/test/wx_test_lib.erl | |
parent | decbaba3a095cfc004a747edbd338f918d6bb0fe (diff) | |
parent | d776b9be154d87a41df240c2adc1803a89e3df1f (diff) | |
download | otp-f4a7f8a1f617e46653267bb18b9f7f635437d6d1.tar.gz otp-f4a7f8a1f617e46653267bb18b9f7f635437d6d1.tar.bz2 otp-f4a7f8a1f617e46653267bb18b9f7f635437d6d1.zip |
Merge branch 'dgud/wx/decrease-opengl-docs' into maint
* dgud/wx/decrease-opengl-docs:
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.erl | 13 |
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}. |