Commit 2d29df57 authored by Magnus Svensson's avatar Magnus Svensson

WL#4350 Fix --record and no .result file

parent 0bfd8fb5
...@@ -699,6 +699,12 @@ sub collect_one_test_case { ...@@ -699,6 +699,12 @@ sub collect_one_test_case {
# should fail by default # should fail by default
$tinfo->{result_file}= $result_file; $tinfo->{result_file}= $result_file;
} }
else {
# No .result file exist
# Remember the path where it should be
# saved in case of --record
$tinfo->{record_file}= $result_file;
}
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Skip some tests but include in list, just mark them as skipped # Skip some tests but include in list, just mark them as skipped
......
...@@ -2638,12 +2638,14 @@ sub do_before_run_mysqltest($) ...@@ -2638,12 +2638,14 @@ sub do_before_run_mysqltest($)
my $tinfo= shift; my $tinfo= shift;
# Remove old files produced by mysqltest # Remove old files produced by mysqltest
my $base_file= mtr_match_extension($tinfo->{'result_file'}, my $base_file= mtr_match_extension($tinfo->{result_file},
"result"); # Trim extension "result"); # Trim extension
unlink("$base_file.reject"); if (defined $base_file ){
unlink("$base_file.progress"); unlink("$base_file.reject");
unlink("$base_file.log"); unlink("$base_file.progress");
unlink("$base_file.warnings"); unlink("$base_file.log");
unlink("$base_file.warnings");
}
if ( $mysql_version_id < 50000 ) { if ( $mysql_version_id < 50000 ) {
# Set environment variable NDB_STATUS_OK to 1 # Set environment variable NDB_STATUS_OK to 1
...@@ -4332,6 +4334,7 @@ sub start_mysqltest ($) { ...@@ -4332,6 +4334,7 @@ sub start_mysqltest ($) {
if ( $opt_record ) if ( $opt_record )
{ {
mtr_add_arg($args, "--record"); mtr_add_arg($args, "--record");
mtr_add_arg($args, "--result-file=%s", $tinfo->{record_file});
} }
if ( $opt_client_gdb ) if ( $opt_client_gdb )
......
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