diff options
Diffstat (limited to 'lib/odbc/test/odbc_test_lib.erl')
| -rw-r--r-- | lib/odbc/test/odbc_test_lib.erl | 63 |
1 files changed, 50 insertions, 13 deletions
diff --git a/lib/odbc/test/odbc_test_lib.erl b/lib/odbc/test/odbc_test_lib.erl index 3e78105cf3..a8439d5fb6 100644 --- a/lib/odbc/test/odbc_test_lib.erl +++ b/lib/odbc/test/odbc_test_lib.erl @@ -36,18 +36,25 @@ match_float(Float, Match, Delta) -> (Float < Match + Delta) and (Float > Match - Delta). odbc_check() -> - case erlang:system_info(wordsize) of - 4 -> - ok; - Other -> - case os:type() of - {unix, linux} -> + case os:type() of + {unix,darwin} -> + lists:flatten( + io_lib:format("Currently we have no working drivers for MAC", + [])); + _ -> + case erlang:system_info({wordsize, external}) of + 4 -> ok; - Platform -> - lists:flatten( - io_lib:format("Word on platform ~w size" - " ~w not supported", [Other, - Platform])) + Other -> + case os:type() of + {unix, linux} -> + ok; + Platform -> + lists:flatten( + io_lib:format("Word on platform ~w size" + " ~w not supported", [Other, + Platform])) + end end end. @@ -71,9 +78,39 @@ strict(_,_) -> ok. platform_options() -> + []. + +skip() -> case os:type() of + {unix, linux} -> + Issue = linux_issue(), + is_sles9(Issue); {unix, sunos} -> - [{scrollable_cursors, off}]; + not supported_solaris(); + _ -> + false + end. + +supported_solaris() -> + case os:version() of + {_,10,_} -> + true; _ -> - [] + false end. + +linux_issue() -> + {ok, Binary} = file:read_file("/etc/issue"), + string:tokens(binary_to_list(Binary), " "). + +is_sles11(IssueTokens) -> + lists:member("11", IssueTokens). + +is_sles10(IssueTokens) -> + lists:member("10", IssueTokens). + +is_sles9(IssueTokens) -> + lists:member("9", IssueTokens). + +is_ubuntu(IssueTokens) -> + lists:member("Ubuntu", IssueTokens). |
