aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2016-04-18 12:31:07 +0200
committerPeter Andersson <[email protected]>2016-05-02 14:07:22 +0200
commit03d7a4ac57ac52358fbf5388f1462a5347882d50 (patch)
treebde3b10cd075de936aba9964f5f131a755a540c4 /lib/common_test/test
parent10c1adf6028bf770003eb19b0c775ddc0260c950 (diff)
downloadotp-03d7a4ac57ac52358fbf5388f1462a5347882d50.tar.gz
otp-03d7a4ac57ac52358fbf5388f1462a5347882d50.tar.bz2
otp-03d7a4ac57ac52358fbf5388f1462a5347882d50.zip
Skip pre/post test IO suite if cover or debug is running
OTP-13535 The return value of ct:get_timetrap_info/0 has been modified.
Diffstat (limited to 'lib/common_test/test')
-rw-r--r--lib/common_test/test/ct_pre_post_test_io_SUITE.erl36
1 files changed, 22 insertions, 14 deletions
diff --git a/lib/common_test/test/ct_pre_post_test_io_SUITE.erl b/lib/common_test/test/ct_pre_post_test_io_SUITE.erl
index e9f8319b60..bf3eeee328 100644
--- a/lib/common_test/test/ct_pre_post_test_io_SUITE.erl
+++ b/lib/common_test/test/ct_pre_post_test_io_SUITE.erl
@@ -44,13 +44,29 @@
%% instance, the tests need to be performed on a separate node (or
%% there will be clashes with logging processes etc).
%%--------------------------------------------------------------------
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{seconds,120}}].
+
+all() ->
+ [
+ pre_post_io
+ ].
+
init_per_suite(Config) ->
- DataDir = ?config(data_dir, Config),
- CTH = filename:join(DataDir, "cth_ctrl.erl"),
- ct:pal("Compiling ~p: ~p",
- [CTH,compile:file(CTH,[{outdir,DataDir},debug_info])]),
- ct_test_support:init_per_suite([{path_dirs,[DataDir]},
- {start_sasl,true} | Config]).
+ TTInfo = {_T,{_Scaled,ScaleVal}} = ct:get_timetrap_info(),
+ ct:pal("Timetrap info = ~w", [TTInfo]),
+ if ScaleVal > 1 ->
+ {skip,"Skip on systems running e.g. cover or debug!"};
+ ScaleVal =< 1 ->
+ DataDir = ?config(data_dir, Config),
+ CTH = filename:join(DataDir, "cth_ctrl.erl"),
+ ct:pal("Compiling ~p: ~p",
+ [CTH,compile:file(CTH,[{outdir,DataDir},
+ debug_info])]),
+ ct_test_support:init_per_suite([{path_dirs,[DataDir]},
+ {start_sasl,true} | Config])
+ end.
end_per_suite(Config) ->
ct_test_support:end_per_suite(Config).
@@ -61,14 +77,6 @@ init_per_testcase(TestCase, Config) ->
end_per_testcase(TestCase, Config) ->
ct_test_support:end_per_testcase(TestCase, Config).
-suite() -> [{ct_hooks,[ts_install_cth]},
- {timetrap,{seconds,120}}].
-
-all() ->
- [
- pre_post_io
- ].
-
%%--------------------------------------------------------------------
%% TEST CASES
%%--------------------------------------------------------------------