diff options
author | Andrei Elkin <aelkin@mysql.com> | 2008-12-13 00:00:45 +0200 |
---|---|---|
committer | Andrei Elkin <aelkin@mysql.com> | 2008-12-13 00:00:45 +0200 |
commit | d964d3f8dbf95aac077393d79f7797f2ee66e250 (patch) | |
tree | 339e30e4c7993cba73491e3ffa0b15d2e1d6effe /mysql-test/lib | |
parent | fab8d1b460c949d2ca58c81244a223b6894ebc53 (diff) | |
parent | aa78bb303030377b6b153a82ecdc4a1dbdbfc4f2 (diff) | |
download | mariadb-git-d964d3f8dbf95aac077393d79f7797f2ee66e250.tar.gz |
merge 5.1-rpl repository -> 5.1-rpl local
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/mtr_report.pm | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index 6a46a372c45..70d0a5be687 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -1,5 +1,5 @@ # -*- cperl -*- -# Copyright (C) 2004-2006 MySQL AB +# Copyright (C) 2004-2006 MySQL AB, 2008 Sun Microsystems, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -110,22 +110,26 @@ sub mtr_report_test ($) { if ($result eq 'MTR_RES_FAILED'){ + my $timest = format_time(); + if ( $warnings ) { mtr_report("[ fail ] Found warnings in server log file!"); + mtr_report(" Test ended at $timest"); mtr_report($warnings); return; } my $timeout= $tinfo->{'timeout'}; if ( $timeout ) { - mtr_report("[ fail ] timeout after $timeout minutes"); + mtr_report("[ fail ] timeout after $timeout seconds"); + mtr_report(" Test ended at $timest"); mtr_report("\n$tinfo->{'comment'}"); return; } else { - mtr_report("[ fail ]"); + mtr_report("[ fail ]\n Test ended at $timest"); } if ( $logfile ) @@ -372,6 +376,13 @@ use Time::localtime; use Time::HiRes qw(gettimeofday); +sub format_time { + my $tm= localtime(); + return sprintf("%4d-%02d-%02d %02d:%02d:%02d", + $tm->year + 1900, $tm->mon+1, $tm->mday, + $tm->hour, $tm->min, $tm->sec); +} + my $t0= gettimeofday(); sub _timestamp { |