Changeset 232841 in webkit


Ignore:
Timestamp:
Jun 14, 2018 10:49:01 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

[test262-runner] Test output should summarize tests that are
unexpectedly passing/failing.
https://bugs.webkit.org/show_bug.cgi?id=186527

Patch by Valerie R Young <valerie@bocoup.com> on 2018-06-14
Reviewed by Michael Saboff.

  • Scripts/test262/Runner.pm:

(main):

In verbose mode, a summary of all new failing tests
and all new passing tests are printed at the end of
the script output.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r232834 r232841  
     12018-06-14  Valerie R Young  <valerie@bocoup.com>
     2
     3        [test262-runner] Test output should summarize tests that are
     4        unexpectedly passing/failing.
     5        https://bugs.webkit.org/show_bug.cgi?id=186527
     6
     7        Reviewed by Michael Saboff.
     8
     9        * Scripts/test262/Runner.pm:
     10        (main):
     11          In verbose mode, a summary of all new failing tests
     12          and all new passing tests are printed at the end of
     13          the script output.
     14
    1152018-06-14  Zan Dobersek  <zdobersek@igalia.com>
    216
  • trunk/Tools/Scripts/test262/Runner.pm

    r232755 r232841  
    359359    my $newpasscount = 0;
    360360    my $skipfilecount = 0;
     361    my $newfailurereport = '';
     362    my $newpassreport = '';
    361363
    362364    # Create expectation file and calculate results
     
    382384
    383385            # If an unexpected failure
    384             $newfailcount++ if !$expectedFailure || ($expectedFailure ne $test->{error});
     386            if (!$expectedFailure || ($expectedFailure ne $test->{error})) {
     387                $newfailcount++;
     388
     389                if ($verbose) {
     390                    my $path = $test->{path};
     391                    my $mode = $test->{mode};
     392                    my $err = $test->{error};
     393                    $newfailurereport .= "FAIL $path ($mode)\n$err\n\n";
     394                }
     395            }
    385396
    386397        }
    387398        elsif ($test->{result} eq 'PASS') {
    388399            # If this is an newly passing test
    389             $newpasscount++ if $expectedFailure;
     400            if ($expectedFailure) {
     401                $newpasscount++;
     402
     403                if ($verbose) {
     404                    my $path = $test->{path};
     405                    my $mode = $test->{mode};
     406                    $newpassreport .= "PASS $path ($mode)\n";
     407                }
     408            }
    390409        }
    391410        elsif ($test->{result} eq 'SKIP') {
    392411            $skipfilecount++;
    393412        }
     413    }
     414
     415    # In verbose mode, the result of every test is printed, so summarize useful results
     416    if ($verbose && $expect && ($newfailurereport || $newpassreport)) {
     417        print "\n";
     418        if ($newfailurereport) {
     419            print "---------------NEW FAILING TESTS SUMMARY---------------\n\n";
     420            print "$newfailurereport";
     421        }
     422        if ($newpassreport) {
     423            print "---------------NEW PASSING TESTS SUMMARY---------------\n\n";
     424            print "$newpassreport\n";
     425        }
     426        print "---------------------------------------------------------\n";
    394427    }
    395428
Note: See TracChangeset for help on using the changeset viewer.