diff options
author | Raimo Niskanen <[email protected]> | 2012-01-05 16:32:30 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2012-01-09 18:35:11 +0100 |
commit | 77b157e42a7fd1a6f325276bdd88fd1a7f6bbea4 (patch) | |
tree | d455d802e0af43ea73392f0665061c24faf53c9d /lib/kernel/test/file_SUITE.erl | |
parent | 308721c56345aa6ee0d81d891f036b59541f3cc6 (diff) | |
download | otp-77b157e42a7fd1a6f325276bdd88fd1a7f6bbea4.tar.gz otp-77b157e42a7fd1a6f325276bdd88fd1a7f6bbea4.tar.bz2 otp-77b157e42a7fd1a6f325276bdd88fd1a7f6bbea4.zip |
file_SUITE: Assume 64-bit windows has enough memory
Temporary workaround until there is a memory info function
conveniantly usable from test suites.
Diffstat (limited to 'lib/kernel/test/file_SUITE.erl')
-rw-r--r-- | lib/kernel/test/file_SUITE.erl | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl index 2c1102e81e..6cab40d49d 100644 --- a/lib/kernel/test/file_SUITE.erl +++ b/lib/kernel/test/file_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2011. All Rights Reserved. +%% Copyright Ericsson AB 1996-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -93,7 +93,7 @@ %% System probe functions that might be handy to check from the shell --export([unix_free/1, memsize/0, bsd_memsize/1, win_memsize/1]). +-export([unix_free/1, memsize/0, bsd_memsize/1]). -include_lib("test_server/include/test_server.hrl"). -include_lib("kernel/include/file.hrl"). @@ -4018,7 +4018,7 @@ memsize() -> 0 end; {win32,_} -> - win_memsize(os:cmd("mem.exe")); + enough; % atom() > integer(); assume (64-bit) windows have enough _ -> 0 end. @@ -4040,19 +4040,6 @@ bsd_memsize(MIB) -> 0 end. -win_memsize(Mem) -> - Lines = re:split(Mem, "\\R+", [trim,{return,list}]), - {ok,RE} = re:compile("^\\s*(\\d+)"), - REOpts = [{capture,all_but_first,list}], - Numbers = - [case re:run(Line, RE, REOpts) of - nomatch -> - 0; - {match,[Digits]} -> - list_to_integer(Digits) - end || Line <- Lines], - lists:foldl(fun erlang:max/2, 0, Numbers). - strip_prefix([X|Prefix], [X|List]) -> strip_prefix(Prefix, List); strip_prefix([], List) -> |