Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
97b0eb92
Commit
97b0eb92
authored
Dec 03, 2008
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #40924 please print timestamp when mtr fails
Added text "Test ended at <time>" after failure reports
parent
ee6c9dda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
mysql-test/lib/mtr_report.pm
mysql-test/lib/mtr_report.pm
+14
-3
No files found.
mysql-test/lib/mtr_report.pm
View file @
97b0eb92
# -*- cperl -*-
# -*- 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
# 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
# it under the terms of the GNU General Public License as published by
...
@@ -110,22 +110,26 @@ sub mtr_report_test ($) {
...
@@ -110,22 +110,26 @@ sub mtr_report_test ($) {
if
(
$result
eq
'
MTR_RES_FAILED
'){
if
(
$result
eq
'
MTR_RES_FAILED
'){
my
$timest
=
format_time
();
if
(
$warnings
)
if
(
$warnings
)
{
{
mtr_report
("
[ fail ] Found warnings in server log file!
");
mtr_report
("
[ fail ] Found warnings in server log file!
");
mtr_report
("
Test ended at
$timest
");
mtr_report
(
$warnings
);
mtr_report
(
$warnings
);
return
;
return
;
}
}
my
$timeout
=
$tinfo
->
{'
timeout
'};
my
$timeout
=
$tinfo
->
{'
timeout
'};
if
(
$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'}
");
mtr_report
("
\n
$tinfo
->{'comment'}
");
return
;
return
;
}
}
else
else
{
{
mtr_report
("
[ fail ]
");
mtr_report
("
[ fail ]
\n
Test ended at
$timest
");
}
}
if
(
$logfile
)
if
(
$logfile
)
...
@@ -372,6 +376,13 @@ use Time::localtime;
...
@@ -372,6 +376,13 @@ use Time::localtime;
use
Time::
HiRes
qw(gettimeofday)
;
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
();
my
$t0
=
gettimeofday
();
sub
_timestamp
{
sub
_timestamp
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment