diff options
-rw-r--r-- | client/mysqltest.c | 4 | ||||
-rw-r--r-- | mysql-test/mysql-test-run.sh | 11 | ||||
-rw-r--r-- | mysql-test/t/client_test.test | 2 | ||||
-rw-r--r-- | tests/client_test.c | 14 |
4 files changed, 19 insertions, 12 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 55f2bd44947..c89a9c71b9a 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -847,7 +847,7 @@ int do_source(struct st_query* q) static void do_exec(struct st_query* q) { int error; - DYNAMIC_STRING *ds = NULL; /* Assign just to avoid warning */ + DYNAMIC_STRING *ds= NULL; /* Assign just to avoid warning */ DYNAMIC_STRING ds_tmp; char buf[1024]; FILE *res_file; @@ -889,7 +889,7 @@ static void do_exec(struct st_query* q) error= pclose(res_file); if (error != 0) - die("command \"%s\" failed: %s", cmd, errno); + die("command \"%s\" failed", cmd); if (!disable_result_log) { diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 41dc3c419f0..c9fb682c90a 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -208,6 +208,7 @@ MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log MYSQL_MANAGER_USER=root NO_SLAVE=0 USER_TEST= +FAILED_CASES= EXTRA_MASTER_OPT="" EXTRA_MYSQL_TEST_OPT="" @@ -1376,7 +1377,7 @@ run_testcase () fi exit 1 fi - + FAILED_CASES="$FAILED_CASES $tname" if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ] then mysql_restart @@ -1562,4 +1563,10 @@ $ECHO [ "$DO_GCOV" ] && gcov_collect # collect coverage information [ "$DO_GPROF" ] && gprof_collect # collect coverage information -exit 0 +if [ $TOT_FAIL -ne 0 ]; then + $ECHO "mysql-test-run: *** Failing the test(s):$FAILED_CASES" + $ECHO + exit 1 +else + exit 0 +fi diff --git a/mysql-test/t/client_test.test b/mysql-test/t/client_test.test new file mode 100644 index 00000000000..eb053b6c902 --- /dev/null +++ b/mysql-test/t/client_test.test @@ -0,0 +1,2 @@ +-- disable_result_log +--exec ../tests/client_test --testcase --user=root --socket=var/tmp/master.sock --port=$MYSQL_TCP_PORT diff --git a/tests/client_test.c b/tests/client_test.c index a4e87bbc5d5..06a655cd3fb 100644 --- a/tests/client_test.c +++ b/tests/client_test.c @@ -28,6 +28,7 @@ #include <m_string.h> #include <assert.h> #ifdef HAVE_SYS_PARAM_H +/* Include to get MAXPATHLEN */ #include <sys/param.h> #endif @@ -6588,7 +6589,7 @@ static void test_frm_bug() bind[0].buffer_type= MYSQL_TYPE_STRING; bind[0].buffer= data_dir; - bind[0].buffer_length= NAME_LEN; + bind[0].buffer_length= MAXPATHLEN; bind[0].is_null= 0; bind[0].length= 0; bind[1]= bind[0]; @@ -10454,7 +10455,7 @@ static struct my_option client_test_long_options[] = (char **) &opt_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"socket", 'S', "Socket file to use for connection", (char **) &opt_unix_socket, (char **) &opt_unix_socket, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"testcase", 'c', "Runs as mysql-test-run testcase.", + {"testcase", 'c', "May disable some code when runs as mysql-test-run testcase.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"count", 't', "Number of times test to be executed", (char **) &opt_count, (char **) &opt_count, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0}, @@ -10642,8 +10643,7 @@ int main(int argc, char **argv) test_warnings(); /* show warnings test */ test_errors(); /* show errors test */ test_prepare_resultset();/* prepare meta info test */ - if (!opt_testcase) /* FIXME: skipped because it hangs */ - test_stmt_close(); /* mysql_stmt_close() test -- hangs */ + test_stmt_close(); /* mysql_stmt_close() test -- hangs */ test_prepare_field_result(); /* prepare meta info */ test_multi_stmt(); /* multi stmt test */ test_multi_statements();/* test multi statement execution */ @@ -10671,8 +10671,7 @@ int main(int argc, char **argv) #ifndef EMBEDDED_LIBRARY test_prepare_grant(); /* Test the GRANT command, bug #89 */ #endif - if (!opt_testcase) /* FIXME: skipped because it fails */ - test_frm_bug(); /* test the crash when .frm is invalid, bug #93 */ + test_frm_bug(); /* test the crash when .frm is invalid, bug #93 */ test_explain_bug(); /* test for the EXPLAIN, bug #115 */ test_decimal_bug(); /* test for the decimal bug */ test_nstmts(); /* test n statements */ @@ -10735,8 +10734,7 @@ int main(int argc, char **argv) dates in the server */ test_bug5399(); /* check that statement id uniquely identifies statement */ - if (!opt_testcase) - test_bug5194(); /* bulk inserts in prepared mode */ + test_bug5194(); /* bulk inserts in prepared mode */ test_bug5315(); /* check that mysql_change_user closes all prepared statements */ /* |