Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-05-02 12:11:04+02:00, msvensson@stripped +2 -0
Print tests that has been run but shouldn't and vice versa
Use opt_start_timeout also for ndb
Remove the .result files generated by 'check_testcase'
mysql-test/lib/mtr_report.pm@stripped, 2008-05-02 12:11:02+02:00, msvensson@stripped +9 -3
Use "failures" to keep track of if test has previously failed
mysql-test/mysql-test-run.pl@stripped, 2008-05-02 12:11:01+02:00, msvensson@stripped +29 -7
Print tests that has been run but shouldn't and vice versa
Use opt_start_timeout also for ndb
Remove the .result files generated by 'check_testcase'
diff -Nrup a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm
--- a/mysql-test/lib/mtr_report.pm 2008-04-27 23:35:36 +02:00
+++ b/mysql-test/lib/mtr_report.pm 2008-05-02 12:11:02 +02:00
@@ -131,8 +131,6 @@ sub mtr_report_test ($) {
if ($tinfo->{'result'} eq 'MTR_RES_FAILED'){
- #my $test_failures= $tinfo->{'failures'} || 0;
- #$tinfo->{'failures'}= $test_failures + 1;
if ( defined $tinfo->{'warnings'} )
{
mtr_report("[ fail ] Found warnings in server log file!");
@@ -233,7 +231,7 @@ sub mtr_report_stats ($) {
$tot_tests++;
$tot_passed++;
}
- elsif ( $tinfo->{'result'} eq 'MTR_RES_FAILED' )
+ elsif ( $tinfo->{failures} )
{
$tot_tests++;
$tot_failed++;
@@ -301,6 +299,14 @@ sub mtr_report_stats ($) {
# Print a list of testcases that failed
if ( $tot_failed != 0 )
{
+
+ # Print each failed test, again
+ #foreach my $test ( @$tests ){
+ # if ( $test->{result} eq 'MTR_RES_FAILED' ) {
+ # mtr_report_test($test);
+ # }
+ #}
+
my $ratio= $tot_passed * 100 / $tot_tests;
print "Failed $tot_failed/$tot_tests tests, ";
printf("%.2f", $ratio);
diff -Nrup a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
--- a/mysql-test/mysql-test-run.pl 2008-04-28 15:03:28 +02:00
+++ b/mysql-test/mysql-test-run.pl 2008-05-02 12:11:01 +02:00
@@ -322,15 +322,29 @@ sub main {
if ( @$completed != $num_tests){
if ($opt_force){
- # All test should have been run, print the completed list
- foreach my $test ( @$completed ){
- $test->print_test();
+ # All test should have been run, print the ones that differs
+ my %tests= ();
+ foreach my $t (@$tests) { $tests{$t->key()}= 1; };
+ foreach my $done ( @$completed ){
+ if ($tests{$done->key()}) {
+ mtr_report("Found one extra completed");
+ $done->print_test();
+ }
+ }
+ %tests= ();
+ foreach my $t (@$completed) { $tests{$t->key()}= 1; };
+ foreach my $done ( @$tests ){
+ if ($tests{$done->key()}) {
+ mtr_report("Found one test not run");
+ $done->print_test();
+ }
}
+
}
# Not all tests completed, failure
mtr_report();
- mtr_report("After @$completed of $num_tests.");
+ mtr_report(@$completed, " of $num_tests completed.");
mtr_error("Test failed.",
"To continue, re-run with '--force'");
}
@@ -467,6 +481,7 @@ sub run_test_server {
}
else {
mtr_report("\nRetrying test, attempt($retries/$opt_retry)...\n");
+ delete($result->{result});
$result->{retries}= $retries+1;
$result->write_test($sock, 'TESTCASE');
next;
@@ -479,7 +494,7 @@ sub run_test_server {
{
$result->{retries}= 0;
$result->{failures}= 0;
-
+ delete($result->{result});
$result->{repeat}= $repeat+1;
$result->write_test($sock, 'TESTCASE');
next;
@@ -1983,7 +1998,7 @@ sub ndbcluster_wait_started($$){
mtr_init_args(\$args);
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
mtr_add_arg($args, "--defaults-group-suffix=%s", $cluster->suffix());
- mtr_add_arg($args, "--timeout=60");
+ mtr_add_arg($args, "--timeout=%d", $opt_start_timeout);
if ($ndb_waiter_extra_opt)
{
@@ -2600,7 +2615,6 @@ sub check_testcase($$)
my $err_file= $proc->user_data();
my $base_file= mtr_match_extension($err_file, "err"); # Trim extension
- unlink("$base_file.result");
# One check testcase process returned
my $res= $proc->exit_status();
@@ -2611,6 +2625,11 @@ sub check_testcase($$)
# Remove the .err file the check generated
unlink($err_file);
+ # Remove the .result file the check generated
+ if ( $mode eq 'after' ){
+ unlink("$base_file.result");
+ }
+
if ( keys(%started) == 0){
# All checks completed
return 0;
@@ -2645,6 +2664,9 @@ sub check_testcase($$)
# Remove the .err file the check generated
unlink($err_file);
+
+ # Remove the .result file the check generated
+ unlink("$base_file.result");
}
}
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2619) | msvensson | 2 May |