Commit 56c152fa authored by unknown's avatar unknown

BUG #15895810 - REQUIRE ADDITIONAL INFORMATION WITH THE --RESULT-FILE OPTION OF MTR

parent 35b9884f
...@@ -27,7 +27,7 @@ our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line ...@@ -27,7 +27,7 @@ our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line
mtr_warning mtr_error mtr_debug mtr_verbose mtr_warning mtr_error mtr_debug mtr_verbose
mtr_verbose_restart mtr_report_test_passed mtr_verbose_restart mtr_report_test_passed
mtr_report_test_skipped mtr_print mtr_report_test_skipped mtr_print
mtr_report_test); mtr_report_test isotime);
use mtr_match; use mtr_match;
use My::Platform; use My::Platform;
...@@ -109,6 +109,8 @@ sub mtr_report_test_passed ($) { ...@@ -109,6 +109,8 @@ sub mtr_report_test_passed ($) {
$tinfo->{'result'}= 'MTR_RES_PASSED'; $tinfo->{'result'}= 'MTR_RES_PASSED';
mtr_report_test($tinfo); mtr_report_test($tinfo);
resfile_global("endtime ", isotime (time));
} }
...@@ -534,4 +536,12 @@ sub mtr_verbose_restart (@) { ...@@ -534,4 +536,12 @@ sub mtr_verbose_restart (@) {
} }
# Used by --result-file for for formatting times
sub isotime($) {
my ($sec,$min,$hr,$day,$mon,$yr)= gmtime($_[0]);
return sprintf "%d-%02d-%02dT%02d:%02d:%02dZ",
$yr+1900, $mon+1, $day, $hr, $min, $sec;
}
1; 1;
...@@ -335,14 +335,6 @@ my $opt_parallel= $ENV{MTR_PARALLEL} || 1; ...@@ -335,14 +335,6 @@ my $opt_parallel= $ENV{MTR_PARALLEL} || 1;
select(STDOUT); select(STDOUT);
$| = 1; # Automatically flush STDOUT $| = 1; # Automatically flush STDOUT
# Used by --result-file for for formatting times
sub isotime($) {
my ($sec,$min,$hr,$day,$mon,$yr)= gmtime($_[0]);
return sprintf "%d-%02d-%02dT%02d:%02d:%02dZ",
$yr+1900, $mon+1, $day, $hr, $min, $sec;
}
main(); main();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment