compare_dg_tests.pl: Do not count unstable tests
when deciding if there were improvements.

Still show them in the report table.

Change-Id: I7e3604ae24f80213154423eb12d019d2cfe7ca2f
diff --git a/compare_dg_tests.pl b/compare_dg_tests.pl
index 6eb4fd1..72d146c 100755
--- a/compare_dg_tests.pl
+++ b/compare_dg_tests.pl
@@ -327,7 +327,7 @@
 {
    my ($ref, $res) = @_;
    my $return_value=0;
-   my $total = 0;
+   my $total_better = 0;
    my $rtotal = 0;
    my $quiet_reg = $quiet;
 
@@ -387,13 +387,12 @@
    #### MINOR TO BE CHECKED ?
    if (not $quiet and not $short)
    {
-       $total = scalar(@{$res->{$XFAIL_NOW_PASSES}})+
+       $total_better = scalar(@{$res->{$XFAIL_NOW_PASSES}})+
 	   scalar(@{$res->{$FAIL_NOW_PASSES}})+
 	   scalar(@{$res->{$NEW_PASSES}})+
 	   scalar(@{$res->{$FAIL_DISAPPEARS}})+
 	   scalar(@{$res->{$XFAIL_APPEARS}})+
-	   scalar(@{$res->{$UNHANDLED_CASES}})+
-	   scalar(@{$res->{$UNSTABLE_CASES}});
+	   scalar(@{$res->{$UNHANDLED_CASES}});
 
        printf "$col_pink"."o  MINOR TO BE CHECKED : \n";
        printf "  +------------------------------------------+---------+\n";
@@ -407,7 +406,7 @@
        printf "  | %-40s | %7d |\n", $UNHANDLED_CASES, scalar(@{$res->{$UNHANDLED_CASES}}) if (scalar(@{$res->{$UNHANDLED_CASES}}));
        printf "  | %-40s | %7d |\n", $UNSTABLE_CASES, scalar(@{$res->{$UNSTABLE_CASES}}) if (scalar(@{$res->{$UNSTABLE_CASES}}));
        printf "  +------------------------------------------+---------+\n";
-       printf "  | %-40s | %7d |\n", "TOTAL_MINOR_TO_BE_CHECKED", $total;
+       printf "  | %-40s | %7d |\n", "TOTAL_MINOR_TO_BE_CHECKED", $total_better + scalar(@{$res->{$UNSTABLE_CASES}});;
        printf "  +------------------------------------------+---------+\n";
        printf "\n";
 
@@ -424,7 +423,7 @@
        printf "$col_reset\n";
    }
 
-   $return_value = 1 if ($total);
+   $return_value = 1 if ($total_better);
 
    $return_value = 2 if ($rtotal);