diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-03-15 10:41:06 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-03-15 10:41:06 +0100 |
commit | bbfc76f64897f33ada6d4fd09ab4cfe2966e6b05 (patch) | |
tree | 689116eea77a14153f9d68f358abb603bb73ff22 /erts/emulator/test/gc_SUITE.erl | |
parent | f6711a886eb606d63f4c9c21935f43aea2aabb0a (diff) | |
parent | 61167468c2bedd4b6832662145272dc3f94805d4 (diff) | |
download | otp-bbfc76f64897f33ada6d4fd09ab4cfe2966e6b05.tar.gz otp-bbfc76f64897f33ada6d4fd09ab4cfe2966e6b05.tar.bz2 otp-bbfc76f64897f33ada6d4fd09ab4cfe2966e6b05.zip |
Merge branch 'egil/modernize-erts-tests'
* egil/modernize-erts-tests:
Tweak bs_construct_SUITE
Tweak port_SUITE
Fix module_info_SUITE
Fix send_term_SUITE
Cleaner map_SUITE
Remove ?line macros
Eliminate use of doc and suite clauses
Replace ?t with test_server
Eliminate use of ?config() macro
Replace use of test_server:format/2 with io:format/2
Eliminate use of test_server:fail/0,1
Modernize use of timetraps
Diffstat (limited to 'erts/emulator/test/gc_SUITE.erl')
-rw-r--r-- | erts/emulator/test/gc_SUITE.erl | 47 |
1 files changed, 13 insertions, 34 deletions
diff --git a/erts/emulator/test/gc_SUITE.erl b/erts/emulator/test/gc_SUITE.erl index cb000fd45f..8e5f0b05a1 100644 --- a/erts/emulator/test/gc_SUITE.erl +++ b/erts/emulator/test/gc_SUITE.erl @@ -23,44 +23,26 @@ -module(gc_SUITE). -include_lib("common_test/include/ct.hrl"). --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, - init_per_group/2,end_per_group/2]). - --define(default_timeout, ?t:minutes(10)). +-export([all/0, suite/0]). -export([grow_heap/1, grow_stack/1, grow_stack_heap/1]). -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}]. all() -> [grow_heap, grow_stack, grow_stack_heap]. -groups() -> - []. - -init_per_suite(Config) -> - Config. - -end_per_suite(_Config) -> - ok. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - -grow_heap(doc) -> ["Produce a growing list of elements, ", - "for X calls, then drop one item per call", - "until the list is empty."]; +%% Produce a growing list of elements, +%% for X calls, then drop one item per call +%% until the list is empty. grow_heap(Config) when is_list(Config) -> - Dog = test_server:timetrap(test_server:minutes(40)), + ct:timetrap({minutes, 40}), ok = grow_heap1(256), ok = grow_heap1(512), ok = grow_heap1(1024), ok = grow_heap1(2048), - test_server:timetrap_cancel(Dog), ok. grow_heap1(Len) -> @@ -86,14 +68,13 @@ grow_heap1([_|List], MaxLen, CurLen, down) -> -grow_stack(doc) -> ["Increase and decrease stack size, and ", - "drop off some garbage from time to time."]; +%% Increase and decrease stack size, and +%% drop off some garbage from time to time. grow_stack(Config) when is_list(Config) -> - Dog = test_server:timetrap(test_server:minutes(80)), + ct:timetrap({minutes, 80}), show_heap("before:"), grow_stack1(200, 0), show_heap("after:"), - test_server:timetrap_cancel(Dog), ok. grow_stack1(0, _) -> @@ -110,14 +91,12 @@ grow_stack1(Recs, CurRecs) -> %% Let's see how BEAM handles this one... -grow_stack_heap(doc) -> ["While growing the heap, bounces the size ", - "of the stack, and while reducing the heap", - "bounces the stack usage."]; +%% While growing the heap, bounces the size of the +%% stack, and while reducing the heap, bounces the stack usage. grow_stack_heap(Config) when is_list(Config) -> - Dog = test_server:timetrap(test_server:minutes(40)), + ct:timetrap({minutes, 40}), grow_stack_heap1(16), grow_stack_heap1(32), - test_server:timetrap_cancel(Dog), ok. grow_stack_heap1(MaxLen) -> |