diff options
author | Ingela Anderton Andin <[email protected]> | 2011-06-22 11:54:49 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2011-07-05 10:33:40 +0200 |
commit | 95a09939d033f8bf347f5196a9cccc4d3d34e056 (patch) | |
tree | a9f2f98fee80690b0255181859905c3038724cef /lib/odbc/test/odbc_test_lib.erl | |
parent | ee679e41535dd83aba7c8fb55fa12bdc6e89313c (diff) | |
download | otp-95a09939d033f8bf347f5196a9cccc4d3d34e056.tar.gz otp-95a09939d033f8bf347f5196a9cccc4d3d34e056.tar.bz2 otp-95a09939d033f8bf347f5196a9cccc4d3d34e056.zip |
Skip test if not applicable
Skip tests on sles9 (do not need to support this old version and we have
no working driver).
Run linux 32 against MySQL and 64 against Postgres (as MySQL driver
does not support parameterized queries on linux at the moment)
Do not run Postgre on Solaris as driver does not work good, run
MySQL on solaris and enable tests on Mac
Diffstat (limited to 'lib/odbc/test/odbc_test_lib.erl')
-rw-r--r-- | lib/odbc/test/odbc_test_lib.erl | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/lib/odbc/test/odbc_test_lib.erl b/lib/odbc/test/odbc_test_lib.erl index 3e78105cf3..2d6bf5fcac 100644 --- a/lib/odbc/test/odbc_test_lib.erl +++ b/lib/odbc/test/odbc_test_lib.erl @@ -36,7 +36,7 @@ match_float(Float, Match, Delta) -> (Float < Match + Delta) and (Float > Match - Delta). odbc_check() -> - case erlang:system_info(wordsize) of + case erlang:system_info({wordsize, external}) of 4 -> ok; Other -> @@ -71,9 +71,36 @@ 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). |