1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

unittest fix:

Added macro SKIP_NOTLS for skipping tests if MariaDB Connector/C
was build without TLS support.
This commit is contained in:
Georg Richter
2020-10-23 06:39:15 +02:00
parent 2064d89513
commit 8a4fac7f22
3 changed files with 13 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ static char *mariadb_progname;
#define PLUGIN_DIR "%s/@INSTALL_PLUGINDIR@" #define PLUGIN_DIR "%s/@INSTALL_PLUGINDIR@"
#define SOCKET "@MARIADB_UNIX_ADDR@" #define SOCKET "@MARIADB_UNIX_ADDR@"
#define PORT "@MARIADB_PORT@" #define PORT "@MARIADB_PORT@"
#ifdef HAVE_SSL #ifdef HAVE_TLS
#define TLS_LIBRARY_VERSION "@TLS_LIBRARY_VERSION@" #define TLS_LIBRARY_VERSION "@TLS_LIBRARY_VERSION@"
#else #else
#define TLS_LIBRARY_VERSION "" #define TLS_LIBRARY_VERSION ""

View File

@@ -1401,6 +1401,7 @@ static int test_sslenforce(MYSQL *unused __attribute__((unused)))
const char *env= getenv("MYSQL_TMP_DIR"); const char *env= getenv("MYSQL_TMP_DIR");
char cnf_file1[FN_REFLEN + 1]; char cnf_file1[FN_REFLEN + 1];
SKIP_NOTLS;
SKIP_SKYSQL; SKIP_SKYSQL;
if (travis_test) if (travis_test)

View File

@@ -61,7 +61,17 @@ if (IS_SKYSQL(hostname)) \
{ \ { \
diag("Not supported by SkySQL"); \ diag("Not supported by SkySQL"); \
return SKIP; \ return SKIP; \
} }
#ifndef HAVE_SSL
#define SKIP_NOTLS \
{ \
diag("TLS not supported"); \
return SKIP;\
}
#else
#define SKIP_NOTLS
#endif
#define MAX_KEY MAX_INDEXES #define MAX_KEY MAX_INDEXES
#define MAX_KEY_LENGTH_DECIMAL_WIDTH 4 /* strlen("4096") */ #define MAX_KEY_LENGTH_DECIMAL_WIDTH 4 /* strlen("4096") */