You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Travis fixes:
server verification still fails due to wrong hostname - these tests are now disabled for Travis only Disable test when testing against a MySQL server.
This commit is contained in:
@@ -1428,7 +1428,11 @@ static int test_sslenforce(MYSQL *unused __attribute__((unused)))
|
|||||||
|
|
||||||
static int test_conc457(MYSQL *mysql)
|
static int test_conc457(MYSQL *mysql)
|
||||||
{
|
{
|
||||||
MYSQL_RES *result= mysql_list_processes(mysql);
|
MYSQL_RES *result;
|
||||||
|
|
||||||
|
SKIP_MYSQL(mysql);
|
||||||
|
|
||||||
|
result= mysql_list_processes(mysql);
|
||||||
|
|
||||||
FAIL_IF(mysql_field_count(mysql) != 9, "expected 9 columns");
|
FAIL_IF(mysql_field_count(mysql) != 9, "expected 9 columns");
|
||||||
mysql_free_result(result);
|
mysql_free_result(result);
|
||||||
|
@@ -66,6 +66,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
/* prevent warnings on Win64 by using STMT_LEN instead of strlen */
|
/* prevent warnings on Win64 by using STMT_LEN instead of strlen */
|
||||||
#define STMT_LEN(A) (unsigned long)strlen((A))
|
#define STMT_LEN(A) (unsigned long)strlen((A))
|
||||||
|
|
||||||
|
#define SKIP_TRAVIS()\
|
||||||
|
if (getenv("TRAVIS"))\
|
||||||
|
{\
|
||||||
|
diag("Skip test on Travis CI");\
|
||||||
|
return SKIP;\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define SKIP_MYSQL(mysql)\
|
||||||
|
if (!mariadb_connection(mysql))
|
||||||
|
{
|
||||||
|
diag("Skip test for non MariaDB server");
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
#define check_mysql_rc(rc, mysql) \
|
#define check_mysql_rc(rc, mysql) \
|
||||||
if (rc)\
|
if (rc)\
|
||||||
{\
|
{\
|
||||||
|
@@ -625,6 +625,8 @@ static int verify_ssl_server_cert(MYSQL *unused __attribute__((unused)))
|
|||||||
if (!hostname || !strcmp(hostname, "localhost"))
|
if (!hostname || !strcmp(hostname, "localhost"))
|
||||||
return SKIP;
|
return SKIP;
|
||||||
|
|
||||||
|
SKIP_TRAVIS();
|
||||||
|
|
||||||
mysql= mysql_init(NULL);
|
mysql= mysql_init(NULL);
|
||||||
FAIL_IF(!mysql, "Can't allocate memory");
|
FAIL_IF(!mysql, "Can't allocate memory");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user