aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/alloc_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-05-10 16:16:47 +0200
committerSverker Eriksson <[email protected]>2016-05-10 16:16:47 +0200
commit3d85de7d6bd60e6b409be6910b35d973206ef388 (patch)
tree78f2ea99cecde9c9600c02dbfa992f1bdb4b9994 /erts/emulator/test/alloc_SUITE.erl
parent725ffcf9a638d8b15295f0a3709f2e786663c987 (diff)
downloadotp-3d85de7d6bd60e6b409be6910b35d973206ef388.tar.gz
otp-3d85de7d6bd60e6b409be6910b35d973206ef388.tar.bz2
otp-3d85de7d6bd60e6b409be6910b35d973206ef388.zip
erts: Skip alloc_SUITE:erts_mmap if ERL_ZFLAGS
contains flags for super carrier +MMsc*
Diffstat (limited to 'erts/emulator/test/alloc_SUITE.erl')
-rw-r--r--erts/emulator/test/alloc_SUITE.erl22
1 files changed, 19 insertions, 3 deletions
diff --git a/erts/emulator/test/alloc_SUITE.erl b/erts/emulator/test/alloc_SUITE.erl
index 1f7b499dcb..84cf4921d3 100644
--- a/erts/emulator/test/alloc_SUITE.erl
+++ b/erts/emulator/test/alloc_SUITE.erl
@@ -73,16 +73,32 @@ migration(Cfg) ->
end.
erts_mmap(Config) when is_list(Config) ->
- case os:type() of
- {unix, _} ->
+ case {os:type(), mmsc_flags()} of
+ {{unix,_}, false} ->
[erts_mmap_do(Config, SCO, SCRPM, SCRFSD)
|| SCO <-[true,false], SCRFSD <-[1234,0], SCRPM <- [true,false]];
- {SkipOs,_} ->
+ {{unix,_}, Flags} ->
+ {skipped, Flags};
+ {{SkipOs,_},_} ->
{skipped,
lists:flatten(["Not run on "
| io_lib:format("~p",[SkipOs])])}
end.
+%% Check if there are ERL_FLAGS set that will mess up this test case
+mmsc_flags() ->
+ case mmsc_flags("ERL_FLAGS") of
+ false -> mmsc_flags("ERL_ZFLAGS");
+ Flags -> Flags
+ end.
+mmsc_flags(Env) ->
+ case os:getenv(Env) of
+ false -> false;
+ V -> case string:str(V, "+MMsc") of
+ 0 -> false;
+ P -> Env ++ "=" ++ string:substr(V, P)
+ end
+ end.
erts_mmap_do(Config, SCO, SCRPM, SCRFSD) ->
%% We use the number of schedulers + 1 * approx main carriers size