Changeset 9320 in webkit for trunk/JavaScriptCore/tests


Ignore:
Timestamp:
Jun 6, 2005, 10:25:20 PM (20 years ago)
Author:
darin
Message:
  • tests/mozilla/run-mozilla-tests: Wrote a perl version of this so we don't require the "jst" tool to run the tests.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/tests/mozilla/run-mozilla-tests

    r7171 r9320  
    1 perl jsDriver.pl -e kjs -L ecma/Date -f actual.html
    2 "$SYMROOTS/jst" expected.html actual.html
     1#!/usr/bin/perl -w
     2
     3use strict;
     4
     5my $result = system "perl", "jsDriver.pl", "-e", "kjs", "-L", "ecma/Date", "-f", "actual.html";
     6
     7exit $result if $result;
     8
     9my %failures;
     10
     11open EXPECTED, "expected.html" or die;
     12while (<EXPECTED>) {
     13    last if /failures reported\.$/;
     14}
     15while (<EXPECTED>) {
     16    chomp;
     17    $failures{$_} = 1;
     18}
     19close EXPECTED;
     20
     21my %newFailures;
     22
     23open ACTUAL, "actual.html" or die;
     24while (<ACTUAL>) {
     25    last if /failures reported\.$/;
     26}
     27while (<ACTUAL>) {
     28    chomp;
     29    if ($failures{$_}) {
     30        delete $failures{$_};
     31    } else {
     32        $newFailures{$_} = 1;
     33    }
     34}
     35close ACTUAL;
     36
     37my $numNewFailures = %newFailures + 0;
     38if ($numNewFailures) {
     39    print "\n** Danger, Will Robinson! Danger! The following failures have been introduced:\n";
     40    foreach my $failure (sort keys %newFailures) {
     41        print "\t$failure\n";
     42    }
     43}
     44
     45my $numOldFailures = %failures + 0;
     46if ($numOldFailures) {
     47    print "\nYou fixed the following test";
     48    print "s" if $numOldFailures != 1;
     49    print ":\n";
     50    foreach my $failure (sort keys %failures) {
     51        print "\t$failure\n";
     52    }
     53}
     54
     55print "\n";
     56
     57print "$numNewFailures regression";
     58print "s" if $numNewFailures != 1;
     59print " found.\n";
     60
     61print "$numOldFailures test";
     62print "s" if $numOldFailures != 1;
     63print " fixed.\n";
     64
     65print "OK.\n" if $numNewFailures == 0;
Note: See TracChangeset for help on using the changeset viewer.