From 3d5e91fada367fee723563fe133a45cc81dd3a73 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 7 Jun 2016 11:04:18 +0200 Subject: Make sure test node shuts down before skipping suite --- lib/common_test/test/ct_repeat_testrun_SUITE.erl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/common_test') diff --git a/lib/common_test/test/ct_repeat_testrun_SUITE.erl b/lib/common_test/test/ct_repeat_testrun_SUITE.erl index 195abdb7c0..f8b6a379f6 100644 --- a/lib/common_test/test/ct_repeat_testrun_SUITE.erl +++ b/lib/common_test/test/ct_repeat_testrun_SUITE.erl @@ -85,19 +85,21 @@ init_per_suite(Config0) -> %% Check if file i/o is too slow for correct measurements Opts3 = Opts0 ++ [{suite,Suite1},{testcase,tc1},{label,timing3}], - {T,{1,0,{0,0}}} = - timer:tc(fun() -> - ct_test_support:run(ct,run_test, - [Opts3],Config), - ct_test_support:run(ct,run_test, - [Opts3],Config) - end), + {T,_} = + timer:tc( + fun() -> + {1,0,{0,0}} = ct_test_support:run(ct,run_test, + [Opts3],Config), + {1,0,{0,0}} = ct_test_support:run(ct,run_test, + [Opts3],Config) + end), %% The time to compare with here must match the timeout value %% in the test suite. Accept 30% logging overhead (26 sec total). if T > 26000000 -> ct:pal("Timing test took ~w sec (< 27 sec expected). " "Skipping the suite!", [trunc(T/1000000)]), + ct_test_support:end_per_suite(Config), {skip,"File I/O too slow for this suite"}; true -> ct:pal("Timing test took ~w sec. Proceeding...", -- cgit v1.2.3