1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
renamed client_test to mysql_client_test
    fixed name for lstat in removef()
    added mysql-debug.exe for Windows
    added enviroment variable MYSQL_CLIENT_TEST
    added cleaning directory before tests
    New BitKeeper file ``VC++Files/tests/mysql_client_test.dsp''
    Delete: VC++Files/tests/client_test.dsp



BitKeeper/deleted/.del-client_test.dsp~659d0237a4c12ea1:
  Delete: VC++Files/tests/client_test.dsp
VC++Files/mysql.dsw:
  renamed client_test to mysql_client_test
mysql-test/my_manage.c:
  fixed name for lstat in removef()
mysql-test/mysql_test_run_new.c:
  added mysql-debug.exe for Windows
  added enviroment variable MYSQL_CLIENT_TEST
  added cleaning directory before tests
This commit is contained in:
unknown
2005-02-02 19:53:49 +05:00
parent dc472dca33
commit 5de673901f
4 changed files with 69 additions and 32 deletions

View File

@ -644,7 +644,7 @@ void del_tree(char *dir)
if (lstat(entry->d_name, &st) == -1)
{
/* FIXME error */
return;
return;
}
if (S_ISDIR(st.st_mode))
#else
@ -800,7 +800,15 @@ int removef(const char *format, ...)
#ifndef STRUCT_DIRENT_HAS_D_TYPE
struct stat st;
if (lstat(entry->d_name, &st) == -1 && !fnmatch(p, entry->d_name,0))
/* create long name */
snprintf(temp, FN_REFLEN, "%s/%s", path, entry->d_name);
if (lstat(temp, &st) == -1)
{
return 1; /* Error couldn't lstat file */
}
if (!S_ISDIR(st.st_mode) && !fnmatch(p, entry->d_name,0))
#else
if (!S_ISDIR(entry->d_type) && !fnmatch(p, entry->d_name,0))
#endif

View File

@ -1021,14 +1021,6 @@ void run_test(char *test)
char err_file[FN_REFLEN];
int err;
arg_list_t al;
#ifdef __WIN__
/* Clean test database */
removef("%s/test/*.*", master_dir);
removef("%s/test/*.*", slave_dir);
removef("%s/mysqltest/*.*", master_dir);
removef("%s/mysqltest/*.*", slave_dir);
#endif
/* skip slave? */
flag= skip_slave;
skip_slave= (strncmp(test, "rpl", 3) != 0);
@ -1393,7 +1385,11 @@ void setup(char *file __attribute__((unused)))
snprintf(client_key, FN_REFLEN, "%s/SSL/client-key.pem", base_dir);
/* setup files */
#ifdef _DEBUG
snprintf(mysqld_file, FN_REFLEN, "%s/mysqld-debug.exe", bin_dir);
#else
snprintf(mysqld_file, FN_REFLEN, "%s/mysqld.exe", bin_dir);
#endif
snprintf(mysqltest_file, FN_REFLEN, "%s/mysqltest.exe", bin_dir);
snprintf(mysqladmin_file, FN_REFLEN, "%s/mysqladmin.exe", bin_dir);
#else
@ -1494,6 +1490,13 @@ void setup(char *file __attribute__((unused)))
snprintf(file_path, FN_REFLEN*2,
"CLIENT_BINDIR=%s", bin_dir);
_putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"MYSQL_CLIENT_TEST=%s/tests/mysql_client_test --no-defaults --testcase "
"--user=root --port=%u --silent",
base_dir, master_port);
_putenv(file_path);
#else
{
static char env_MYSQL_TEST_DIR[FN_REFLEN*2];
@ -1506,6 +1509,7 @@ void setup(char *file __attribute__((unused)))
static char env_MYSQL_FIX_SYSTEM_TABLES[FN_REFLEN*2];
static char env_NDB_TOOLS_DIR[FN_REFLEN*2];
static char env_CLIENT_BINDIR[FN_REFLEN*2];
static char env_MYSQL_CLIENT_TEST[FN_REFLEN*2];
snprintf(env_MYSQL_TEST_DIR,FN_REFLEN*2,
"MYSQL_TEST_DIR=%s",mysql_test_dir);
@ -1552,6 +1556,13 @@ void setup(char *file __attribute__((unused)))
snprintf(env_CLIENT_BINDIR, FN_REFLEN*2,
"CLIENT_BINDIR=%s", bin_dir);
putenv(env_CLIENT_BINDIR);
snprintf(env_MYSQL_CLIENT_TEST, FN_REFLEN*2,
"MYSQL_CLIENT_TEST=%s/tests/mysql_client_test --no-defaults --testcase "
"--user=root --socket=%s --port=%u --silent",
base_dir, master_socket, master_port);
putenv(env_MYSQL_CLIENT_TEST);
}
#endif
@ -1592,8 +1603,13 @@ int main(int argc, char **argv)
char **testes= 0;
int name_index;
int index;
char var_dir[FN_REFLEN];
/* setup */
setup(argv[0]);
/* delete all file in var */
snprintf(var_dir,FN_REFLEN,"%s/var",mysql_test_dir);
del_tree(var_dir);
/*
The --ignore option is comma saperated list of test cases to skip and
@ -1633,7 +1649,7 @@ int main(int argc, char **argv)
/* install test databases */
mysql_install_db();
mlog("Starting Tests...\n");
mlog("\n");