aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-12-19 08:50:38 +0100
committerLukas Larsson <[email protected]>2012-03-15 12:33:36 +0100
commitd8d08a31ee1880b29440438daa5a212de6f1f3af (patch)
tree9ad73c856ccb944ef2363314ac7601ed024f562b
parent027456f090fa4d298dd34655d6bb44d2531a135f (diff)
downloadotp-d8d08a31ee1880b29440438daa5a212de6f1f3af.tar.gz
otp-d8d08a31ee1880b29440438daa5a212de6f1f3af.tar.bz2
otp-d8d08a31ee1880b29440438daa5a212de6f1f3af.zip
Skip sendfile suite if solaris 8
-rw-r--r--lib/kernel/test/sendfile_SUITE.erl33
1 files changed, 19 insertions, 14 deletions
diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl
index 6d0848ee05..4a60db34a0 100644
--- a/lib/kernel/test/sendfile_SUITE.erl
+++ b/lib/kernel/test/sendfile_SUITE.erl
@@ -38,20 +38,25 @@ all() ->
].
init_per_suite(Config) ->
- Priv = ?config(priv_dir, Config),
- SFilename = filename:join(Priv, "sendfile_small.html"),
- {ok, DS} = file:open(SFilename,[write,raw]),
- file:write(DS,"yo baby yo"),
- file:sync(DS),
- file:close(DS),
- BFilename = filename:join(Priv, "sendfile_big.html"),
- {ok, DB} = file:open(BFilename,[write,raw]),
- [file:write(DB,[<<0:(10*8*1024*1024)>>]) || _I <- lists:seq(1,51)],
- file:sync(DB),
- file:close(DB),
- [{small_file, SFilename},
- {file_opts,[raw,binary]},
- {big_file, BFilename}|Config].
+ case {os:type(),os:version()} of
+ {{unix,sunos}, {5,8,_}} ->
+ {skip, "Solaris 8 not supported for now"};
+ _ ->
+ Priv = ?config(priv_dir, Config),
+ SFilename = filename:join(Priv, "sendfile_small.html"),
+ {ok, DS} = file:open(SFilename,[write,raw]),
+ file:write(DS,"yo baby yo"),
+ file:sync(DS),
+ file:close(DS),
+ BFilename = filename:join(Priv, "sendfile_big.html"),
+ {ok, DB} = file:open(BFilename,[write,raw]),
+ [file:write(DB,[<<0:(10*8*1024*1024)>>]) || _I <- lists:seq(1,51)],
+ file:sync(DB),
+ file:close(DB),
+ [{small_file, SFilename},
+ {file_opts,[raw,binary]},
+ {big_file, BFilename}|Config]
+ end.
end_per_suite(Config) ->
file:delete(proplists:get_value(big_file, Config)).