diff options
author | Magnus Svensson <msvensson@mysql.com> | 2008-08-04 21:54:44 +0200 |
---|---|---|
committer | Magnus Svensson <msvensson@mysql.com> | 2008-08-04 21:54:44 +0200 |
commit | 39ad2dc05ae2cf6798d60397e82cddba16ddb244 (patch) | |
tree | 1c5de4faf1aee6e60daf0fdc27ae8af369fb025e /mysql-test/t | |
parent | 4e9f2d2454dbae4d1375a2e9e5a13f439aaae2fe (diff) | |
download | mariadb-git-39ad2dc05ae2cf6798d60397e82cddba16ddb244.tar.gz |
Bug #38181 Please print more debug info when tests fail
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/fix_priv_tables.test | 3 | ||||
-rw-r--r-- | mysql-test/t/mysqltest.test | 20 | ||||
-rw-r--r-- | mysql-test/t/openssl_1.test | 8 |
3 files changed, 24 insertions, 7 deletions
diff --git a/mysql-test/t/fix_priv_tables.test b/mysql-test/t/fix_priv_tables.test index 3051fd88076..c7cd500f8d2 100644 --- a/mysql-test/t/fix_priv_tables.test +++ b/mysql-test/t/fix_priv_tables.test @@ -51,7 +51,8 @@ echo; -- disable_query_log # Run the mysql_fix_privilege_tables.sql using "mysql --force" ---exec $MYSQL --force mysql < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/log/fix_priv_tables.log 2>&1 +--exec $MYSQL --force mysql < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/tmp/fix_priv_tables.log 2>&1 +--remove_file $MYSQLTEST_VARDIR/tmp/fix_priv_tables.log -- enable_query_log -- enable_result_log diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index b41f033d2af..5c5b74c968a 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1225,7 +1225,7 @@ select "a" as col1, "c" as col2; --exec echo "replace_result a;" | $MYSQL_TEST 2>&1 --error 1 --exec echo "replace_result a ;" | $MYSQL_TEST 2>&1 ---exec echo "replace_result a b; echo OK;" | $MYSQL_TEST 2>&1 +--exec echo "replace_result a b; echo OK; exit;" | $MYSQL_TEST 2>&1 --error 1 --exec echo "--replace_result a b c" | $MYSQL_TEST 2>&1 --error 1 @@ -1289,7 +1289,7 @@ while ($i) dec $i; } EOF ---exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK; exit;" | $MYSQL_TEST 2>&1 remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql; # Repeat connect/disconnect @@ -1496,6 +1496,7 @@ echo Multi statement using expected error; --exec echo "select 'select-me';" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql --exec echo "insertz "error query"||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql --exec echo "delimiter ;||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "exit;" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql # These two should work since the error is expected --exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql 2>&1 @@ -1688,6 +1689,7 @@ EOF --diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff4.tmp --error 1 --diff_files $MYSQLTEST_VARDIR/tmp/diff4.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp +exit; EOF # Execute the above diffs, and send their output to /dev/null - only @@ -2131,5 +2133,19 @@ rmdir $MYSQLTEST_VARDIR/tmp/testdir; --replace_result c:\\a.txt z SELECT 'c:\\a.txt' AS col; +# ---------------------------------------------------------------------------- +# Test that -- is not allowed as comment, only as mysqltest builtin command +# ---------------------------------------------------------------------------- + +# valid +select 1; +--query select 1 +--query -- a comment for the server + +# Not valid, "select" is not a mysqltest command +--error 1 +--exec echo "--select 1;" | $MYSQL_TEST 2>&1 + + --echo End of tests diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test index 111c723e19c..a76f62c9611 100644 --- a/mysql-test/t/openssl_1.test +++ b/mysql-test/t/openssl_1.test @@ -101,7 +101,7 @@ drop table t1; # - Apparently selecting a cipher doesn't work at all # - Usa a cipher that both yaSSL and OpenSSL supports # ---exec echo "SHOW STATUS LIKE 'Ssl_cipher';" > $MYSQLTEST_VARDIR/tmp/test.sql +--exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql --exec $MYSQL_TEST --ssl-cipher=DHE-RSA-AES256-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 # @@ -155,18 +155,18 @@ SET GLOBAL event_scheduler=0; # # Test to connect using a list of ciphers # ---exec echo "SHOW STATUS LIKE 'Ssl_cipher';" > $MYSQLTEST_VARDIR/tmp/test.sql +--exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql --exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER:AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 # Test to connect using a specifi cipher # ---exec echo "SHOW STATUS LIKE 'Ssl_cipher';" > $MYSQLTEST_VARDIR/tmp/test.sql +--exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql --exec $MYSQL_TEST --ssl-cipher=AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 # Test to connect using an unknown cipher # ---exec echo "SHOW STATUS LIKE 'Ssl_cipher';" > $MYSQLTEST_VARDIR/tmp/test.sql +--exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit" > $MYSQLTEST_VARDIR/tmp/test.sql --error 1 --exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 |