diff options
author | Lukas Larsson <[email protected]> | 2011-11-29 11:07:15 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2011-12-02 10:39:39 +0100 |
commit | fb8839de7ee499dfb4b534ad615114e01105e52c (patch) | |
tree | cb8200de3720b7d0577f9fc5804aa85d4b1878cc /lib/kernel/test | |
parent | 1bbf8cee44b8836d66d289cc0b5b314ed83de821 (diff) | |
download | otp-fb8839de7ee499dfb4b534ad615114e01105e52c.tar.gz otp-fb8839de7ee499dfb4b534ad615114e01105e52c.tar.bz2 otp-fb8839de7ee499dfb4b534ad615114e01105e52c.zip |
Skip recv/send during tests for fallback platforms
Diffstat (limited to 'lib/kernel/test')
-rw-r--r-- | lib/kernel/test/sendfile_SUITE.erl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl index 5312508918..f7bb6fb85f 100644 --- a/lib/kernel/test/sendfile_SUITE.erl +++ b/lib/kernel/test/sendfile_SUITE.erl @@ -54,6 +54,30 @@ init_per_suite(Config) -> end_per_suite(Config) -> file:delete(proplists:get_value(big_file, Config)). +init_per_testcase(TC,Config) when TC == t_sendfile_recvduring; + TC == t_sendfile_sendduring -> + Filename = proplists:get_value(small_file, Config), + + Send = fun(Sock) -> + {_Size, Data} = sendfile_file_info(Filename), + {ok,D} = file:open(Filename, [raw,binary,read]), + prim_file:sendfile(D, Sock, 0, 0, 0, + [],[],false,false,false), + Data + end, + + %% Check if sendfile is supported on this platform + case catch sendfile_send(Send) of + ok -> + Config; + Error -> + ct:log("Error: ~p",[Error]), + {skip,"Not supported"} + end; +init_per_testcase(_Tc,Config) -> + Config. + + t_sendfile_small(Config) when is_list(Config) -> Filename = proplists:get_value(small_file, Config), |