From 95a09939d033f8bf347f5196a9cccc4d3d34e056 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 22 Jun 2011 11:54:49 +0200 Subject: 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 --- lib/odbc/test/mysql.erl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'lib/odbc/test/mysql.erl') diff --git a/lib/odbc/test/mysql.erl b/lib/odbc/test/mysql.erl index 49068c4356..c990793213 100644 --- a/lib/odbc/test/mysql.erl +++ b/lib/odbc/test/mysql.erl @@ -26,7 +26,22 @@ %------------------------------------------------------------------------- connection_string() -> - "DSN=MySQL;Database=odbctest;Uid=odbctest;Pwd=gurka;CHARSET=utf8;SSTMT=SET NAMES 'utf8';". + case test_server:os_type() of + {unix, linux} -> + "DSN=MySQL;Database=odbctest;Uid=odbctest;Pwd=gurka;CHARSET=utf8;SSTMT=SET NAMES 'utf8';"; + {unix, sunos} -> + solaris_str(); + {unix, darwin} -> + "DSN=MySQLMac;Database=odbctest;Uid=odbctest;Pwd=gurka;CHARSET=utf8;SSTMT=SET NAMES 'utf8';" + end. + +solaris_str() -> + case erlang:system_info(system_architecture) of + "sparc" ++ _ -> + "DSN=MySQLSolaris10;Database=odbctest;Uid=odbctest;Pwd=gurka;CHARSET=utf8;SSTMT=SET NAMES 'utf8';"; + "i386" ++ _ -> + "DSN=MySQLSolaris10i386;Database=odbctest;Uid=odbctest;Pwd=gurka;CHARSET=utf8;SSTMT=SET NAMES 'utf8';" + end. %------------------------------------------------------------------------- insert_result() -> -- cgit v1.2.3