diff options
author | unknown <msvensson@neptunus.(none)> | 2006-07-19 14:25:52 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-07-19 14:25:52 +0200 |
commit | d7b1a5f2a176e9be1789537d95b0efce5e4b770b (patch) | |
tree | da96d8cd25bc39946abeae9f9373797de6f0958e /mysql-test | |
parent | 93a56475e1aea0c0ea4a2443f5fb0e43d77643c6 (diff) | |
download | mariadb-git-d7b1a5f2a176e9be1789537d95b0efce5e4b770b.tar.gz |
Update 'abort_not_supported_test' to print a reason why the test was aborted
and use it in mysql-test-run.pl
Use standard defines as last argument to 'fn_format'
mysql-test/r/not_ndb_default.require:
Rename: mysql-test/r/true.require -> mysql-test/r/not_ndb_default.require
client/mysqltest.c:
Use proper defines for last argument to fn_format(they are defined in my_sys.h)
Make abort_not_supported_test print info about in what file the test was
aborted and a reason for it. The reason is a best guess, using the filename of
the .require file to format it.
mysql-test/include/not_ndb_default.inc:
Use a more descriptive name of the .require file
mysql-test/include/not_windows.inc:
Use a more descriptive name of the .require file
mysql-test/include/windows.inc:
Use a more descriptive name of the .require file
mysql-test/lib/mtr_io.pl:
Add new function 'mtr_lastlinefromfile' that will return only the last line of a file.
mysql-test/mysql-test-run.pl:
Get reason why mysqltest decided to abort testcase from mysqltest.log
mysql-test/r/not_windows.require:
New BitKeeper file ``mysql-test/r/not_windows.require''
mysql-test/r/windows.require:
New BitKeeper file ``mysql-test/r/windows.require''
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/include/not_ndb_default.inc | 2 | ||||
-rw-r--r-- | mysql-test/include/not_windows.inc | 2 | ||||
-rw-r--r-- | mysql-test/include/windows.inc | 2 | ||||
-rw-r--r-- | mysql-test/lib/mtr_io.pl | 16 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 7 | ||||
-rw-r--r-- | mysql-test/r/not_ndb_default.require (renamed from mysql-test/r/true.require) | 0 | ||||
-rw-r--r-- | mysql-test/r/not_windows.require | 2 | ||||
-rw-r--r-- | mysql-test/r/windows.require | 2 |
8 files changed, 27 insertions, 6 deletions
diff --git a/mysql-test/include/not_ndb_default.inc b/mysql-test/include/not_ndb_default.inc index 1c148732a47..ca3c57a671a 100644 --- a/mysql-test/include/not_ndb_default.inc +++ b/mysql-test/include/not_ndb_default.inc @@ -1,4 +1,4 @@ ---require r/true.require +--require r/not_ndb_default.require disable_query_log; select convert(@@table_type using latin1) NOT IN ("ndbcluster","NDBCLUSTER") as "TRUE"; enable_query_log; diff --git a/mysql-test/include/not_windows.inc b/mysql-test/include/not_windows.inc index 54e9e0e817a..9240271077a 100644 --- a/mysql-test/include/not_windows.inc +++ b/mysql-test/include/not_windows.inc @@ -1,4 +1,4 @@ ---require r/true.require +--require r/not_windows.require disable_query_log; select convert(@@version_compile_os using latin1) NOT IN ("Win32","Win64","Windows") as "TRUE"; enable_query_log; diff --git a/mysql-test/include/windows.inc b/mysql-test/include/windows.inc index 05ec7b0e021..3d64efbafc7 100644 --- a/mysql-test/include/windows.inc +++ b/mysql-test/include/windows.inc @@ -1,4 +1,4 @@ ---require r/true.require +--require r/windows.require disable_query_log; select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") as "TRUE"; enable_query_log; diff --git a/mysql-test/lib/mtr_io.pl b/mysql-test/lib/mtr_io.pl index b3da6d97664..df32ea4692a 100644 --- a/mysql-test/lib/mtr_io.pl +++ b/mysql-test/lib/mtr_io.pl @@ -11,6 +11,7 @@ sub mtr_get_opts_from_file ($); sub mtr_fromfile ($); sub mtr_tofile ($@); sub mtr_tonewfile($@); +sub mtr_lastlinefromfile($); ############################################################################## # @@ -113,6 +114,20 @@ sub mtr_fromfile ($) { return $text; } +sub mtr_lastlinefromfile ($) { + my $file= shift; + my $text; + + open(FILE,"<",$file) or mtr_error("can't open file \"$file\": $!"); + while (my $line= <FILE>) + { + $text= $line; + } + close FILE; + return $text; +} + + sub mtr_tofile ($@) { my $file= shift; @@ -129,5 +144,4 @@ sub mtr_tonewfile ($@) { close FILE; } - 1; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 2f189f01d29..8b48f87c138 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2330,8 +2330,11 @@ sub run_testcase ($) { elsif ( $res == 62 ) { # Testcase itself tell us to skip this one - # FIXME get reason to skip from mysqltest - $tinfo->{'comment'}= "Detected by testcase"; + + # Try to get reason from mysqltest.log + my $last_line= mtr_lastlinefromfile($path_timefile) if -f $path_timefile; + my $reason= mtr_match_prefix($last_line, "reason: "); + $tinfo->{'comment'}= defined $reason ? $reason : "Detected by testcase(reason unknown) "; mtr_report_test_skipped($tinfo); } elsif ( $res == 63 ) diff --git a/mysql-test/r/true.require b/mysql-test/r/not_ndb_default.require index 09aae1ed1d0..09aae1ed1d0 100644 --- a/mysql-test/r/true.require +++ b/mysql-test/r/not_ndb_default.require diff --git a/mysql-test/r/not_windows.require b/mysql-test/r/not_windows.require new file mode 100644 index 00000000000..09aae1ed1d0 --- /dev/null +++ b/mysql-test/r/not_windows.require @@ -0,0 +1,2 @@ +TRUE +1 diff --git a/mysql-test/r/windows.require b/mysql-test/r/windows.require new file mode 100644 index 00000000000..09aae1ed1d0 --- /dev/null +++ b/mysql-test/r/windows.require @@ -0,0 +1,2 @@ +TRUE +1 |